public final class LoginContainer extends Object implements Serializable
LoginContexts. Allows the concept of multi-level login. Note
this class is not thread safe.| Constructor and Description |
|---|
LoginContainer() |
| Modifier and Type | Method and Description |
|---|---|
org.wicketstuff.security.hive.authentication.Subject |
getSubject()
returns an immutable Subject which Contains all the principals of the subjects in the
loginContexts.
|
boolean |
isClassAuthenticated(Class<?> clazz)
Queries all available subjects (descending sort order) for the authentication of a class.
|
boolean |
isComponentAuthenticated(Component component)
Queries all available subjects (descending sort order) for the authentication of a component.
|
boolean |
isModelAuthenticated(IModel<?> model,
Component component)
Queries all available subjects (descending sort order) for the authentication of a model.
|
void |
login(org.wicketstuff.security.hive.authentication.LoginContext context)
Attempts to login through the context, if successful the subject and all its rights are
included in the overall user rights.
|
boolean |
logoff(org.wicketstuff.security.hive.authentication.LoginContext context)
Removes the subject and all its rights associated with a certain context from this container.
|
int |
size()
Returns the number of
Subjects contained here. |
public void login(org.wicketstuff.security.hive.authentication.LoginContext context)
throws org.wicketstuff.security.authentication.LoginException
context - org.wicketstuff.security.authentication.LoginException - if the login failsLoginContext.login()public boolean logoff(org.wicketstuff.security.hive.authentication.LoginContext context)
context - public org.wicketstuff.security.hive.authentication.Subject getSubject()
public int size()
Subjects contained here.public boolean isModelAuthenticated(IModel<?> model, Component component)
model - the modelcomponent - the component holding the modelWicketSubject.isModelAuthenticated(IModel, Component)public boolean isComponentAuthenticated(Component component)
component - the componentWicketSubject.isComponentAuthenticated(Component)public boolean isClassAuthenticated(Class<?> clazz)
clazz - the (component) classWicketSubject.isClassAuthenticated(Class)Copyright © 2006–2019 Apache Software Foundation. All rights reserved.