Class Credentials.Builder

java.lang.Object
com.northconcepts.datapipeline.security.Credentials.Builder
Enclosing class:
Credentials

public static final class Credentials.Builder extends Object
Assembles Credentials from key-value pairs and an optional expiry; see Credentials.builder().
  • Method Details

    • set

      public Credentials.Builder set(String key, String value)
      Sets the value for the given key or removes the key when the value is null.
    • set

      public Credentials.Builder set(String key, char[] value)
      Sets a copy of the value for the given key or removes the key when the value is null; the caller may wipe its own array afterwards.
    • setExpiresOn

      public Credentials.Builder setExpiresOn(long expiresOnMilliseconds)
      Sets the time in milliseconds when these credentials expire or zero (0) if no expiry is known.
    • build

      public Credentials build()
      Returns new credentials holding copies of the values set so far.