public class RoleBasedRestGuard extends RestGuard
RestGuard that uses role expressions to determine whether an authenticated user has access to a class or method.
The role expression supports the following constructs:
| Constructor and Description |
|---|
RoleBasedRestGuard(Set<String> declaredRoles,
String roleExpression)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
isRequestAllowed(RestRequest req)
Returns
|
public RoleBasedRestGuard(Set<String> declaredRoles, String roleExpression) throws ParseException
declaredRoles - List of possible declared roles.
roleExpression - The role expression.
ParseException - Invalid role expression syntax.public boolean isRequestAllowed(RestRequest req)
RestGuardisRequestAllowed in class RestGuardreq - The servlet request.Copyright © 2016–2019 The Apache Software Foundation. All rights reserved.