Package org.eclipse.jetty.security
Enum Class Constraint.Authorization
- All Implemented Interfaces:
Serializable
,Comparable<Constraint.Authorization>
,Constable
- Enclosing interface:
- Constraint
The Authorization applied to any authentication of the request/
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionAccess allowed.Access allowed for any authenticated user regardless of role.Access not allowed.Inherit the authorization from a less specific constraint when passed toConstraint.combine(Constraint, Constraint)
, otherwise act asALLOWED
.Access allowed for authenticated user with any known role.Access allowed only for authenticated user with specific role(s). -
Method Summary
Modifier and TypeMethodDescriptionstatic Constraint.Authorization
Returns the enum constant of this class with the specified name.static Constraint.Authorization[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
FORBIDDEN
Access not allowed. Equivalent to Servlet AuthConstraint with no roles. -
ALLOWED
Access allowed. Equivalent to Servlet AuthConstraint without any 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 thisAuthorization
to allow any authenticated user known to the configuredLoginService
, even if their roles are not know to the web application. -
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 configuredLoginService
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
Access allowed only for authenticated user with specific role(s). -
INHERIT
Inherit the authorization from a less specific constraint when passed toConstraint.combine(Constraint, Constraint)
, otherwise act asALLOWED
.
-
-
Method Details
-
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
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 nameNullPointerException
- if the argument is null
-