public class OAuth2ClientCredentials extends OAuth implements ClientCredentials<OAuth2AccessToken>
Constructor and Description |
---|
OAuth2ClientCredentials(AccessTokenRetrieverService accessTokenRetrieverService) |
Modifier and Type | Method and Description |
---|---|
void |
applyToParams(List<Pair> queryParams,
Map<String,String> headerParams,
Map<String,String> cookieParams)
Apply authentication settings to header and query params.
|
OAuth2AccessToken |
getCredentials()
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 |
refreshOAuth2AccessToken() |
void |
setCredentials(OAuth2AccessToken oAuth2AccessToken) |
String |
toString() |
getAccessToken, setAccessToken
public OAuth2ClientCredentials(AccessTokenRetrieverService accessTokenRetrieverService)
public void applyToParams(List<Pair> queryParams, Map<String,String> headerParams, Map<String,String> cookieParams)
Authentication
applyToParams
in interface Authentication
applyToParams
in class OAuth
queryParams
- List of query parametersheaderParams
- Map of header parameterscookieParams
- Map of cookie parameterspublic void refreshOAuth2AccessToken()
public OAuth2AccessToken getCredentials()
ClientCredentials
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.
getCredentials
in interface ClientCredentials<OAuth2AccessToken>
public void setCredentials(OAuth2AccessToken oAuth2AccessToken)
Copyright © 2017–2023 Okta. All rights reserved.