Package com.okta.sdk.impl.oauth2
Class OAuth2ClientCredentials
java.lang.Object
com.okta.sdk.resource.client.auth.OAuth
com.okta.sdk.impl.oauth2.OAuth2ClientCredentials
- All Implemented Interfaces:
ClientCredentials<OAuth2AccessToken>
,Authentication
This implementation represents client credentials specific to OAuth2 Authentication scheme.
- Since:
- 1.6.0
-
Constructor Summary
ConstructorDescriptionOAuth2ClientCredentials
(AccessTokenRetrieverService accessTokenRetrieverService) -
Method Summary
Modifier and TypeMethodDescriptionvoid
applyToParams
(List<Pair> queryParams, Map<String, String> headerParams, Map<String, String> cookieParams) Apply authentication settings to header and query params.Returns the client credentials plaintext secret - a very secret, very private value that should never be disclosed to anyone other than the actual account holder.void
void
setCredentials
(OAuth2AccessToken oAuth2AccessToken) toString()
Methods inherited from class com.okta.sdk.resource.client.auth.OAuth
getAccessToken, setAccessToken
-
Constructor Details
-
OAuth2ClientCredentials
-
-
Method Details
-
applyToParams
public void applyToParams(List<Pair> queryParams, Map<String, String> headerParams, Map<String, String> cookieParams) Description copied from interface:Authentication
Apply authentication settings to header and query params.- Specified by:
applyToParams
in interfaceAuthentication
- Overrides:
applyToParams
in classOAuth
- Parameters:
queryParams
- List of query parametersheaderParams
- Map of header parameterscookieParams
- Map of cookie parameters
-
refreshOAuth2AccessToken
public void refreshOAuth2AccessToken() -
getCredentials
Description copied from interface:ClientCredentials
Returns the client credentials plaintext secret - a very secret, very private value that should never be disclosed to anyone other than the actual account holder. The secret value is mostly used for computing HMAC digests, but can also be used as a password for password-based key derivation and encryption.Security Notice
Okta SDKs automatically encrypt this value at rest and in SDK cache to prevent plaintext access. The plaintext value is only available by calling this method, which returns the plaintext (unencrypted) value. Please use this method with caution and only when necessary to ensure your API users' secrets remain secure.
- Specified by:
getCredentials
in interfaceClientCredentials<OAuth2AccessToken>
- Returns:
- the client credentials plaintext secret
-
setCredentials
-
toString
-