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:

  1. Omitting the name of the secret in SmallRyeConfig.getPropertyNames()
  2. Omitting the name and value of the secret in the mapping toString method
  3. Throwing a SecurityException when trying to retrieve the value via SmallRyeConfig programmatic API
A 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

    Modifier and Type
    Method
    Description
    get()
    Get the actual value of the Secret.
  • Method Details

    • get

      T get()
      Get the actual value of the Secret.
      Returns:
      the actual value of the Secret.