Interface OAuth2Context

  • All Known Implementing Classes:
    OAuth2TestContextImpl

    public interface OAuth2Context
    Interface to access OAuth 2.0 token configuration and to retrieve updated access tokens
    • Method Detail

      • getGrantType

        String getGrantType()
        Get the OAuth 2.0 Grant Type
        Returns:
        String grant type
      • getClientId

        String getClientId()
        Get the OAuth 2.0 Client ID
        Returns:
        String client id
      • getClientSecret

        String getClientSecret()
        Get the OAuth 2.0 Client Secret
        Returns:
        String encrypted client secret
      • getAuthorizationTokenUrl

        String getAuthorizationTokenUrl()
        Get the OAuth 2.0 Authorization Token URL The authorization token url is used retrieve the authorization code.
        Returns:
        String authorization token url
      • getAccessTokenUrl

        String getAccessTokenUrl()
        Get the OAuth 2.0 Access Token URL The Access Token URL is used when retrieving new access and refresh tokens.
        Returns:
        String access token url
      • isUseRefreshToken

        boolean isUseRefreshToken()
        Indicates if this OAuth 2.0 configuration uses refresh tokens
        Returns:
        boolean true if refresh tokens are used.
      • getAuthorizationParameters

        Map<String,​String> getAuthorizationParameters()
        Gets a map of any additional OAuth 2.0 authorization parameters These parameters are used when retrieving the authorization code during the initial access token retrieval
        Returns:
        Map<String, String> parameter name, parameter value
      • getAccessTokenParameters

        Map<String,​String> getAccessTokenParameters()
        Gets a map of any additional OAuth 2.0 access token parameters These parameters are used when retrieving the access token during the initial access token retrieval
        Returns:
        Map<String, String> parameter name, parameter value
      • getScope

        String getScope()
        Get the OAuth 2.0 Access Token scope
        Returns:
        String scope
      • getJwtAssertionParameters

        JwtAssertionParameters getJwtAssertionParameters()
        Get the claims used to build the JWT assertion.
        Returns:
        JWT Assertions object.
      • getOAuth2Token

        OAuth2Token getOAuth2Token​(boolean forceUpdate)
                            throws IOException
        Gets an up-to-date OAuth2Token. This method will check the expiration of the existing access token and update it if necessary and if a refresh token is available. If force update is true, then access token refresh will occur regardless of the expiration status.
        Parameters:
        forceUpdate - boolean. If true, will force update of OAuth 2.0 token.
        Returns:
        OAuth2Token property value or null if not found.
        Throws:
        IOException