Package com.boomi.connector.api
Interface OAuth2Token
-
- All Known Implementing Classes:
OAuth2TestTokenImpl
public interface OAuth2Token
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description String
createAccessTokenRequestHeaderValue(HttpURLConnection httpURLConnection)
Gets the formatted HTTP Authorization Header value for the OAuth 2.0 Access Token.String
getAccessToken()
Get the OAuth 2.0 access token stringString
getAccessTokenType()
Get the OAuth 2.0 Access Token type.OAuth2Context
getOAuth2Context()
Convenience method to get the OAuth2Context from the OAuth2TokenString
getProperty(String key)
Get a property from the OAuth 2.0 Access Token response
-
-
-
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
-
-