| Modifier and Type | Field and Description |
|---|---|
static String |
ANONYMOUS_USER
UserName used for anonymous
SecurityContext |
| Constructor and Description |
|---|
AuthorizationProvider() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
abortUnauthorized(javax.ws.rs.container.ContainerRequestContext requestContext) |
protected static org.apache.cxf.security.SecurityContext |
createAnonymousSC(String... roles)
Create a
SecurityContext for an unauthenticated user to return to the provider |
protected static org.apache.cxf.security.SecurityContext |
createSC(String user,
String... roles)
Create a
SecurityContext to return to the provider |
void |
filter(javax.ws.rs.container.ContainerRequestContext requestContext) |
protected abstract org.apache.cxf.security.SecurityContext |
handleAuthHeader(javax.ws.rs.container.ContainerRequestContext requestContext,
org.apache.cxf.message.Message msg,
String type,
String auth)
handle the presence of the Authorization header
|
protected abstract org.apache.cxf.security.SecurityContext |
handleOther(javax.ws.rs.container.ContainerRequestContext requestContext,
org.apache.cxf.message.Message msg,
javax.ws.rs.core.HttpHeaders head)
handle other auth methods like sessions, custom headers, etc
|
protected abstract boolean |
isAuthorizationMandatory() |
protected boolean |
sendWWWAuthenticate() |
public static final String ANONYMOUS_USER
SecurityContextpublic final void filter(javax.ws.rs.container.ContainerRequestContext requestContext)
throws IOException
filter in interface javax.ws.rs.container.ContainerRequestFilterIOExceptionprotected final void abortUnauthorized(javax.ws.rs.container.ContainerRequestContext requestContext)
protected boolean sendWWWAuthenticate()
protected abstract boolean isAuthorizationMandatory()
true if the request should fail if no valid user is foundprotected abstract org.apache.cxf.security.SecurityContext handleAuthHeader(javax.ws.rs.container.ContainerRequestContext requestContext,
org.apache.cxf.message.Message msg,
String type,
String auth)
requestContext - the CXF request contextmsg - the messagetype - the Authorization type (Basic|Bearer|...)auth - the auth part of the headerSecurityContext if logged in or nullprotected abstract org.apache.cxf.security.SecurityContext handleOther(javax.ws.rs.container.ContainerRequestContext requestContext,
org.apache.cxf.message.Message msg,
javax.ws.rs.core.HttpHeaders head)
requestContext - the CXF request contextmsg - the messagehead - the HTTP headersSecurityContext if logged in or nullprotected static org.apache.cxf.security.SecurityContext createSC(String user, String... roles)
SecurityContext to return to the provideruser - the user principalroles - the roles of the userSecurityContextprotected static org.apache.cxf.security.SecurityContext createAnonymousSC(String... roles)
SecurityContext for an unauthenticated user to return to the providerroles - the roles of the userSecurityContextCopyright © 2013–2015 Taimos GmbH. All rights reserved.