Package io.smallrye.config
Interface Secret<T>
- Type Parameters:
T- the secret type
public interface Secret<T>
A container type to mark a
ConfigMapping member as a Secret value.
A Secret value modifies the behaviour of the config system by:
- Omitting the name of the secret in
SmallRyeConfig.getPropertyNames() - Omitting the name and value of the secret in the mapping
toStringmethod - Throwing a
SecurityExceptionwhen trying to retrieve the value viaSmallRyeConfigprogrammatic API
ConfigMapping is still capable of performing the mapping without these restrictions, and the secret value
is available for retrieval in its declared member:
@ConfigMapping(prefix = "credentials")
public interface Credentials {
String username();
Secret<String> password();
}
A Secret can be of any type that can be converted by a registered
Converter of the same type.- See Also:
-
Method Summary