Class PermitAllAuthorizer<P extends Principal>

  • Type Parameters:
    P - the type of the principal
    All Implemented Interfaces:
    Authorizer<P>

    public class PermitAllAuthorizer<P extends Principal>
    extends Object
    implements Authorizer<P>
    An Authorizer that grants access for any principal in any role.
    • Constructor Detail

      • PermitAllAuthorizer

        public PermitAllAuthorizer()
    • Method Detail

      • authorize

        public boolean authorize​(P principal,
                                 String role,
                                 @Nullable javax.ws.rs.container.ContainerRequestContext ctx)
        Description copied from interface: Authorizer
        Decides if access is granted for the given principal in the given role.
        Specified by:
        authorize in interface Authorizer<P extends Principal>
        Parameters:
        principal - a Principal object, representing a user
        role - a user role
        ctx - a request context.
        Returns:
        true, if the access is granted, false otherwise