com.holonplatform.jaxrs.server.auth

## Interface JaxrsAuthenticationInspector

- All Superinterfaces:
    com.holonplatform.auth.AuthenticationInspector

      public interface JaxrsAuthenticationInspector
      extends com.holonplatform.auth.AuthenticationInspector

  An `AuthenticationInspector` which can be used to inspect an `Authentication` based security context using the standard JAX-RS `SecurityContext`.
  Since:
    5.1.0

- - ### Method Summary

    All Methods Static Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `static JaxrsAuthenticationInspector` | `of(javax.ws.rs.core.SecurityContext securityContext)` Create a `JaxrsAuthenticationInspector` using given JAX-RS `SecurityContext`.

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

      `getAuthentication, isAuthenticated, isPermitted, isPermitted, isPermitted, isPermittedAny, isPermittedAny, isPermittedAny, requireAuthentication`

- - ### Method Detail

    - #### of

          static JaxrsAuthenticationInspector of(javax.ws.rs.core.SecurityContext securityContext)

      Create a `JaxrsAuthenticationInspector` using given JAX-RS `SecurityContext`.

      The default JAX-RS AuthenticationInspector checks if the security context principal is available and it is an `Authentication` compatible instance. Regarding the permission control, if the given security context is an `AuthenticationInspector` itself, the permission check is directly delegated to it. Otherwise, the `Permission.getPermission()` method is used to obtain the permission as a String role representation and the authorization control is performed using the `SecurityContext.isUserInRole(String)` method.

      Parameters:
        `securityContext` - The SecurityContext (not null)
      Returns:
        A new `JaxrsAuthenticationInspector` for given security context

Copyright © 2019 The Holon Platform. All rights reserved.