@SessionScoped public class OAuth2StateHolder extends Object implements OAuth2AccessToken
Constructor and Description |
---|
OAuth2StateHolder() |
Modifier and Type | Method and Description |
---|---|
String |
getAccessToken()
Gets the authorisation token that was received from the OAuth provider
|
Optional<Long> |
getExpiresIn()
Return the time that the access token is granted for, if it is set to
expire
|
Optional<String> |
getRefreshToken()
Returns the refresh token that can be used to get a new access token
|
Optional<String> |
getScope()
Gets the scope that the user has been given permission for your application to use with the OAuth provider
|
Instant |
getTimeSet()
Gets the time that the access token was last set
|
void |
setAccessToken(String token)
Sets the access token that is to be used to verify the user with the OAuth provider once they are logged in.
|
void |
setExpiresIn(Long expiresIn)
Sets the time that the access token is granted for
|
void |
setRefreshToken(String refreshToken)
Sets the refresh token that can be used to renew the access token
|
void |
setScope(String scope) |
public Optional<String> getScope()
OAuth2AccessToken
getScope
in interface OAuth2AccessToken
public void setScope(String scope)
public Optional<String> getRefreshToken()
OAuth2AccessToken
getRefreshToken
in interface OAuth2AccessToken
public void setRefreshToken(String refreshToken)
OAuth2AccessToken
setRefreshToken
in interface OAuth2AccessToken
public Optional<Long> getExpiresIn()
OAuth2AccessToken
getExpiresIn
in interface OAuth2AccessToken
public void setExpiresIn(Long expiresIn)
OAuth2AccessToken
setExpiresIn
in interface OAuth2AccessToken
public String getAccessToken()
OAuth2AccessToken
getAccessToken
in interface OAuth2AccessToken
public void setAccessToken(String token)
OAuth2AccessToken
setAccessToken
in interface OAuth2AccessToken
public Instant getTimeSet()
OAuth2AccessToken
getTimeSet
in interface OAuth2AccessToken
Copyright © 2021. All rights reserved.