Enum Class Constraint.Authorization

java.lang.Object
java.lang.Enum<Constraint.Authorization>
org.eclipse.jetty.security.Constraint.Authorization
All Implemented Interfaces:
Serializable, Comparable<Constraint.Authorization>, Constable
Enclosing interface:
Constraint

public static enum Constraint.Authorization extends Enum<Constraint.Authorization>
The Authorization applied to any authentication of the request/
  • Enum Constant Details

    • FORBIDDEN

      public static final Constraint.Authorization FORBIDDEN
      Access not allowed. Equivalent to Servlet AuthConstraint with no roles.
    • ALLOWED

      public static final Constraint.Authorization ALLOWED
      Access allowed. Equivalent to Servlet AuthConstraint without any Authorization.
    • ANY_USER

      public static final Constraint.Authorization ANY_USER
      Access allowed for any authenticated user regardless of role. Equivalent to Servlet role "**". For example, a web application that defines only an "admin" can use this Authorization to allow any authenticated user known to the configured LoginService, even if their roles are not know to the web application.
    • KNOWN_ROLE

      public static final Constraint.Authorization KNOWN_ROLE
      Access allowed for authenticated user with any known role. Equivalent to Servlet role "*". For example, a web application that defines roles "admin" and "user" might be deployed to a server with a configured LoginService that also has users with "operator" role. This constraint would not allow an "operator" user, as that role is not known to the web application.
    • SPECIFIC_ROLE

      public static final Constraint.Authorization SPECIFIC_ROLE
      Access allowed only for authenticated user with specific role(s).
    • INHERIT

      public static final Constraint.Authorization INHERIT
      Inherit the authorization from a less specific constraint when passed to Constraint.combine(Constraint, Constraint), otherwise act as ALLOWED.
  • Method Details

    • values

      public static Constraint.Authorization[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static Constraint.Authorization valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null