Interface IdToken
-
public interface IdToken
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.String
getAccessToken()
Get the access tokenjava.lang.String
getAccessTokenHash()
returns the Hash code of access token This is optional (claim at_hash)java.util.Map<java.lang.String,java.lang.Object>
getAllClaims()
get all the claims in the payload of Id Tokenjava.lang.String
getAllClaimsAsJson()
java.util.List<java.lang.String>
getAudience()
returns the audience(s) This is required Case sensitive (claim aud)long
getAuthorizationTimeSeconds()
returns The authorization time of the Id Token This is not required (key-id auth_time)java.lang.String
getAuthorizedParty()
Authorized Party This is optional Case sensitive (claim azp)java.lang.Object
getClaim(java.lang.String key)
Using the key to get its valuejava.lang.String
getClassReference()
returns Authentication Context Class Reference This is optional (claim acr)java.lang.String
getClientId()
returns the client Id This is not required (key-id azp2)long
getExpirationTimeSeconds()
return the expiration time of the Id Token The time is represented as the number of seconds from 1970-01-01T0:0:0:0Z This is required (claim exp)long
getIssuedAtTimeSeconds()
returns the issued time of Id Token This is required (claim iat)java.lang.String
getIssuer()
returns Issuer Identifier for the Issuer of the Response This is required Case sensitive (claim iss)java.lang.String
getJwtId()
Returns the JWT ID of the IdToken This is not required.java.util.List<java.lang.String>
getMethodsReferences()
returns Authentication Methods References This is optional (claim amr)java.lang.String
getNonce()
returns the value of nonce This value is optional usually.long
getNotBeforeTimeSeconds()
return the time which Id Token is not valid before it The time is represented as the number of seconds from 1970-01-01T0:0:0:0Z This is not required (key-id nbf)java.lang.String
getRefreshToken()
Get the refresh tokenjava.lang.String
getSubject()
returns the Subject Identifier This is required.java.lang.String
getType()
returns the Type of IdToken, such as: Bearer This is not required.
-
-
-
Method Detail
-
getJwtId
java.lang.String getJwtId()
Returns the JWT ID of the IdToken This is not required. Case sensitive (key-id jti)- Returns:
- JWT ID
-
getType
java.lang.String getType()
returns the Type of IdToken, such as: Bearer This is not required. Case sensitive (key-id typ)- Returns:
- Token Type
-
getIssuer
java.lang.String getIssuer()
returns Issuer Identifier for the Issuer of the Response This is required Case sensitive (claim iss)- Returns:
- Issuer
-
getSubject
java.lang.String getSubject()
returns the Subject Identifier This is required. Case sensitive (claim sub)- Returns:
- subject Id
-
getAudience
java.util.List<java.lang.String> getAudience()
returns the audience(s) This is required Case sensitive (claim aud)- Returns:
- audience(s)
-
getClientId
java.lang.String getClientId()
returns the client Id This is not required (key-id azp2)- Returns:
- Client Id
-
getExpirationTimeSeconds
long getExpirationTimeSeconds()
return the expiration time of the Id Token The time is represented as the number of seconds from 1970-01-01T0:0:0:0Z This is required (claim exp)- Returns:
- Expiration time in seconds
-
getNotBeforeTimeSeconds
long getNotBeforeTimeSeconds()
return the time which Id Token is not valid before it The time is represented as the number of seconds from 1970-01-01T0:0:0:0Z This is not required (key-id nbf)- Returns:
- Not Before Time in seconds
-
getIssuedAtTimeSeconds
long getIssuedAtTimeSeconds()
returns the issued time of Id Token This is required (claim iat)- Returns:
- the issued time in seconds
-
getAuthorizationTimeSeconds
long getAuthorizationTimeSeconds()
returns The authorization time of the Id Token This is not required (key-id auth_time)- Returns:
- The authorization time in seconds
-
getNonce
java.lang.String getNonce()
returns the value of nonce This value is optional usually. But it's required when the request of a RP Client provides a nonce. In this case, the value of nonce must be the same as the one that the RP Client provides. case sensitive (claim nonce)- Returns:
- the value of nonce
-
getAccessTokenHash
java.lang.String getAccessTokenHash()
returns the Hash code of access token This is optional (claim at_hash)- Returns:
- the Hash code of the access token
-
getClassReference
java.lang.String getClassReference()
returns Authentication Context Class Reference This is optional (claim acr)- Returns:
- Authentication Context Class Reference
-
getMethodsReferences
java.util.List<java.lang.String> getMethodsReferences()
returns Authentication Methods References This is optional (claim amr)- Returns:
- Authentication Methods References
-
getAuthorizedParty
java.lang.String getAuthorizedParty()
Authorized Party This is optional Case sensitive (claim azp)- Returns:
- Authorized Party
-
getClaim
java.lang.Object getClaim(java.lang.String key)
Using the key to get its value- Parameters:
key
- - the claim or key-id- Returns:
- The value
-
getAllClaims
java.util.Map<java.lang.String,java.lang.Object> getAllClaims()
get all the claims in the payload of Id Token- Returns:
- all the claims in the payload of Id Token
-
getAccessToken
java.lang.String getAccessToken()
Get the access token- Returns:
- the access token string
-
getRefreshToken
java.lang.String getRefreshToken()
Get the refresh token- Returns:
- the refresh token string if exists, otherwise return null
-
getAllClaimsAsJson
java.lang.String getAllClaimsAsJson()
- Returns:
- all the claims in Json format
-
-