|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jboss.reliance.identity.Identity
public class Identity
Simple identity.
| Field Summary | |
|---|---|
protected static org.jboss.logging.Logger |
log
|
static String |
ROLES_GROUP
|
| Constructor Summary | |
|---|---|
Identity()
|
|
| Method Summary | |
|---|---|
boolean |
addRole(String role)
Adds a role to the user's subject, and their security context |
void |
authenticate()
Authenticate. |
void |
authenticate(LoginContext loginContext)
Authenticate. |
void |
create()
|
protected CallbackHandler |
getDefaultCallbackHandler()
Creates a callback handler that can handle a standard username/password callback, using the username and password properties. |
String |
getJaasConfigName()
Get the jaas config name. |
protected LoginContext |
getLoginContext()
Get LoginContext. |
String |
getPassword()
Get the password. |
Principal |
getPrincipal()
Get the principal. |
Subject |
getSubject()
Get the subject. |
String |
getUsername()
Get the username. |
boolean |
hasRole(String role)
Checks if the authenticated Identity is a member of the specified role. |
boolean |
isCredentialsSet()
Are credential set. |
boolean |
isLoggedIn()
Is logged in. |
boolean |
isLoggedIn(boolean attemptLogin)
Is logged in. |
boolean |
login()
|
void |
logout()
Logout. |
protected void |
postAuthenticate()
Post authentificate. |
protected void |
preAuthenticate()
PreAuthentificate. |
void |
quietLogin()
Attempts a quiet login, suppressing any login exceptions and not creating any faces messages. |
void |
removeRole(String role)
Removes a role from the user's subject and their security context |
void |
setConfiguration(Configuration configuration)
Set the configuration. |
void |
setJaasConfigName(String jaasConfigName)
Set the jaas config name. |
void |
setPassword(String password)
Set the password. |
void |
setUsername(String username)
Set the username. |
protected void |
unAuthenticate()
Removes all Role objects from the security context, removes the "Roles" group from the user's subject. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static org.jboss.logging.Logger log
public static final String ROLES_GROUP
| Constructor Detail |
|---|
public Identity()
| Method Detail |
|---|
public void create()
public boolean login()
public void logout()
public boolean isCredentialsSet()
public void quietLogin()
public void authenticate()
throws LoginException
LoginException - for any login exception
public void authenticate(LoginContext loginContext)
throws LoginException
loginContext - the login exception
LoginException - for any login exceptionprotected void preAuthenticate()
protected void postAuthenticate()
protected void unAuthenticate()
public boolean isLoggedIn()
public boolean isLoggedIn(boolean attemptLogin)
attemptLogin - try to attempt login
public boolean hasRole(String role)
role - String The name of the role to check
public boolean addRole(String role)
role - The name of the role to add
public void removeRole(String role)
role - The name of the role to remove
protected LoginContext getLoginContext()
throws LoginException
LoginException - for any login exceptionprotected CallbackHandler getDefaultCallbackHandler()
public String getUsername()
public void setUsername(String username)
username - the usernamepublic String getPassword()
public void setPassword(String password)
password - the passwordpublic Principal getPrincipal()
public Subject getSubject()
public String getJaasConfigName()
public void setJaasConfigName(String jaasConfigName)
jaasConfigName - the jass config namepublic void setConfiguration(Configuration configuration)
configuration - the configuration
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||