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.String getAccessToken()
    Returns the value of the access token
    java.lang.String getIdToken()
    Returns the value of the id token
    JWT getJWToken()
    Returns the parsed JWT from the ID user token.
    java.lang.String getOAuthId()  
    java.lang.String getRefreshToken()
    Returns the value of the refresh token
    long getTokenExpiry()
    Returns the token expiry
    java.lang.String getTokenType()
    Returns the value the token type e.g Bearer
    void setAccessToken​(java.lang.String accessToken)
    Sets the value of the access token
    void setIdToken​(java.lang.String idToken)
    Sets the value of the id token
    void setRefreshToken​(java.lang.String refreshToken)
    Sets the value of the refresh token
    void setTokenExpiry​(long tokenExpiry)
    Sets the token expiry
    void setTokenType​(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

      JWT getJWToken() throws com.ebasetech.ufs.runtime.security.jwt.InvalidJWTokenException
      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