Class PermitAllAuthorizer<P extends Principal>

java.lang.Object
io.dropwizard.auth.PermitAllAuthorizer<P>
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 Details

    • PermitAllAuthorizer

      public PermitAllAuthorizer()
  • Method Details

    • authorize

      public boolean authorize(P principal, String role, @Nullable jakarta.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