Package com.ebasetech.xi.api
Interface OAuthTokens
- All Superinterfaces:
java.io.Serializable
public interface OAuthTokens
extends java.io.Serializable
Interface OAuthTokens contains the access token and the refresh token required for OAuth authentication.
- Since:
- V5.1
-
Method Summary
Modifier and Type Method Description java.lang.StringgetAccessToken()Returns the value of the access tokenjava.lang.StringgetIdToken()Returns the value of the id tokenJWTgetJWToken()Returns the parsed JWT from the ID user token.java.lang.StringgetOAuthId()java.lang.StringgetRefreshToken()Returns the value of the refresh tokenlonggetTokenExpiry()Returns the token expiryjava.lang.StringgetTokenType()Returns the value the token type e.g BearervoidsetAccessToken(java.lang.String accessToken)Sets the value of the access tokenvoidsetIdToken(java.lang.String idToken)Sets the value of the id tokenvoidsetRefreshToken(java.lang.String refreshToken)Sets the value of the refresh tokenvoidsetTokenExpiry(long tokenExpiry)Sets the token expiryvoidsetTokenType(java.lang.String tokenType)Sets the value of the token type e.g Bearer
-
Method Details
-
setAccessToken
void setAccessToken(java.lang.String accessToken)Sets the value of the access token- Parameters:
accessToken- value- Since:
- V5.1
-
getAccessToken
java.lang.String getAccessToken()Returns the value of the access token- Since:
- V5.1
-
setRefreshToken
void setRefreshToken(java.lang.String refreshToken)Sets the value of the refresh token- Parameters:
refreshToken- value- Since:
- V5.1
-
getRefreshToken
java.lang.String getRefreshToken()Returns the value of the refresh token- Since:
- V5.1
-
setTokenExpiry
void setTokenExpiry(long tokenExpiry)Sets the token expiry- Parameters:
tokenExpiry- value- Since:
- V5.2
-
getTokenExpiry
long getTokenExpiry()Returns the token expiry- Since:
- V5.2
-
setIdToken
void setIdToken(java.lang.String idToken)Sets the value of the id token- Parameters:
idToken- value- Since:
- V5.2
-
getIdToken
java.lang.String getIdToken()Returns the value of the id token- Since:
- V5.2
-
setTokenType
void setTokenType(java.lang.String tokenType)Sets the value of the token type e.g Bearer- Parameters:
tokenType- value- Since:
- V5.2
-
getTokenType
java.lang.String getTokenType()Returns the value the token type e.g Bearer- Since:
- V5.2
-
getJWToken
Returns the parsed JWT from the ID user token. The JWT token can only be parsed if the id_token is returned from the OAuth token request- Throws:
com.ebasetech.ufs.runtime.security.jwt.InvalidJWTokenException- if there is an error parsing the token or the id is not set- Since:
- V5.6
- See Also:
getIdToken()
-
getOAuthId
java.lang.String getOAuthId()- Returns:
- the OAuth configuration id configured on the server admin for these OAuth access tokens
- Since:
- V5.6
-