Interface Authorizer<P extends Principal>

  • Type Parameters:
    P - the type of principals
    All Known Implementing Classes:
    CachingAuthorizer, PermitAllAuthorizer

    public interface Authorizer<P extends Principal>
    An interface for classes which authorize principal objects.
    • Method Detail

      • authorize

        boolean authorize​(P principal,
                          String role,
                          @Nullable jakarta.ws.rs.container.ContainerRequestContext requestContext)
        Decides if access is granted for the given principal in the given role.
        Parameters:
        principal - a Principal object, representing a user
        role - a user role
        requestContext - a request context.
        Returns:
        true, if the access is granted, false otherwise
        Since:
        2.0