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 booleanequals(java.lang.Object o)java.lang.StringgetCredentials()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.inthashCode()java.lang.StringtoString()
-
-
-
Method Detail
-
getCredentials
public java.lang.String getCredentials()
Description copied from interface:ClientCredentialsReturns 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:
getCredentialsin interfaceClientCredentials<java.lang.String>- Returns:
- the client credentials plaintext secret
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
-