com.holonplatform.auth.internal

## Class DefaultCredentials.CredentialsBuilder

- java.lang.Object
- - com.holonplatform.auth.internal.DefaultCredentials.CredentialsBuilder

- All Implemented Interfaces:
    Credentials.Builder
  Enclosing class:
    DefaultCredentials

      public static class DefaultCredentials.CredentialsBuilder
      extends Object
      implements Credentials.Builder

  Default `Builder` implementation.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `CredentialsBuilder()` Constrcuctor

  - ### Method Summary

    All Methods Instance Methods Concrete 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)

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### CredentialsBuilder

          public CredentialsBuilder()

      Constrcuctor

  - ### Method Detail

    - #### secret

          public Credentials.Builder secret(String secret)

      Description copied from interface: `Credentials.Builder`
      Set secret (e.g. password)
      Specified by:
        `secret` in interface `Credentials.Builder`
      Parameters:
        `secret` - Secret to set
      Returns:
        this

    - #### secret

          public Credentials.Builder secret(byte[] secret)

      Description copied from interface: `Credentials.Builder`
      Set secret (e.g. password)
      Specified by:
        `secret` in interface `Credentials.Builder`
      Parameters:
        `secret` - Secret to set as byte array
      Returns:
        this

    - #### hashAlgorithm

          public Credentials.Builder hashAlgorithm(String hashAlgorithm)

      Description copied from interface: `Credentials.Builder`
      Set hash algorithm name used to encode secret
      Specified by:
        `hashAlgorithm` in interface `Credentials.Builder`
      Parameters:
        `hashAlgorithm` - Hash algorithm name
      Returns:
        this

    - #### hashIterations

          public Credentials.Builder hashIterations(int hashIterations)

      Description copied from interface: `Credentials.Builder`
      Set hash iterations performed for secret encoding
      Specified by:
        `hashIterations` in interface `Credentials.Builder`
      Parameters:
        `hashIterations` - Hash iterations
      Returns:
        this

    - #### salt

          public Credentials.Builder salt(String salt)

      Description copied from interface: `Credentials.Builder`
      Set salt data used to hash secret
      Specified by:
        `salt` in interface `Credentials.Builder`
      Parameters:
        `salt` - Salt string
      Returns:
        this

    - #### salt

          public Credentials.Builder salt(byte[] salt)

      Description copied from interface: `Credentials.Builder`
      Set salt data used to hash secret
      Specified by:
        `salt` in interface `Credentials.Builder`
      Parameters:
        `salt` - Salt data as byte array
      Returns:
        this

    - #### expireDate

          public Credentials.Builder expireDate(Date expireDate)

      Description copied from interface: `Credentials.Builder`
      Set credential expire date
      Specified by:
        `expireDate` in interface `Credentials.Builder`
      Parameters:
        `expireDate` - Expire date
      Returns:
        this

    - #### base64Encoded

          public Credentials.Builder base64Encoded()

      Description copied from interface: `Credentials.Builder`
      Set secret is encoded using Base64. If hash algorithm is specified, any salt data will be considered Base64 encoded too.
      Specified by:
        `base64Encoded` in interface `Credentials.Builder`
      Returns:
        this

    - #### hexEncoded

          public Credentials.Builder hexEncoded()

      Description copied from interface: `Credentials.Builder`
      Set secret is encoded using hexademical representation
      Specified by:
        `hexEncoded` in interface `Credentials.Builder`
      Returns:
        this

    - #### build

          public Credentials build()

      Description copied from interface: `Credentials.Builder`
      Build Credentials instance
      Specified by:
        `build` in interface `Credentials.Builder`
      Returns:
        Credentials

Copyright © 2019 The Holon Platform. All rights reserved.