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 DecodedSecret
createForHashedSecret(SecretVerifier verifier)
Creates a new decoded hashed secret.static DecodedSecret
createForPlainSecret(String plainValue)
Creates a new decoded plain secret.boolean
equals(Object o)
String
getEncodedValue()
Returns the encoded (stored) value.DecodedSecret
withEncodedValue(String encodedValue)
Returns a new decoded secret associating the specified encoded (stored) value with it.DecodedSecret
withExpiration(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,null
if not specified.- Returns:
- The new decoded secret.
-
getEncodedValue
public String getEncodedValue()
Returns the encoded (stored) value.- Returns:
- The encoded value,
null
if 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,null
if not specified.- Returns:
- The new decoded secret.
-
equals
public boolean equals(Object o)
- Overrides:
equals
in 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.
-
-