com.holonplatform.auth

## Interface Realm.Builder

- Enclosing interface:
    Realm

      public static interface Realm.Builder

  Builder to create `Realm` instances.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `<T extends AuthenticationToken> Realm.Builder` | `authenticator(Authenticator<T> authenticator)` Register given `Authenticator` in Realm.
    `<P extends Permission> Realm.Builder` | `authorizer(Authorizer<P> authorizer)` Register given `Authorizer` in Realm.
    `Realm` | `build()` Build `Realm` instance
    `Realm.Builder` | `listener(Authentication.AuthenticationListener authenticationListener)` Register an AuthenticationListener for authentication events
    `Realm.Builder` | `name(String name)` Set Realm name
    `Realm.Builder` | `resolver(AuthenticationToken.AuthenticationTokenResolver<?> authenticationTokenResolver)` Add an `AuthenticationToken.AuthenticationTokenResolver` to translate `Message`s into `AuthenticationToken`s.
    `Realm.Builder` | `withDefaultAuthorizer()` Register the default `Authorizer`

- - ### Method Detail

    - #### name

          Realm.Builder name(String name)

      Set Realm name
      Parameters:
        `name` - Realm name to set
      Returns:
        this

    - #### authenticator

          <T extends AuthenticationToken> Realm.Builder authenticator(Authenticator<T> authenticator)

      Register given `Authenticator` in Realm.

      Registered Authenticators will be inspected in the order they were added to Realm to find the first one which is consistent with the `AuthenticationToken` type to process during authentication operations performed using `Authenticator.authenticate(AuthenticationToken)`.

      Type Parameters:
        `T` - Authentication token type
      Parameters:
        `authenticator` - Authenticator to add
      Returns:
        this

    - #### resolver

          Realm.Builder resolver(AuthenticationToken.AuthenticationTokenResolver<?> authenticationTokenResolver)

      Add an `AuthenticationToken.AuthenticationTokenResolver` to translate `Message`s into `AuthenticationToken`s.
      Parameters:
        `authenticationTokenResolver` - Resolver to add
      Returns:
        this

    - #### authorizer

          <P extends Permission> Realm.Builder authorizer(Authorizer<P> authorizer)

      Register given `Authorizer` in Realm.

      Registered Authorizers will be inspected in the order they were added to Realm to find the first one which is consistent with the `Permission` type to process during authorization checking performed using `isPermitted` methods.

      Type Parameters:
        `P` - Permission type
      Parameters:
        `authorizer` - Authorizer to add
      Returns:
        this

    - #### withDefaultAuthorizer

          Realm.Builder withDefaultAuthorizer()

      Register the default `Authorizer`
      Returns:
        this
      See Also:
        `Authorizer.create()`

    - #### listener

          Realm.Builder listener(Authentication.AuthenticationListener authenticationListener)

      Register an AuthenticationListener for authentication events
      Parameters:
        `authenticationListener` - AuthenticationListener to register
      Returns:
        this

    - #### build

          Realm build()

      Build `Realm` instance
      Returns:
        Realm

Copyright © 2017 The Holon Platform. All rights reserved.