|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.wicketstuff.security.strategies.WaspAuthorizationStrategy
org.wicketstuff.security.strategies.ClassAuthorizationStrategy
org.wicketstuff.security.swarm.strategies.AbstractSwarmStrategy
org.wicketstuff.security.swarm.strategies.SwarmStrategy
public class SwarmStrategy
Implementation of a ClassAuthorizationStrategy. It allows for both simple logins as well
as multi level logins.
| Field Summary |
|---|
| Fields inherited from class org.wicketstuff.security.swarm.strategies.AbstractSwarmStrategy |
|---|
loginContainer |
| Fields inherited from class org.wicketstuff.security.strategies.WaspAuthorizationStrategy |
|---|
MESSAGE_KEY |
| Fields inherited from interface org.apache.wicket.authorization.IAuthorizationStrategy |
|---|
ALLOW_ALL |
| Constructor Summary | |
|---|---|
SwarmStrategy(Class<? extends org.wicketstuff.security.components.ISecureComponent> secureClass,
Object hiveQueen)
Constructs a new strategy linked to the specified hive. |
|
SwarmStrategy(Object hiveQueen)
Constructs a new strategy linked to the specified hive. |
|
| Method Summary | |
|---|---|
protected org.wicketstuff.security.hive.Hive |
getHive()
Returns the hive. |
protected LoginContainer |
getLoginContainer()
The LoginContainer keeps track of all Subjects for this session.. |
boolean |
hasPermission(org.wicketstuff.security.hive.authorization.Permission permission,
org.wicketstuff.security.hive.authentication.Subject subject)
Performs the actual permission check at the Hive. |
boolean |
isUserAuthenticated()
|
void |
login(Object context)
Logs a user in. |
boolean |
logoff(Object context)
Loggs a user off. |
protected void |
logPermissionDenied(org.wicketstuff.security.hive.authorization.Permission permission,
org.wicketstuff.security.hive.authentication.Subject subject)
Logs (if logging is enabled) which permission was denied for a subject. |
| Methods inherited from class org.wicketstuff.security.swarm.strategies.AbstractSwarmStrategy |
|---|
getSubject, hasPermission, isClassAuthenticated, isClassAuthorized, isComponentAuthenticated, isComponentAuthorized, isModelAuthenticated, isModelAuthorized |
| Methods inherited from class org.wicketstuff.security.strategies.ClassAuthorizationStrategy |
|---|
destroy, getClassChecks, getClassChecks, getExceptionMessage, isInstantiationAuthorized |
| Methods inherited from class org.wicketstuff.security.strategies.WaspAuthorizationStrategy |
|---|
createMessageSource, get, getActionFactory, getMessageSource, getMessageSource, getSecurityCheck, isActionAuthorized, logMessage, logMessage, logMessage, logMessages, removeMessageSource, setStrategyResolver |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SwarmStrategy(Object hiveQueen)
hiveQueen - A key to retrieve the Hive
public SwarmStrategy(Class<? extends org.wicketstuff.security.components.ISecureComponent> secureClass,
Object hiveQueen)
secureClass - instances of this class will be required to have access authorization.hiveQueen - A key to retrieve the Hive| Method Detail |
|---|
protected final org.wicketstuff.security.hive.Hive getHive()
org.wicketstuff.security.strategies.SecurityException - if no hive is registered.
public boolean hasPermission(org.wicketstuff.security.hive.authorization.Permission permission,
org.wicketstuff.security.hive.authentication.Subject subject)
Hive.
hasPermission in class AbstractSwarmStrategypermission - the permission to verifysubject - optional subject to test against the permission
org.wicketstuff.security.strategies.SecurityException - if the permission is null
protected void logPermissionDenied(org.wicketstuff.security.hive.authorization.Permission permission,
org.wicketstuff.security.hive.authentication.Subject subject)
IAuthorizationMessageSource for later retrieval. The
following variables are stored: "permission","actions", "subject" and "principals" where
principals is a collection of principals that contain the permission and actions is a
String representing all the WaspActions required. Note that the subject
variable might be null.
permission - permission that was denied.subject - optional subjectWaspAuthorizationStrategy.logMessages(),
WaspAuthorizationStrategy.getMessageSource()
public void login(Object context)
throws org.wicketstuff.security.authentication.LoginException
LoginContext.
login in class org.wicketstuff.security.strategies.WaspAuthorizationStrategyorg.wicketstuff.security.authentication.LoginExceptionWaspAuthorizationStrategy.login(java.lang.Object)public boolean logoff(Object context)
LoginContext and must
be the same (or equal) to the logincontext used to log in.
logoff in class org.wicketstuff.security.strategies.WaspAuthorizationStrategyWaspAuthorizationStrategy.logoff(Object)protected final LoginContainer getLoginContainer()
LoginContainer keeps track of all Subjects for this session..
public boolean isUserAuthenticated()
isUserAuthenticated in class org.wicketstuff.security.strategies.WaspAuthorizationStrategyWaspAuthorizationStrategy.isUserAuthenticated()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||