Interface SecretPropertyFormat
-
- All Superinterfaces:
SecretDecoder
- All Known Implementing Classes:
Base64PropertyFormat
,PemPropertyFormat
,PlainPropertyFormat
,PropertyFormatBase64
,SecretKeyPropertyFormat
public interface SecretPropertyFormat extends SecretDecoder
Defines the format of secrets loaded from configuration properties.
-
-
Field Summary
-
Fields inherited from interface org.forgerock.secrets.SecretDecoder
RAW
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description SecretBuilder
decode(String propertyValue)
Decodes the input property value, setting relevant properties on aSecretBuilder
object.default Promise<SecretBuilder,NoSuchSecretException>
decodeToPromise(byte[] data)
Decodes the data as a UTF-8 string and then callsdecodeToPromise(String)
to decode the string value.default Promise<SecretBuilder,NoSuchSecretException>
decodeToPromise(String propertyValue)
Decodes the input property value, setting relevant properties on aSecretBuilder
object.
-
-
-
Method Detail
-
decode
SecretBuilder decode(String propertyValue) throws NoSuchSecretException
Decodes the input property value, setting relevant properties on aSecretBuilder
object.- 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
default Promise<SecretBuilder,NoSuchSecretException> decodeToPromise(String propertyValue)
Decodes the input property value, setting relevant properties on aSecretBuilder
object.- Parameters:
propertyValue
- the value of the secret property.- Returns:
- a promise of the decoded secret information.
-
decodeToPromise
default Promise<SecretBuilder,NoSuchSecretException> decodeToPromise(byte[] data)
Decodes the data as a UTF-8 string and then callsdecodeToPromise(String)
to decode the string value.- Specified by:
decodeToPromise
in interfaceSecretDecoder
- Parameters:
data
- the raw secret data.- Returns:
- a promise of the decoded secret information.
-
-