|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jboss.seam.security.IdentityImpl
@Named(value="identity") @SessionScoped public class IdentityImpl
Identity implementation for authorization and authentication via Seam security.
| Field Summary | |
|---|---|
protected static boolean |
securityEnabled
|
| Constructor Summary | |
|---|---|
IdentityImpl()
|
|
| Method Summary | |
|---|---|
boolean |
addGroup(String name,
String groupType)
|
boolean |
addRole(String roleType,
String group,
String groupType)
|
protected boolean |
authenticate()
|
void |
checkGroup(String group,
String groupType)
|
void |
checkPermission(Object target,
String action)
|
void |
checkRestriction(String expr)
|
void |
checkRole(String roleType,
String group,
String groupType)
|
protected void |
deferredAuthenticationObserver(DeferredAuthenticationEvent event)
|
void |
filterByPermission(Collection<?> collection,
String action)
|
String |
getAuthenticatorName()
|
Set<org.picketlink.idm.api.Group> |
getGroups()
|
Set<org.picketlink.idm.api.Role> |
getRoles()
|
org.picketlink.idm.api.User |
getUser()
|
boolean |
hasPermission(Object target,
String action)
|
boolean |
hasRole(String roleType,
String group,
String groupType)
|
boolean |
inGroup(String name,
String groupType)
|
boolean |
isLoggedIn()
|
static boolean |
isSecurityEnabled()
|
boolean |
isVerified()
|
String |
login()
Performs an authorization check, based on the specified security expression string. |
void |
logout()
|
protected Authenticator |
lookupAuthenticator()
Returns an Authenticator instance to be used for authentication. |
protected void |
postAuthenticate()
Extracts the principal from the subject, and uses it to create the User object. |
protected void |
preAuthenticate()
Clears any roles added by calling addRole() while not authenticated. |
void |
quietLogin()
|
void |
removeGroup(String name,
String groupType)
|
void |
removeRole(String roleType,
String group,
String groupType)
Removes a role from the authenticated user |
void |
runAs(RunAsOperation operation)
|
void |
setAuthenticatorName(String authenticatorName)
|
static void |
setSecurityEnabled(boolean enabled)
|
boolean |
tryLogin()
|
void |
unAuthenticate()
Resets all security state and credentials |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static boolean securityEnabled
| Constructor Detail |
|---|
public IdentityImpl()
| Method Detail |
|---|
public static boolean isSecurityEnabled()
public static void setSecurityEnabled(boolean enabled)
public boolean isLoggedIn()
isLoggedIn in interface Identitypublic String getAuthenticatorName()
public void setAuthenticatorName(String authenticatorName)
public boolean tryLogin()
tryLogin in interface Identitypublic String login()
login in interface Identityexpr - The security expression string 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 void quietLogin()
quietLogin in interface Identity
protected boolean authenticate()
throws AuthenticationException
AuthenticationExceptionprotected void preAuthenticate()
protected void deferredAuthenticationObserver(@Observes
DeferredAuthenticationEvent event)
protected void postAuthenticate()
protected Authenticator lookupAuthenticator()
throws AuthenticationException
AuthenticationExceptionpublic void unAuthenticate()
public void logout()
logout in interface Identity
public boolean hasRole(String roleType,
String group,
String groupType)
hasRole in interface Identity
public boolean addRole(String roleType,
String group,
String groupType)
addRole in interface Identity
public boolean inGroup(String name,
String groupType)
inGroup in interface Identity
public boolean addGroup(String name,
String groupType)
addGroup in interface Identity
public void removeGroup(String name,
String groupType)
removeGroup in interface Identity
public void removeRole(String roleType,
String group,
String groupType)
removeRole in interface Identityrole - The name of the role to remove
public void checkRole(String roleType,
String group,
String groupType)
checkRole in interface Identity
public void checkGroup(String group,
String groupType)
checkGroup in interface Identity
public void checkPermission(Object target,
String action)
checkPermission in interface Identity
public void filterByPermission(Collection<?> collection,
String action)
filterByPermission in interface Identity
public boolean hasPermission(Object target,
String action)
hasPermission in interface Identitypublic void runAs(RunAsOperation operation)
public void checkRestriction(String expr)
checkRestriction in interface Identitypublic org.picketlink.idm.api.User getUser()
getUser in interface Identitypublic Set<org.picketlink.idm.api.Role> getRoles()
getRoles in interface Identitypublic Set<org.picketlink.idm.api.Group> getGroups()
getGroups in interface Identitypublic boolean isVerified()
isVerified in interface Identity
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||