Interface IdToken
public interface IdToken
-
Method Summary
Modifier and TypeMethodDescriptionGet the access tokenreturns the Hash code of access token This is optional (claim at_hash)get all the claims in the payload of Id Tokenreturns the audience(s) This is required Case sensitive (claim aud)long
returns The authorization time of the Id Token This is not required (key-id auth_time)Authorized Party This is optional Case sensitive (claim azp)Using the key to get its valuereturns Authentication Context Class Reference This is optional (claim acr)returns the client Id This is not required (key-id azp2)long
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
returns the issued time of Id Token This is required (claim iat)returns Issuer Identifier for the Issuer of the Response This is required Case sensitive (claim iss)getJwtId()
Returns the JWT ID of the IdToken This is not required.returns Authentication Methods References This is optional (claim amr)getNonce()
returns the value of nonce This value is optional usually.long
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 the raw ID token stringGet the refresh tokenreturns the Subject Identifier This is required.getType()
returns the Type of IdToken, such as: Bearer This is not required.
-
Method Details
-
getJwtId
String getJwtId()Returns the JWT ID of the IdToken This is not required. Case sensitive (key-id jti)- Returns:
- JWT ID
-
getType
String getType()returns the Type of IdToken, such as: Bearer This is not required. Case sensitive (key-id typ)- Returns:
- Token Type
-
getIssuer
String getIssuer()returns Issuer Identifier for the Issuer of the Response This is required Case sensitive (claim iss)- Returns:
- Issuer
-
getSubject
String getSubject()returns the Subject Identifier This is required. Case sensitive (claim sub)- Returns:
- subject Id
-
getAudience
returns the audience(s) This is required Case sensitive (claim aud)- Returns:
- audience(s)
-
getClientId
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
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
String getAccessTokenHash()returns the Hash code of access token This is optional (claim at_hash)- Returns:
- the Hash code of the access token
-
getClassReference
String getClassReference()returns Authentication Context Class Reference This is optional (claim acr)- Returns:
- Authentication Context Class Reference
-
getMethodsReferences
returns Authentication Methods References This is optional (claim amr)- Returns:
- Authentication Methods References
-
getAuthorizedParty
String getAuthorizedParty()Authorized Party This is optional Case sensitive (claim azp)- Returns:
- Authorized Party
-
getClaim
Using the key to get its value- Parameters:
key
- - the claim or key-id- Returns:
- The value
-
getAllClaims
get all the claims in the payload of Id Token- Returns:
- all the claims in the payload of Id Token
-
getAccessToken
String getAccessToken()Get the access token- Returns:
- the access token string
-
getRefreshToken
String getRefreshToken()Get the refresh token- Returns:
- the refresh token string if exists, otherwise return null
-
getAllClaimsAsJson
String getAllClaimsAsJson()- Returns:
- all the claims in Json format
-
getRawIdToken
Returns the raw ID token string- Returns:
- The raw ID token string
- Throws:
com.ibm.websphere.security.WSSecurityException
- Thrown if there is an error getting the run as identity.
-