Class OAuth2ClientCredentials

java.lang.Object
com.okta.sdk.resource.client.auth.OAuth
com.okta.sdk.impl.oauth2.OAuth2ClientCredentials
All Implemented Interfaces:
ClientCredentials<OAuth2AccessToken>, Authentication

public class OAuth2ClientCredentials extends OAuth implements ClientCredentials<OAuth2AccessToken>
This implementation represents client credentials specific to OAuth2 Authentication scheme.
Since:
1.6.0
  • Constructor Details

  • 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 interface Authentication
      Overrides:
      applyToParams in class OAuth
      Parameters:
      queryParams - List of query parameters
      headerParams - Map of header parameters
      cookieParams - Map of cookie parameters
    • refreshOAuth2AccessToken

      public void refreshOAuth2AccessToken()
    • getCredentials

      public OAuth2AccessToken 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 interface ClientCredentials<OAuth2AccessToken>
      Returns:
      the client credentials plaintext secret
    • setCredentials

      public void setCredentials(OAuth2AccessToken oAuth2AccessToken)
    • toString

      public String toString()
      Overrides:
      toString in class Object