Enum PropertyFormatBase64
- java.lang.Object
-
- java.lang.Enum<PropertyFormatBase64>
-
- org.forgerock.secrets.propertyresolver.PropertyFormatBase64
-
- All Implemented Interfaces:
Serializable
,Comparable<PropertyFormatBase64>
,SecretPropertyFormat
,SecretDecoder
public enum PropertyFormatBase64 extends Enum<PropertyFormatBase64> implements SecretPropertyFormat
Decodes secrets in raw base64 format. Such secrets are not encrypted or integrity protected. Typically this format should only be used for development purposes or for initial "bootstrap" secrets that are read from a secure location (e.g., Docker or Kubernetes secrets).
-
-
Field Summary
-
Fields inherited from interface org.forgerock.secrets.SecretDecoder
RAW
-
Fields inherited from interface org.forgerock.secrets.propertyresolver.SecretPropertyFormat
PLAIN
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description SecretBuilder
decode(String propertyValue)
Decodes the input property value, setting relevant properties on aSecretBuilder
object.static PropertyFormatBase64
valueOf(String name)
Returns the enum constant of this type with the specified name.static PropertyFormatBase64[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.-
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
-
Methods inherited from interface org.forgerock.secrets.propertyresolver.SecretPropertyFormat
decodeToPromise, decodeToPromise
-
-
-
-
Enum Constant Detail
-
BASE64
public static final PropertyFormatBase64 BASE64
Traditional base64 encoding.
-
BASE64URL
public static final PropertyFormatBase64 BASE64URL
URL-safe base64 encoding.
-
-
Method Detail
-
values
public static PropertyFormatBase64[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (PropertyFormatBase64 c : PropertyFormatBase64.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static PropertyFormatBase64 valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
decode
public SecretBuilder decode(String propertyValue)
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.
-
-