com.holonplatform.auth

## Interface Authentication.Builder

- Enclosing interface:
    Authentication

      public static interface Authentication.Builder

  Builder to create `Authentication` instances.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `Authentication` | `build()` Create Authentication instance
    `default <T> Authentication.Builder` | `parameter(ConfigProperty<T> property, T value)` Deprecated. Use `withParameter(ConfigProperty, Object)`
    `default Authentication.Builder` | `parameter(String name, Object value)` Deprecated. Use `withParameter(String, Object)`
    `default Authentication.Builder` | `permission(Permission permission)` Deprecated. Use `withPermission(Permission)`
    `default Authentication.Builder` | `permission(String permission)` Deprecated. Use `withPermission(String)`
    `Authentication.Builder` | `root(boolean root)` Set whether authentication is considered a `root` principal, for which permission checking is always skipped, assuming that any permission is granted.
    `Authentication.Builder` | `scheme(String scheme)` Set the authentication scheme with which this authentication was produced.
    `<T> Authentication.Builder` | `withParameter(ConfigProperty<T> property, T value)` Add an authentication parameter using a `ConfigProperty` an `ConfigProperty.getKey()` as parameter name
    `Authentication.Builder` | `withParameter(String name, Object value)` Add an authentication parameter.
    `Authentication.Builder` | `withPermission(Permission permission)` Add a permission granted to Authentication
    `Authentication.Builder` | `withPermission(String permission)` Add a permission granted to Authentication using String representation.

- - ### Method Detail

    - #### scheme

          Authentication.Builder scheme(String scheme)

      Set the authentication scheme with which this authentication was produced.
      Parameters:
        `scheme` - Authentication scheme name
      Returns:
        this

    - #### root

          Authentication.Builder root(boolean root)

      Set whether authentication is considered a `root` principal, for which permission checking is always skipped, assuming that any permission is granted.
      Parameters:
        `root` - `true` to set authentication as `root` principal
      Returns:
        this

    - #### withParameter

          Authentication.Builder withParameter(String name,
                                               Object value)

      Add an authentication parameter.
      Parameters:
        `name` - Parameter name (not null)
        `value` - Parameter value
      Returns:
        this

    - #### parameter

          @Deprecated
          default Authentication.Builder parameter(String name,
                                                                Object value)

      Deprecated. Use `withParameter(String, Object)`
      Add an authentication parameter
      Parameters:
        `name` - Parameter name (not null)
        `value` - Parameter value
      Returns:
        this

    - #### withParameter

          <T> Authentication.Builder withParameter(ConfigProperty<T> property,
                                                   T value)

      Add an authentication parameter using a `ConfigProperty` an `ConfigProperty.getKey()` as parameter name
      Type Parameters:
        `T` - Property type
      Parameters:
        `property` - ConfigProperty to obtain parameter name (not null)
        `value` - Parameter value
      Returns:
        this

    - #### parameter

          @Deprecated
          default <T> Authentication.Builder parameter(ConfigProperty<T> property,
                                                                    T value)

      Deprecated. Use `withParameter(ConfigProperty, Object)`
      Add an authentication parameter using a `ConfigProperty` an `ConfigProperty.getKey()` as parameter name
      Type Parameters:
        `T` - Property type
      Parameters:
        `property` - ConfigProperty to obtain parameter name (not null)
        `value` - Parameter value
      Returns:
        this

    - #### withPermission

          Authentication.Builder withPermission(Permission permission)

      Add a permission granted to Authentication
      Parameters:
        `permission` - Permission to add (not null)
      Returns:
        this

    - #### permission

          @Deprecated
          default Authentication.Builder permission(Permission permission)

      Deprecated. Use `withPermission(Permission)`
      Add a permission granted to Authentication
      Parameters:
        `permission` - Permission to add (not null)
      Returns:
        this

    - #### withPermission

          Authentication.Builder withPermission(String permission)

      Add a permission granted to Authentication using String representation.
      Parameters:
        `permission` - Permission string to add (not null)
      Returns:
        this

    - #### permission

          @Deprecated
          default Authentication.Builder permission(String permission)

      Deprecated. Use `withPermission(String)`
      Add a permission granted to Authentication using String representation.
      Parameters:
        `permission` - Permission string to add (not null)
      Returns:
        this

    - #### build

          Authentication build()

      Create Authentication instance
      Returns:
        Authentication

Copyright © 2019 The Holon Platform. All rights reserved.