Class DecodedSecret
- java.lang.Object
-
- com.nimbusds.oauth2.sdk.auth.Secret
-
- com.nimbusds.openid.connect.provider.spi.secrets.DecodedSecret
-
- All Implemented Interfaces:
Serializable
public class DecodedSecret extends com.nimbusds.oauth2.sdk.auth.Secret
Decoded secret.- See Also:
- Serialized Form
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static DecodedSecretcreateForHashedSecret(SecretVerifier verifier)Creates a new decoded hashed secret.static DecodedSecretcreateForPlainSecret(String plainValue)Creates a new decoded plain secret.booleanequals(Object o)StringgetEncodedValue()Returns the encoded (stored) value.DecodedSecretwithEncodedValue(String encodedValue)Returns a new decoded secret associating the specified encoded (stored) value with it.DecodedSecretwithExpiration(Date expDate)Returns a new decoded secret with the specified expiration date.
-
-
-
Method Detail
-
withExpiration
public DecodedSecret withExpiration(Date expDate)
Returns a new decoded secret with the specified expiration date.- Parameters:
expDate- The expiration date,nullif not specified.- Returns:
- The new decoded secret.
-
getEncodedValue
public String getEncodedValue()
Returns the encoded (stored) value.- Returns:
- The encoded value,
nullif not specified.
-
withEncodedValue
public DecodedSecret withEncodedValue(String encodedValue)
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
public boolean equals(Object o)
- Overrides:
equalsin classcom.nimbusds.oauth2.sdk.auth.Secret
-
createForPlainSecret
public static DecodedSecret createForPlainSecret(String plainValue)
Creates a new decoded plain secret.- Parameters:
plainValue- The plain secret value. Must not be empty ornull.- Returns:
- The decoded secret.
-
createForHashedSecret
public static DecodedSecret createForHashedSecret(SecretVerifier verifier)
Creates a new decoded hashed secret.- Parameters:
verifier- Verifier to check secrets against the hash. Must not benull.- Returns:
- The decoded secret.
-
-