Class OAuth2ClientCredentials

java.lang.Object
com.okta.sdk.impl.oauth2.OAuth2ClientCredentials
All Implemented Interfaces:
ClientCredentials<OAuth2AccessToken>

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

  • Method Details

    • 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)
    • getAccessTokenRetrieverService

      public AccessTokenRetrieverService getAccessTokenRetrieverService()
    • toString

      public String toString()
      Overrides:
      toString in class Object