Authorization#KNOWN_ROLE
The core constraint is not the same as the servlet specification AuthConstraint, but it is
sufficiently capable to represent servlet constraints.
| Modifier and Type | Class and Description |
|---|---|
| public static enum | Constraint.
The Authorization applied to any authentication of the request/ |
| public static class | Constraint.
Builder for Constraint. |
| public static enum | Constraint.
The constraints requirement for the transport |
| Modifier and Type | Field and Description |
|---|---|
| public static final Constraint | ALLOWED
A static Constraint that has |
| public static final Constraint | ALLOWED_ANY_TRANSPORT
A static Constraint that has |
| public static final Constraint | ANY_TRANSPORT
A static Constraint that has |
| public static final Constraint | ANY_USER
A static Constraint that has |
| public static final Constraint | FORBIDDEN
A static Constraint that has |
| public static final Constraint | KNOWN_ROLE
A static Constraint that has |
| public static final Constraint | SECURE_TRANSPORT
A static Constraint that has |
| Modifier and Type | Method and Description |
|---|---|
| public static Constraint | Returns: the combined constraint.Constraint to combine leastSpecific, Constraint Constraint to combine mostSpecific)Combine two Constraints by using |
| public static Constraint | Returns: the combined constraint.The name to use for the combined constraint name, Constraint Constraint to combine leastSpecific, Constraint Constraint to combine mostSpecific)Combine two Constraints by:
|
| public static Constraint | |
| public static Constraint | |
| public static Constraint | |
| public static Constraint | |
| public static Constraint | from(String name, Constraint.
|
| public Constraint. | getAuthorization()
Returns: The |
| public String | |
| public Set | |
| public Constraint. |
| ALLOWED | back to summary |
|---|---|
| public static final Constraint ALLOWED A static Constraint that has | |
| ALLOWED_ANY_TRANSPORT | back to summary |
|---|---|
| public static final Constraint ALLOWED_ANY_TRANSPORT A static Constraint that has | |
| ANY_TRANSPORT | back to summary |
|---|---|
| public static final Constraint ANY_TRANSPORT A static Constraint that has | |
| ANY_USER | back to summary |
|---|---|
| public static final Constraint ANY_USER A static Constraint that has | |
| FORBIDDEN | back to summary |
|---|---|
| public static final Constraint FORBIDDEN A static Constraint that has | |
| KNOWN_ROLE | back to summary |
|---|---|
| public static final Constraint KNOWN_ROLE A static Constraint that has | |
| SECURE_TRANSPORT | back to summary |
|---|---|
| public static final Constraint SECURE_TRANSPORT A static Constraint that has | |
| combine | back to summary |
|---|---|
| public static Constraint combine(Constraint leastSpecific, Constraint mostSpecific) Combine two Constraints by using
| |
| combine | back to summary |
|---|---|
| public static Constraint combine(String name, Constraint leastSpecific, Constraint mostSpecific) Combine two Constraints by:
Typically the path of the constraint is used to determine which constraint is most specific. For example if the following paths mapped to Constraints as:
/* -> Authorization.FORBIDDEN,roles=[],Transport.SECURE
/admin/* -> Authorization.SPECIFIC_ROLE,roles=["admin"],Transport.INHERIT
The the Note that this combination is not equivalent to the combination done by the EE servlet specification.
| |
| from | back to summary |
|---|---|
| public static Constraint from(String... roles) | |
| from | back to summary |
|---|---|
| public static Constraint from(String name, Constraint. | |
| from | back to summary |
|---|---|
| public static Constraint from(String name, Constraint. | |
| from | back to summary |
|---|---|
| public static Constraint from(Constraint. | |
| from | back to summary |
|---|---|
| public static Constraint from(String name, Constraint. | |
| getAuthorization | back to summary |
|---|---|
public Constraint.
| |
| getName | back to summary |
|---|---|
public String getName()
| |
| getRoles | back to summary |
|---|---|
| public Set | |
| getTransport | back to summary |
|---|---|
public Constraint.
| |
| Modifier and Type | Field and Description |
|---|---|
| public static final Constraint. | ALLOWED
Access allowed. |
| public static final Constraint. | ANY_USER
Access allowed for any authenticated user regardless of role. |
| public static final Constraint. | FORBIDDEN
Access not allowed. |
| public static final Constraint. | INHERIT
Inherit the authorization from a less specific constraint when passed to |
| public static final Constraint. | KNOWN_ROLE
Access allowed for authenticated user with any known role. |
| public static final Constraint. | SPECIFIC_ROLE
Access allowed only for authenticated user with specific role(s). |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static Constraint. | |
| public static Constraint. |
| ALLOWED | back to summary |
|---|---|
| public static final Constraint. Access allowed. Equivalent to Servlet AuthConstraint without any Authorization. | |
| ANY_USER | back to summary |
|---|---|
| public static final Constraint. 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 | |
| FORBIDDEN | back to summary |
|---|---|
| public static final Constraint. Access not allowed. Equivalent to Servlet AuthConstraint with no roles. | |
| INHERIT | back to summary |
|---|---|
| public static final Constraint. Inherit the authorization from a less specific constraint when passed to | |
| KNOWN_ROLE | back to summary |
|---|---|
| public static final Constraint. 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 | |
| SPECIFIC_ROLE | back to summary |
|---|---|
| public static final Constraint. Access allowed only for authenticated user with specific role(s). | |
| Authorization | back to summary |
|---|---|
| private Authorization() | |
| valueOf | back to summary |
|---|---|
| public static Constraint. | |
| values | back to summary |
|---|---|
| public static Constraint. | |
| Modifier and Type | Field and Description |
|---|---|
| private Constraint. | |
| private String | |
| private Set | |
| private Constraint. |
| Access | Constructor and Description |
|---|---|
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public Constraint. | |
| public Constraint | |
| public Constraint. | |
| public String | |
| public Set | |
| public Constraint. | |
| public Constraint. | |
| public Constraint. | |
| public Constraint. |
| _authorization | back to summary |
|---|---|
| private Constraint. | |
| _name | back to summary |
|---|---|
| private String _name | |
| _roles | back to summary |
|---|---|
| private Set<String> _roles | |
| _transport | back to summary |
|---|---|
| private Constraint. | |
| Builder | back to summary |
|---|---|
| public Builder() | |
| Builder | back to summary |
|---|---|
| public Builder(Constraint constraint) | |
| authorization | back to summary |
|---|---|
| public Constraint. | |
| build | back to summary |
|---|---|
| public Constraint build() | |
| getAuthorization | back to summary |
|---|---|
| public Constraint. | |
| getName | back to summary |
|---|---|
| public String getName() | |
| getRoles | back to summary |
|---|---|
| public Set | |
| getTransport | back to summary |
|---|---|
| public Constraint. | |
| name | back to summary |
|---|---|
| public Constraint. | |
| roles | back to summary |
|---|---|
| public Constraint. | |
| transport | back to summary |
|---|---|
| public Constraint. | |
| Modifier and Type | Field and Description |
|---|---|
| public static final Constraint. | ANY
The transport can be either secure or not secure. |
| public static final Constraint. | INHERIT
Inherit the transport constraint from a less specific constraint when passed to |
| public static final Constraint. | SECURE
The transport must be secure (e.g. TLS) |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static Constraint. | |
| public static Constraint. |
| ANY | back to summary |
|---|---|
| public static final Constraint. The transport can be either secure or not secure. | |
| INHERIT | back to summary |
|---|---|
| public static final Constraint. Inherit the transport constraint from a less specific constraint when passed to | |
| SECURE | back to summary |
|---|---|
| public static final Constraint. The transport must be secure (e.g. TLS) | |
| Transport | back to summary |
|---|---|
| private Transport() | |
| valueOf | back to summary |
|---|---|
| public static Constraint. | |
| values | back to summary |
|---|---|
| public static Constraint. | |