Class TokenResponse
- java.lang.Object
-
- net.shibboleth.idp.plugin.authn.duo.nimbus.impl.TokenResponse
-
@Immutable public final class TokenResponse extends Object
A token response, see RFC6749 section 5.1.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classTokenResponse.BuilderBuilder to buildTokenResponse.static interfaceTokenResponse.IAccessTokenStageAccess token stage interface.static interfaceTokenResponse.IBuildStageBuild stage interface.static interfaceTokenResponse.IIdTokenStageToken stage interface.static interfaceTokenResponse.ITokenTypeStageToken type stage interface.
-
Field Summary
Fields Modifier and Type Field Description private StringaccessTokenThe access token issued by the authorization server.private IntegerexpiresInThe lifetime in seconds of the access token.private StringidTokenThe OIDC ID token string base64 encoded.private StringrefreshTokenThe refresh token, which can be used to obtain new access tokens using the same authorization grant.private StringscopeThe scope requested by the client.private StringtokenTypeThe token type e.g.
-
Constructor Summary
Constructors Modifier Constructor Description privateTokenResponse(TokenResponse.Builder builder)Constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static TokenResponse.IIdTokenStagebuilder()Creates builder to buildTokenResponse.StringgetAccessToken()Get the access token.IntegergetExpiresIn()Get how long the access token is valid for in seconds.StringgetIdToken()Get the ID token.StringgetRefreshToken()Get the refresh token.StringgetScope()Get the requested scope.StringgetTokenType()Get the token type.StringtoString()
-
-
-
Field Detail
-
idToken
@Nonnull private final String idToken
The OIDC ID token string base64 encoded.
-
accessToken
@Nonnull private final String accessToken
The access token issued by the authorization server.
-
refreshToken
@Nullable private final String refreshToken
The refresh token, which can be used to obtain new access tokens using the same authorization grant.
-
tokenType
@Nonnull private final String tokenType
The token type e.g. Bearer. Value is case insensitive
-
expiresIn
@Nullable private final Integer expiresIn
The lifetime in seconds of the access token.
-
scope
@Nullable private final String scope
The scope requested by the client.
-
-
Constructor Detail
-
TokenResponse
private TokenResponse(TokenResponse.Builder builder)
Constructor.- Parameters:
builder- the builder.
-
-
Method Detail
-
getIdToken
public final String getIdToken()
Get the ID token.- Returns:
- Returns the idToken.
-
getAccessToken
public final String getAccessToken()
Get the access token.- Returns:
- Returns the accessToken.
-
getRefreshToken
public final String getRefreshToken()
Get the refresh token.- Returns:
- Returns the refreshToken.
-
getTokenType
public final String getTokenType()
Get the token type.- Returns:
- Returns the tokenType.
-
getExpiresIn
public final Integer getExpiresIn()
Get how long the access token is valid for in seconds.- Returns:
- Returns the expiresIn.
-
getScope
public final String getScope()
Get the requested scope.- Returns:
- Returns the scope.
-
builder
public static TokenResponse.IIdTokenStage builder()
Creates builder to buildTokenResponse.- Returns:
- created builder
-
-