public class ConstraintSecurityHandler extends SecurityHandler implements ConstraintAware
SecurityHandler.NotCheckedAbstractLifeCycle.AbstractLifeCycleListenerLifeCycle.Listener__NO_USER, __NOBODY_handler_listeners, FAILED, RUNNING, STARTED, STARTING, STOPPED, STOPPING| Constructor and Description |
|---|
ConstraintSecurityHandler() |
| Modifier and Type | Method and Description |
|---|---|
void |
addConstraintMapping(ConstraintMapping mapping)
Add a Constraint Mapping.
|
void |
addRole(java.lang.String role)
Add a Role definition.
|
protected boolean |
checkUserDataPermissions(java.lang.String pathInContext,
Request request,
Response response,
java.lang.Object constraintInfo) |
protected boolean |
checkWebResourcePermissions(java.lang.String pathInContext,
Request request,
Response response,
java.lang.Object constraintInfo,
UserIdentity userIdentity) |
protected void |
doStart()
Start the managed lifecycle beans in the order they were added.
|
protected void |
doStop()
Stop the joined lifecycle beans in the reverse order they were added.
|
void |
dump(java.lang.Appendable out,
java.lang.String indent) |
java.util.List<ConstraintMapping> |
getConstraintMappings() |
java.util.Set<java.lang.String> |
getRoles() |
protected boolean |
isAuthMandatory(Request baseRequest,
Response base_response,
java.lang.Object constraintInfo) |
boolean |
isStrict()
Get the strict mode.
|
protected java.lang.Object |
prepareConstraintInfo(java.lang.String pathInContext,
Request request) |
protected void |
processConstraintMapping(ConstraintMapping mapping) |
void |
setConstraintMappings(ConstraintMapping[] constraintMappings)
Process the constraints following the combining rules in Servlet 3.0 EA
spec section 13.7.1 Note that much of the logic is in the RoleInfo class.
|
void |
setConstraintMappings(java.util.List<ConstraintMapping> constraintMappings)
Process the constraints following the combining rules in Servlet 3.0 EA
spec section 13.7.1 Note that much of the logic is in the RoleInfo class.
|
void |
setConstraintMappings(java.util.List<ConstraintMapping> constraintMappings,
java.util.Set<java.lang.String> roles)
Process the constraints following the combining rules in Servlet 3.0 EA
spec section 13.7.1 Note that much of the logic is in the RoleInfo class.
|
void |
setRoles(java.util.Set<java.lang.String> roles)
Set the known roles.
|
void |
setStrict(boolean strict)
Set the strict mode of the security handler.
|
checkSecurity, findIdentityService, findLoginService, getAuthenticator, getAuthenticatorFactory, getAuthMethod, getCurrentSecurityHandler, getIdentityService, getInitParameter, getInitParameterNames, getLoginService, getRealmName, handle, isCheckWelcomeFiles, isSessionRenewedOnAuthentication, logout, setAuthenticator, setAuthenticatorFactory, setAuthMethod, setCheckWelcomeFiles, setIdentityService, setInitParameter, setLoginService, setRealmName, setSessionRenewedOnAuthenticationdestroy, expandChildren, getHandler, getHandlers, getNestedHandlerByClass, setHandler, setServerexpandHandler, findContainerOf, getChildHandlerByClass, getChildHandlers, getChildHandlersByClassdumpThis, getServeraddBean, addBean, contains, dump, dump, dump, dump, dumpObject, dumpStdErr, getBean, getBeans, getBeans, isManaged, manage, removeBean, removeBeans, unmanageaddLifeCycleListener, getState, getState, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stopclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddLifeCycleListener, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stoppublic boolean isStrict()
public void setStrict(boolean strict)
When in strict mode (the default), the full servlet specification will be implemented. If not in strict mode, some additional flexibility in configuration is allowed:
strict - the strict to setsetRoles(Set),
setConstraintMappings(List, Set)public java.util.List<ConstraintMapping> getConstraintMappings()
getConstraintMappings in interface ConstraintAwarepublic java.util.Set<java.lang.String> getRoles()
getRoles in interface ConstraintAwarepublic void setConstraintMappings(java.util.List<ConstraintMapping> constraintMappings)
constraintMappings - The constraintMappings to set, from which the set of known roles
is determined.public void setConstraintMappings(ConstraintMapping[] constraintMappings)
constraintMappings - The constraintMappings to set as array, from which the set of known roles
is determined. Needed to retain API compatibility for 7.xpublic void setConstraintMappings(java.util.List<ConstraintMapping> constraintMappings, java.util.Set<java.lang.String> roles)
setConstraintMappings in interface ConstraintAwareconstraintMappings - The constraintMappings to set.roles - The known roles (or null to determine them from the mappings)public void setRoles(java.util.Set<java.lang.String> roles)
setConstraintMappings(ConstraintMapping[]) or
setConstraintMappings(List, Set).roles - The known roles (or null to determine them from the mappings)setStrict(boolean)public void addConstraintMapping(ConstraintMapping mapping)
ConstraintAwareaddConstraintMapping in interface ConstraintAwareConstraintAware.addConstraintMapping(org.eclipse.jetty.security.ConstraintMapping)public void addRole(java.lang.String role)
ConstraintAwareaddRole in interface ConstraintAwareConstraintAware.addRole(java.lang.String)protected void doStart()
throws java.lang.Exception
AggregateLifeCycledoStart in class SecurityHandlerjava.lang.ExceptionSecurityHandler.doStart()protected void doStop()
throws java.lang.Exception
AggregateLifeCycledoStop in class SecurityHandlerjava.lang.ExceptionHandlerWrapper.doStop()protected void processConstraintMapping(ConstraintMapping mapping)
protected java.lang.Object prepareConstraintInfo(java.lang.String pathInContext,
Request request)
prepareConstraintInfo in class SecurityHandlerprotected boolean checkUserDataPermissions(java.lang.String pathInContext,
Request request,
Response response,
java.lang.Object constraintInfo)
throws java.io.IOException
checkUserDataPermissions in class SecurityHandlerjava.io.IOExceptionprotected boolean isAuthMandatory(Request baseRequest, Response base_response, java.lang.Object constraintInfo)
isAuthMandatory in class SecurityHandlerprotected boolean checkWebResourcePermissions(java.lang.String pathInContext,
Request request,
Response response,
java.lang.Object constraintInfo,
UserIdentity userIdentity)
throws java.io.IOException
checkWebResourcePermissions in class SecurityHandlerjava.io.IOExceptionpublic void dump(java.lang.Appendable out,
java.lang.String indent)
throws java.io.IOException
dump in interface Dumpabledump in class AbstractHandlerContainerjava.io.IOExceptionCopyright © 2013 FuseSource, Corp.. All Rights Reserved.