public class OAuth2TestContextImpl extends Object implements OAuth2Context
OAuth2Context
implementation This test context implementation should be added as a connection property
to test contextConstructor 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()
OAuth2Context
getGrantType
in interface OAuth2Context
public String getClientId()
OAuth2Context
getClientId
in interface OAuth2Context
public String getClientSecret()
OAuth2Context
getClientSecret
in interface OAuth2Context
public String getAuthorizationTokenUrl()
OAuth2Context
getAuthorizationTokenUrl
in interface OAuth2Context
public String getAccessTokenUrl()
OAuth2Context
getAccessTokenUrl
in interface OAuth2Context
public boolean isUseRefreshToken()
OAuth2Context
isUseRefreshToken
in interface OAuth2Context
public Map<String,String> getAuthorizationParameters()
OAuth2Context
getAuthorizationParameters
in interface OAuth2Context
public Map<String,String> getAccessTokenParameters()
OAuth2Context
getAccessTokenParameters
in interface OAuth2Context
public String getScope()
OAuth2Context
getScope
in interface OAuth2Context
public String getRefreshToken()
public OAuth2Token getOAuth2Token(boolean forceUpdate) throws IOException
getOAuth2Token
in interface OAuth2Context
forceUpdate
- boolean. If true, will force update of OAuth 2.0 token.IOException
public JwtAssertionParameters getJwtAssertionParameters()
OAuth2Context
getJwtAssertionParameters
in interface OAuth2Context