Class TokenResponse
- java.lang.Object
-
- io.micronaut.security.oauth2.endpoint.token.response.TokenResponse
-
- Direct Known Subclasses:
OpenIdTokenResponse
@Introspected public class TokenResponse extends java.lang.Object
Represent the response of an authorization server to a valid access token request.- Since:
- 1.2.0
- Author:
- Sergio del Amo
- See Also:
-
-
-
Constructor Summary
Constructors Constructor Description TokenResponse()
Instantiates Access Token Response.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getAccessToken()
java.lang.Integer
getExpiresIn()
java.lang.String
getRefreshToken()
java.lang.String
getScope()
java.lang.String
getTokenType()
void
setAccessToken(java.lang.String accessToken)
void
setExpiresIn(java.lang.Integer expiresIn)
void
setRefreshToken(java.lang.String refreshToken)
void
setScope(java.lang.String scope)
void
setTokenType(java.lang.String tokenType)
-
-
-
-
Method Detail
-
getAccessToken
@Nonnull public java.lang.String getAccessToken()
- Returns:
- The access token issued by the authorization server.
-
setAccessToken
public void setAccessToken(@Nonnull java.lang.String accessToken)
- Parameters:
accessToken
- The access token issued by the authorization server.
-
getTokenType
@Nonnull public java.lang.String getTokenType()
- Returns:
- The type of the token issued.
-
setTokenType
public void setTokenType(@Nonnull java.lang.String tokenType)
- Parameters:
tokenType
- The type of the token issued.
-
getExpiresIn
@Nullable public java.lang.Integer getExpiresIn()
- Returns:
- The lifetime in seconds of the access token.
-
setExpiresIn
public void setExpiresIn(@Nullable java.lang.Integer expiresIn)
- Parameters:
expiresIn
- The lifetime in seconds of the access token.
-
getScope
@Nullable public java.lang.String getScope()
- Returns:
- Scope of the access token.
-
setScope
public void setScope(@Nullable java.lang.String scope)
- Parameters:
scope
- Scope of the access token.
-
getRefreshToken
@Nullable public java.lang.String getRefreshToken()
- Returns:
- The refresh token, which can be used to obtain new access tokens using the same authorization grant.
-
setRefreshToken
public void setRefreshToken(@Nullable java.lang.String refreshToken)
- Parameters:
refreshToken
- The refresh token, which can be used to obtain new access tokens using the same authorization grant.
-
-