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 |
|---|---|
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(org.apache.wicket.Component component)
Queries all available subjects (descending sort order) for the authentication of a component.
|
boolean |
isModelAuthenticated(org.apache.wicket.model.IModel<?> model,
org.apache.wicket.Component component)
Queries all available subjects (descending sort order) for the authentication of a model.
|
void |
login(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(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(LoginContext context) throws LoginException
context - LoginException - if the login failsLoginContext.login()public boolean logoff(LoginContext context)
context - public Subject getSubject()
public int size()
Subjects contained here.public boolean isModelAuthenticated(org.apache.wicket.model.IModel<?> model,
org.apache.wicket.Component component)
model - the modelcomponent - the component holding the modelWicketSubject.isModelAuthenticated(IModel, Component)public boolean isComponentAuthenticated(org.apache.wicket.Component component)
component - the componentWicketSubject.isComponentAuthenticated(Component)public boolean isClassAuthenticated(Class<?> clazz)
clazz - the (component) classWicketSubject.isClassAuthenticated(Class)Copyright © 2015. All rights reserved.