|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jboss.seam.security.Identity
@Name(value="org.jboss.seam.security.identity") @Scope(value=SESSION) @Install(precedence=0, classDependencies="org.drools.WorkingMemory") @Intercept(value=NEVER) public class Identity
Field Summary | |
---|---|
protected Principal |
principal
|
protected Subject |
subject
|
Constructor Summary | |
---|---|
Identity()
|
Method Summary | |
---|---|
void |
authenticate()
|
void |
authenticate(LoginContext loginContext)
|
void |
checkRestriction(String expr)
Performs an authorization check, based on the specified security expression. |
void |
create()
|
protected boolean |
evaluateExpression(String expr)
Evaluates the specified security expression, which must return a boolean value. |
Expressions.MethodBinding |
getAuthenticateMethod()
|
protected CallbackHandler |
getCallbackHandler(String username,
String password)
Creates a callback handler that can handle a standard username/password callback, using the specified username and password parameters. |
protected Configuration |
getConfiguration()
|
protected LoginContext |
getLoginContext()
|
String |
getPassword()
|
Principal |
getPrincipal()
|
org.drools.WorkingMemory |
getSecurityContext()
|
Subject |
getSubject()
|
String |
getUsername()
|
boolean |
hasPermission(String name,
String action,
Object... arg)
Performs a permission check for the specified name and action |
boolean |
hasRole(String role)
Checks if the authenticated Identity is a member of the specified role. |
static Identity |
instance()
|
boolean |
isLoggedIn()
If there is a principal set, then the user is logged in. |
String |
login()
|
void |
logout()
|
protected void |
postAuthenticate()
Populates the specified subject's roles with any inherited roles according to the role memberships contained within the current SecurityConfiguration |
void |
setAuthenticateMethod(Expressions.MethodBinding authMethod)
|
void |
setPassword(String password)
|
void |
setUsername(String username)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Principal principal
protected Subject subject
Constructor Detail |
---|
public Identity()
Method Detail |
---|
@Create public void create()
public static Identity instance()
public boolean isLoggedIn()
public Principal getPrincipal()
public Subject getSubject()
public void checkRestriction(String expr)
expr
- The security expression to evaluate
NotLoggedInException
- Thrown if the authorization check fails and
the user is not authenticated
AuthorizationException
- Thrown if the authorization check fails and
the user is authenticatedpublic String login()
public void authenticate() throws LoginException
LoginException
public void authenticate(LoginContext loginContext) throws LoginException
LoginException
protected LoginContext getLoginContext() throws LoginException
LoginException
public void logout()
public boolean hasRole(String role)
role
- String The name of the role to check
public boolean hasPermission(String name, String action, Object... arg)
name
- String The permission nameaction
- String The permission actionarg
- Object Optional object parameter used to make a permission decision
protected CallbackHandler getCallbackHandler(String username, String password)
username
- The username to provide for a NameCallbackpassword
- The password to provide for a PasswordCallbackprotected Configuration getConfiguration()
protected void postAuthenticate()
protected boolean evaluateExpression(String expr)
expr
- String The expression to evaluate
public String getUsername()
public void setUsername(String username)
public String getPassword()
public void setPassword(String password)
public org.drools.WorkingMemory getSecurityContext()
public Expressions.MethodBinding getAuthenticateMethod()
public void setAuthenticateMethod(Expressions.MethodBinding authMethod)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |