public class OAuth2TestContextImpl extends Object implements OAuth2Context
OAuth2Context implementation This test context implementation should be added as a connection property
to test context| Constructor and Description |
|---|
OAuth2TestContextImpl(OAuth2TestConfig config)
Creates a new instance
|
| Modifier and Type | Method and Description |
|---|---|
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
|
String |
getAccessTokenUrl()
Get the OAuth 2.0 Access Token URL The Access Token URL is used when retrieving new access and refresh tokens.
|
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
|
String |
getAuthorizationTokenUrl()
Get the OAuth 2.0 Authorization Token URL The authorization token url is used retrieve the authorization code.
|
String |
getClientId()
Get the OAuth 2.0 Client ID
|
String |
getClientSecret()
Get the OAuth 2.0 Client Secret
|
String |
getGrantType()
Get the OAuth 2.0 Grant Type
|
JwtAssertionParameters |
getJwtAssertionParameters()
Get the claims used to build the JWT assertion.
|
OAuth2Token |
getOAuth2Token(boolean forceUpdate)
Retrieves the OAuth2Token.
|
String |
getRefreshToken()
Returns the refresh token as provided in config
|
String |
getScope()
Get the OAuth 2.0 Access Token scope
|
boolean |
isUseRefreshToken()
Indicates if this OAuth 2.0 configuration uses refresh tokens
|
public OAuth2TestContextImpl(OAuth2TestConfig config)
config - the OAuth2TestConfig for OAuth authenticationpublic String getGrantType()
OAuth2ContextgetGrantType in interface OAuth2Contextpublic String getClientId()
OAuth2ContextgetClientId in interface OAuth2Contextpublic String getClientSecret()
OAuth2ContextgetClientSecret in interface OAuth2Contextpublic String getAuthorizationTokenUrl()
OAuth2ContextgetAuthorizationTokenUrl in interface OAuth2Contextpublic String getAccessTokenUrl()
OAuth2ContextgetAccessTokenUrl in interface OAuth2Contextpublic boolean isUseRefreshToken()
OAuth2ContextisUseRefreshToken in interface OAuth2Contextpublic Map<String,String> getAuthorizationParameters()
OAuth2ContextgetAuthorizationParameters in interface OAuth2Contextpublic Map<String,String> getAccessTokenParameters()
OAuth2ContextgetAccessTokenParameters in interface OAuth2Contextpublic String getScope()
OAuth2ContextgetScope in interface OAuth2Contextpublic String getRefreshToken()
public OAuth2Token getOAuth2Token(boolean forceUpdate) throws IOException
getOAuth2Token in interface OAuth2ContextforceUpdate - boolean. If true, will force update of OAuth 2.0 token.IOExceptionpublic JwtAssertionParameters getJwtAssertionParameters()
OAuth2ContextgetJwtAssertionParameters in interface OAuth2Context