com.holonplatform.auth

## Interface Credentials.Builder

- All Known Implementing Classes:
    DefaultCredentials.CredentialsBuilder
  Enclosing interface:
    Credentials

      public static interface Credentials.Builder

  Builder to create `Credentials` instances.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `Credentials.Builder` | `base64Encoded()` Set secret is encoded using Base64.
    `Credentials` | `build()` Build Credentials instance
    `Credentials.Builder` | `expireDate(Date expireDate)` Set credential expire date
    `Credentials.Builder` | `hashAlgorithm(String hashAlgorithm)` Set hash algorithm name used to encode secret
    `Credentials.Builder` | `hashIterations(int hashIterations)` Set hash iterations performed for secret encoding
    `Credentials.Builder` | `hexEncoded()` Set secret is encoded using hexademical representation
    `Credentials.Builder` | `salt(byte[] salt)` Set salt data used to hash secret
    `Credentials.Builder` | `salt(String salt)` Set salt data used to hash secret
    `Credentials.Builder` | `secret(byte[] secret)` Set secret (e.g. password)
    `Credentials.Builder` | `secret(String secret)` Set secret (e.g. password)

- - ### Method Detail

    - #### secret

          Credentials.Builder secret(String secret)

      Set secret (e.g. password)
      Parameters:
        `secret` - Secret to set
      Returns:
        this

    - #### secret

          Credentials.Builder secret(byte[] secret)

      Set secret (e.g. password)
      Parameters:
        `secret` - Secret to set as byte array
      Returns:
        this

    - #### hashAlgorithm

          Credentials.Builder hashAlgorithm(String hashAlgorithm)

      Set hash algorithm name used to encode secret
      Parameters:
        `hashAlgorithm` - Hash algorithm name
      Returns:
        this

    - #### hashIterations

          Credentials.Builder hashIterations(int hashIterations)

      Set hash iterations performed for secret encoding
      Parameters:
        `hashIterations` - Hash iterations
      Returns:
        this

    - #### salt

          Credentials.Builder salt(String salt)

      Set salt data used to hash secret
      Parameters:
        `salt` - Salt string
      Returns:
        this

    - #### salt

          Credentials.Builder salt(byte[] salt)

      Set salt data used to hash secret
      Parameters:
        `salt` - Salt data as byte array
      Returns:
        this

    - #### expireDate

          Credentials.Builder expireDate(Date expireDate)

      Set credential expire date
      Parameters:
        `expireDate` - Expire date
      Returns:
        this

    - #### base64Encoded

          Credentials.Builder base64Encoded()

      Set secret is encoded using Base64. If hash algorithm is specified, any salt data will be considered Base64 encoded too.
      Returns:
        this

    - #### hexEncoded

          Credentials.Builder hexEncoded()

      Set secret is encoded using hexademical representation
      Returns:
        this

    - #### build

          Credentials build()

      Build Credentials instance
      Returns:
        Credentials

Copyright © 2019 The Holon Platform. All rights reserved.