|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
java.lang.Objectorg.eclipse.jetty.util.component.AbstractLifeCycle
org.eclipse.jetty.util.component.AggregateLifeCycle
org.eclipse.jetty.server.handler.AbstractHandler
org.eclipse.jetty.server.handler.AbstractHandlerContainer
org.eclipse.jetty.server.handler.HandlerWrapper
org.eclipse.jetty.security.SecurityHandler
org.eclipse.jetty.security.ConstraintSecurityHandler
public class ConstraintSecurityHandler
Handler to enforce SecurityConstraints. This implementation is servlet spec 3.0 compliant and precomputes the constraint combinations for runtime efficiency.
| 嵌套类摘要 |
|---|
| 从类 org.eclipse.jetty.security.SecurityHandler 继承的嵌套类/接口 |
|---|
SecurityHandler.NotChecked |
| 从类 org.eclipse.jetty.util.component.AbstractLifeCycle 继承的嵌套类/接口 |
|---|
AbstractLifeCycle.AbstractLifeCycleListener |
| 从接口 org.eclipse.jetty.util.component.LifeCycle 继承的嵌套类/接口 |
|---|
LifeCycle.Listener |
| 字段摘要 |
|---|
| 从类 org.eclipse.jetty.security.SecurityHandler 继承的字段 |
|---|
__NO_USER, __NOBODY |
| 从类 org.eclipse.jetty.server.handler.HandlerWrapper 继承的字段 |
|---|
_handler |
| 从类 org.eclipse.jetty.util.component.AbstractLifeCycle 继承的字段 |
|---|
_listeners, FAILED, RUNNING, STARTED, STARTING, STOPPED, STOPPING |
| 构造方法摘要 | |
|---|---|
ConstraintSecurityHandler()
|
|
| 方法摘要 | |
|---|---|
void |
addConstraintMapping(ConstraintMapping mapping)
Add a Constraint Mapping. |
void |
addRole(String role)
Add a Role definition. |
protected boolean |
checkUserDataPermissions(String pathInContext,
Request request,
Response response,
Object constraintInfo)
|
protected boolean |
checkWebResourcePermissions(String pathInContext,
Request request,
Response response,
Object constraintInfo,
UserIdentity userIdentity)
|
protected void |
configureRoleInfo(RoleInfo ri,
ConstraintMapping mapping)
Initialize or update the RoleInfo from the constraint |
static Constraint |
createConstraint()
|
static Constraint |
createConstraint(Constraint constraint)
|
static Constraint |
createConstraint(String name,
boolean authenticate,
String[] roles,
int dataConstraint)
Create a security constraint |
static Constraint |
createConstraint(String name,
HttpConstraintElement element)
|
static Constraint |
createConstraint(String name,
String[] rolesAllowed,
ServletSecurity.EmptyRoleSemantic permitOrDeny,
ServletSecurity.TransportGuarantee transport)
|
static List<ConstraintMapping> |
createConstraintsWithMappingsForPath(String name,
String pathSpec,
ServletSecurityElement securityElement)
Generate Constraints and ContraintMappings for the given url pattern and ServletSecurityElement |
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(Appendable out,
String indent)
|
List<ConstraintMapping> |
getConstraintMappings()
|
static List<ConstraintMapping> |
getConstraintMappingsForPath(String pathSpec,
List<ConstraintMapping> constraintMappings)
|
Set<String> |
getRoles()
|
protected boolean |
isAuthMandatory(Request baseRequest,
Response base_response,
Object constraintInfo)
|
boolean |
isStrict()
Get the strict mode. |
protected Object |
prepareConstraintInfo(String pathInContext,
Request request)
Find constraints that apply to the given path. |
protected void |
processConstraintMapping(ConstraintMapping mapping)
Create and combine the constraint with the existing processed constraints. |
protected void |
processConstraintMappingWithMethodOmissions(ConstraintMapping mapping,
Map<String,RoleInfo> mappings)
Constraints that name method omissions are dealt with differently. |
static List<ConstraintMapping> |
removeConstraintMappingsForPath(String pathSpec,
List<ConstraintMapping> constraintMappings)
Take out of the constraint mappings those that match the given path. |
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(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(List<ConstraintMapping> constraintMappings,
Set<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(Set<String> roles)
Set the known roles. |
void |
setStrict(boolean strict)
Set the strict mode of the security handler. |
| 从类 org.eclipse.jetty.server.handler.HandlerWrapper 继承的方法 |
|---|
destroy, expandChildren, getHandler, getHandlers, getNestedHandlerByClass, setHandler, setServer |
| 从类 org.eclipse.jetty.server.handler.AbstractHandlerContainer 继承的方法 |
|---|
expandHandler, findContainerOf, getChildHandlerByClass, getChildHandlers, getChildHandlersByClass |
| 从类 org.eclipse.jetty.server.handler.AbstractHandler 继承的方法 |
|---|
dumpThis, getServer |
| 从类 org.eclipse.jetty.util.component.AggregateLifeCycle 继承的方法 |
|---|
addBean, addBean, contains, dump, dump, dump, dump, dumpObject, dumpStdErr, getBean, getBeans, getBeans, isManaged, manage, removeBean, removeBeans, unmanage |
| 从类 org.eclipse.jetty.util.component.AbstractLifeCycle 继承的方法 |
|---|
addLifeCycleListener, getState, getState, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stop |
| 从类 java.lang.Object 继承的方法 |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| 从接口 org.eclipse.jetty.util.component.LifeCycle 继承的方法 |
|---|
addLifeCycleListener, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stop |
| 构造方法详细信息 |
|---|
public ConstraintSecurityHandler()
| 方法详细信息 |
|---|
public static Constraint createConstraint()
public static Constraint createConstraint(Constraint constraint)
constraint -
public static Constraint createConstraint(String name,
boolean authenticate,
String[] roles,
int dataConstraint)
name - authenticate - roles - dataConstraint -
public static Constraint createConstraint(String name,
HttpConstraintElement element)
name - element -
public static Constraint createConstraint(String name,
String[] rolesAllowed,
ServletSecurity.EmptyRoleSemantic permitOrDeny,
ServletSecurity.TransportGuarantee transport)
name - rolesAllowed - permitOrDeny - transport -
public static List<ConstraintMapping> getConstraintMappingsForPath(String pathSpec,
List<ConstraintMapping> constraintMappings)
pathSpec - constraintMappings -
public static List<ConstraintMapping> removeConstraintMappingsForPath(String pathSpec,
List<ConstraintMapping> constraintMappings)
pathSpec - constraintMappings - a new list minus the matching constraints
public static List<ConstraintMapping> createConstraintsWithMappingsForPath(String name,
String pathSpec,
ServletSecurityElement securityElement)
name - pathSpec - securityElement -
public 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 List<ConstraintMapping> getConstraintMappings()
ConstraintAware 中的 getConstraintMappingspublic Set<String> getRoles()
ConstraintAware 中的 getRolespublic void setConstraintMappings(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.x
public void setConstraintMappings(List<ConstraintMapping> constraintMappings,
Set<String> roles)
ConstraintAware 中的 setConstraintMappingsconstraintMappings - The constraintMappings to set.roles - The known roles (or null to determine them from the mappings)public void setRoles(Set<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)
ConstraintAware 复制的描述
ConstraintAware 中的 addConstraintMappingConstraintAware.addConstraintMapping(org.eclipse.jetty.security.ConstraintMapping)public void addRole(String role)
ConstraintAware 复制的描述
ConstraintAware 中的 addRoleConstraintAware.addRole(java.lang.String)
protected void doStart()
throws Exception
AggregateLifeCycle 复制的描述
SecurityHandler 中的 doStartExceptionSecurityHandler.doStart()
protected void doStop()
throws Exception
AggregateLifeCycle 复制的描述
SecurityHandler 中的 doStopExceptionHandlerWrapper.doStop()protected void processConstraintMapping(ConstraintMapping mapping)
mapping -
protected void processConstraintMappingWithMethodOmissions(ConstraintMapping mapping,
Map<String,RoleInfo> mappings)
mapping - mappings -
protected void configureRoleInfo(RoleInfo ri,
ConstraintMapping mapping)
ri - mapping -
protected Object prepareConstraintInfo(String pathInContext,
Request request)
SecurityHandler 中的 prepareConstraintInfoSecurityHandler.prepareConstraintInfo(java.lang.String, org.eclipse.jetty.server.Request)
protected boolean checkUserDataPermissions(String pathInContext,
Request request,
Response response,
Object constraintInfo)
throws IOException
SecurityHandler 中的 checkUserDataPermissionsIOExceptionSecurityHandler.checkUserDataPermissions(java.lang.String, org.eclipse.jetty.server.Request, org.eclipse.jetty.server.Response, java.lang.Object)
protected boolean isAuthMandatory(Request baseRequest,
Response base_response,
Object constraintInfo)
SecurityHandler 中的 isAuthMandatorySecurityHandler.isAuthMandatory(org.eclipse.jetty.server.Request, org.eclipse.jetty.server.Response, java.lang.Object)
protected boolean checkWebResourcePermissions(String pathInContext,
Request request,
Response response,
Object constraintInfo,
UserIdentity userIdentity)
throws IOException
SecurityHandler 中的 checkWebResourcePermissionsIOExceptionSecurityHandler.checkWebResourcePermissions(java.lang.String, org.eclipse.jetty.server.Request, org.eclipse.jetty.server.Response, java.lang.Object, org.eclipse.jetty.server.UserIdentity)
public void dump(Appendable out,
String indent)
throws IOException
Dumpable 中的 dumpAbstractHandlerContainer 中的 dumpIOException
|
||||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||