Class DecodedSecret
java.lang.Object
com.nimbusds.oauth2.sdk.auth.Secret
com.nimbusds.openid.connect.provider.spi.secrets.DecodedSecret
- All Implemented Interfaces:
Serializable
Decoded secret.
- See Also:
-
Field Summary
Fields inherited from class com.nimbusds.oauth2.sdk.auth.Secret
DEFAULT_BYTE_LENGTH -
Method Summary
Modifier and TypeMethodDescriptionstatic DecodedSecretcreateForHashedSecret(SecretVerifier verifier) Creates a new decoded hashed secret.static DecodedSecretcreateForPlainSecret(String plainValue) Creates a new decoded plain secret.boolean@Nullable StringReturns the encoded (stored) value.withEncodedValue(@Nullable String encodedValue) Returns a new decoded secret associating the specified encoded (stored) value with it.withExpiration(@Nullable Date expDate) Returns a new decoded secret with the specified expiration date.Methods inherited from class com.nimbusds.oauth2.sdk.auth.Secret
equalsSHA256Based, erase, expired, getExpirationDate, getSHA256, getValue, getValueBytes, hashCode
-
Method Details
-
withExpiration
Returns a new decoded secret with the specified expiration date.- Parameters:
expDate- The expiration date,nullif not specified.- Returns:
- The new decoded secret.
-
getEncodedValue
Returns the encoded (stored) value.- Returns:
- The encoded value,
nullif not specified.
-
withEncodedValue
Returns a new decoded secret associating the specified encoded (stored) value with it.- Parameters:
encodedValue- The encoded (stored) value,nullif not specified.- Returns:
- The new decoded secret.
-
equals
- Overrides:
equalsin classcom.nimbusds.oauth2.sdk.auth.Secret
-
createForPlainSecret
Creates a new decoded plain secret.- Parameters:
plainValue- The plain secret value. Must not be empty ornull.- Returns:
- The decoded secret.
-
createForHashedSecret
Creates a new decoded hashed secret.- Parameters:
verifier- Verifier to check secrets against the hash. Must not benull.- Returns:
- The decoded secret.
-