@Provider @Priority(value=2000) public class WebAcFilter extends Object implements ContainerRequestFilter, ContainerResponseFilter
ContainerRequestFilter that implements WebAC-based authorization.| Modifier and Type | Field and Description |
|---|---|
static String |
CONFIG_AUTH_CHALLENGES
The configuration key controlling which WWW-Authenticate challenges are provided on 401 errors.
|
static String |
CONFIG_AUTH_REALM
The configuration key controlling the realm used in a WWW-Authenticate header, or 'trellis' by default.
|
| Constructor and Description |
|---|
WebAcFilter(AccessControlService accessService)
Create a new WebAc-based auth filter.
|
WebAcFilter(AccessControlService accessService,
List<String> challengeTypes,
String realm)
Create a WebAc-based auth filter.
|
| Modifier and Type | Method and Description |
|---|---|
void |
filter(ContainerRequestContext ctx) |
void |
filter(ContainerRequestContext req,
ContainerResponseContext res) |
public static final String CONFIG_AUTH_CHALLENGES
Multiple challenges should be separated with commas.
public static final String CONFIG_AUTH_REALM
@Inject public WebAcFilter(AccessControlService accessService)
accessService - the access servicepublic WebAcFilter(AccessControlService accessService, List<String> challengeTypes, String realm)
accessService - the access servicechallengeTypes - the WWW-Authenticate challenge typesrealm - the authentication realmpublic void filter(ContainerRequestContext ctx) throws IOException
filter in interface ContainerRequestFilterIOExceptionpublic void filter(ContainerRequestContext req, ContainerResponseContext res) throws IOException
filter in interface ContainerResponseFilterIOException