Interface OAuth2Token

    • Method Detail

      • getAccessToken

        String getAccessToken()
        Get the OAuth 2.0 access token string
        Returns:
        String access token
      • getAccessTokenType

        String getAccessTokenType()
        Get the OAuth 2.0 Access Token type. Possible values are bearer and mac
        Returns:
        String access token type
      • createAccessTokenRequestHeaderValue

        String createAccessTokenRequestHeaderValue​(HttpURLConnection httpURLConnection)
                                            throws IOException
        Gets the formatted HTTP Authorization Header value for the OAuth 2.0 Access Token. Will return bearer or mac access token headers based on the value of the access token type.
        Parameters:
        httpURLConnection - HttpURLConnection (not used for bearer tokens. required for mac tokens
        Returns:
        String Authorization header value
        Throws:
        IOException
      • getOAuth2Context

        OAuth2Context getOAuth2Context()
        Convenience method to get the OAuth2Context from the OAuth2Token
        Returns:
        OAuth2Context
      • getProperty

        String getProperty​(String key)
        Get a property from the OAuth 2.0 Access Token response
        Parameters:
        key - the property you would like to retrieve
        Returns:
        String the property value