Class TokenResponse
java.lang.Object
io.micronaut.security.oauth2.endpoint.token.response.TokenResponse
- Direct Known Subclasses:
 OpenIdTokenResponse
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
ConstructorsConstructorDescriptionInstantiates Access Token Response.TokenResponse(String accessToken, String tokenType) Instantiates Access Token Response. - 
Method Summary
Modifier and TypeMethodDescriptionbooleangetScope()inthashCode()voidsetAccessToken(String accessToken) voidsetExpiresIn(Integer expiresIn) voidsetRefreshToken(String refreshToken) voidvoidsetTokenType(String tokenType)  
- 
Constructor Details
- 
TokenResponse
public TokenResponse()Instantiates Access Token Response. - 
TokenResponse
Instantiates Access Token Response.- Parameters:
 accessToken- Access token issued by the authorization server.tokenType- The type of the token issued.
 
 - 
 - 
Method Details
- 
getAccessToken
- Returns:
 - The access token issued by the authorization server.
 
 - 
setAccessToken
- Parameters:
 accessToken- The access token issued by the authorization server.
 - 
getTokenType
- Returns:
 - The type of the token issued.
 
 - 
setTokenType
- Parameters:
 tokenType- The type of the token issued.
 - 
getExpiresIn
- Returns:
 - The lifetime in seconds of the access token.
 
 - 
setExpiresIn
- Parameters:
 expiresIn- The lifetime in seconds of the access token.
 - 
getExpiresInDate
- Returns:
 - Expiration date of the access token. Calculated with the 
expiresInreceived by the authorization server. 
 - 
getScope
- Returns:
 - Scope of the access token.
 
 - 
setScope
- Parameters:
 scope- Scope of the access token.
 - 
getRefreshToken
- Returns:
 - The refresh token, which can be used to obtain new access tokens using the same authorization grant.
 
 - 
setRefreshToken
- Parameters:
 refreshToken- The refresh token, which can be used to obtain new access tokens using the same authorization grant.
 - 
equals
 - 
hashCode
public int hashCode() 
 -