public class JwtContext extends Object
| 限定符和类型 | 字段和说明 |
|---|---|
private com.auth0.jwt.algorithms.Algorithm |
algorithm |
private String |
appToken |
private int |
tokenLiveSconds |
| 构造器和说明 |
|---|
JwtContext(String appToken,
int tokenLiveSconds,
com.auth0.jwt.algorithms.Algorithm algorithm) |
| 限定符和类型 | 方法和说明 |
|---|---|
static JwtContext |
create(String app_token,
com.auth0.jwt.algorithms.Algorithm algorithm,
int token_live_seconds) |
static JwtContext |
create(String app_token,
RSAKey rsa_key,
int token_live_seconds)
创建JWT上下文
|
JwtToken |
createJwtToken()
创建JWT令牌
|
String |
getAppToken()
获取应用凭据
|
int |
getTokenLiveSconds()
获取令牌存活时间(秒)
|
void |
setTokenLiveSconds(int tokenLiveSconds)
设置令牌存活时间(秒)
|
private String appToken
private int tokenLiveSconds
private com.auth0.jwt.algorithms.Algorithm algorithm
JwtContext(String appToken, int tokenLiveSconds, com.auth0.jwt.algorithms.Algorithm algorithm)
public String getAppToken()
public int getTokenLiveSconds()
public void setTokenLiveSconds(int tokenLiveSconds)
tokenLiveSconds - 秒public JwtToken createJwtToken()
public static JwtContext create(String app_token, RSAKey rsa_key, int token_live_seconds)
app_token - 应用凭据rsa_key - RSA私钥token_live_seconds - 令牌存活时间public static JwtContext create(String app_token, com.auth0.jwt.algorithms.Algorithm algorithm, int token_live_seconds)
Copyright © 2022. All rights reserved.