Class JwtWrappedPropertyFormat
java.lang.Object
org.forgerock.secrets.propertyresolver.JwtWrappedPropertyFormat
- All Implemented Interfaces:
SecretPropertyFormat
,SecretDecoder
A
SecretPropertyFormat
that wraps another format, extracting the secret value from a JWT before
delegating to the wrapped format.-
Field Summary
Fields inherited from interface org.forgerock.secrets.SecretDecoder
RAW
Fields inherited from interface org.forgerock.secrets.propertyresolver.SecretPropertyFormat
PLAIN
-
Constructor Summary
ConstructorDescriptionJwtWrappedPropertyFormat
(SecretPropertyFormat format, ValidSecretsReference<? extends CryptoKey, NeverThrowsException> validSecretsReference) Constructs a newJwtWrappedPropertyFormat
. -
Method Summary
Modifier and TypeMethodDescriptionDecodes the input property value, setting relevant properties on aSecretBuilder
object.decodeToPromise
(String propertyValue) Decodes the input property value, setting relevant properties on aSecretBuilder
object.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.forgerock.secrets.propertyresolver.SecretPropertyFormat
decodeToPromise
-
Constructor Details
-
JwtWrappedPropertyFormat
public JwtWrappedPropertyFormat(SecretPropertyFormat format, ValidSecretsReference<? extends CryptoKey, NeverThrowsException> validSecretsReference) Constructs a newJwtWrappedPropertyFormat
.- Parameters:
format
- the format to delegate to after unwrapping the JWTvalidSecretsReference
- the secret to use for decrypting the JWT
-
-
Method Details
-
decode
Description copied from interface:SecretPropertyFormat
Decodes the input property value, setting relevant properties on aSecretBuilder
object.- Specified by:
decode
in interfaceSecretPropertyFormat
- Parameters:
propertyValue
- the value of the secret property.- Returns:
- the decoded secret information.
- Throws:
NoSuchSecretException
- If the property value does not contain a value that can be decoded.
-
decodeToPromise
Description copied from interface:SecretPropertyFormat
Decodes the input property value, setting relevant properties on aSecretBuilder
object.- Specified by:
decodeToPromise
in interfaceSecretPropertyFormat
- Parameters:
propertyValue
- the value of the secret property.- Returns:
- a promise of the decoded secret information.
-