Package com.okta.sdk.authc.credentials
Class TokenClientCredentials
- java.lang.Object
-
- com.okta.sdk.authc.credentials.TokenClientCredentials
-
- All Implemented Interfaces:
ClientCredentials<java.lang.String>
public class TokenClientCredentials extends java.lang.Object implements ClientCredentials<java.lang.String>
This implementation represents the api key that is used to authenticate a Tenant in Okta.- Since:
- 0.5.0
-
-
Constructor Summary
Constructors Constructor Description TokenClientCredentials(java.lang.String secret)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
java.lang.String
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.int
hashCode()
java.lang.String
toString()
-
-
-
Method Detail
-
getCredentials
public java.lang.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 interfaceClientCredentials<java.lang.String>
- Returns:
- the client credentials plaintext secret
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
-