Class TokenClientCredentials

java.lang.Object
com.okta.sdk.authc.credentials.TokenClientCredentials
All Implemented Interfaces:
ClientCredentials<String>

public class TokenClientCredentials extends Object implements ClientCredentials<String>
This implementation represents the api key that is used to authenticate a Tenant in Okta.
Since:
0.5.0
  • Constructor Details

    • TokenClientCredentials

      public TokenClientCredentials(String secret)
  • Method Details

    • getCredentials

      public String 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<String>
      Returns:
      the client credentials plaintext secret
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object