com.holonplatform.auth.internal

## Class DefaultAuthorizer

- java.lang.Object
- - com.holonplatform.auth.internal.AbstractAuthorizer<Permission>
  - - com.holonplatform.auth.internal.DefaultAuthorizer

- All Implemented Interfaces:
    Authorizer<Permission>

      public class DefaultAuthorizer
      extends AbstractAuthorizer<Permission>

  Default `Authorizer` implementation.

  This Authorizer never throws exceptions, adopting the following behaviour:

  - if `null` `Authentication` is given, always returns `false`
  - if `null` or empty permissions are given, always returns `false`
  - if `Authentication` is not `null` and is `root`, always returns `true`
  - For other cases, permission checking is performed comparing Authentication granted permission with requested permissions using `Permission.equals(Object)` to compare a single permission to another
  Since:
    5.0.0

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `DefaultAuthorizer()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Class<? extends Permission>` | `getPermissionType()` Get supported `Permission` type

    - ### Methods inherited from class com.holonplatform.auth.internal.AbstractAuthorizer

      `isPermitted, isPermitted, isPermitted, isPermittedAny, isPermittedAny, isPermittedAny`

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

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

    - ### Methods inherited from interface com.holonplatform.auth.Authorizer

      `create`

- - ### Constructor Detail

    - #### DefaultAuthorizer

          public DefaultAuthorizer()

  - ### Method Detail

    - #### getPermissionType

          public Class<? extends Permission> getPermissionType()

      Description copied from interface: `Authorizer`
      Get supported `Permission` type
      Returns:
        Supported `Permission` type

Copyright © 2019 The Holon Platform. All rights reserved.