@Named(value="identity") @SessionScoped public class IdentityImpl extends Object implements org.jboss.seam.security.Identity, Serializable
| Modifier and Type | Field and Description |
|---|---|
protected static boolean |
securityEnabled |
| Constructor and Description |
|---|
IdentityImpl() |
| Modifier and Type | Method and Description |
|---|---|
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(org.jboss.seam.security.events.DeferredAuthenticationEvent event) |
void |
filterByPermission(Collection<?> collection,
String action) |
Class<? extends org.jboss.seam.security.Authenticator> |
getAuthenticatorClass() |
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() |
void |
logout() |
protected org.jboss.seam.security.Authenticator |
lookupAuthenticator()
Returns an Authenticator instance to be used for authentication.
|
protected void |
postAuthenticate() |
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 |
setAuthenticatorClass(Class<? extends org.jboss.seam.security.Authenticator> authenticatorClass) |
void |
setAuthenticatorName(String authenticatorName) |
static void |
setSecurityEnabled(boolean enabled) |
boolean |
tryLogin() |
void |
unAuthenticate()
Resets all security state and credentials
|
public static boolean isSecurityEnabled()
public static void setSecurityEnabled(boolean enabled)
public boolean isLoggedIn()
isLoggedIn in interface org.jboss.seam.security.Identitypublic Class<? extends org.jboss.seam.security.Authenticator> getAuthenticatorClass()
getAuthenticatorClass in interface org.jboss.seam.security.Identitypublic void setAuthenticatorClass(Class<? extends org.jboss.seam.security.Authenticator> authenticatorClass)
setAuthenticatorClass in interface org.jboss.seam.security.Identitypublic String getAuthenticatorName()
getAuthenticatorName in interface org.jboss.seam.security.Identitypublic void setAuthenticatorName(String authenticatorName)
setAuthenticatorName in interface org.jboss.seam.security.Identitypublic boolean tryLogin()
tryLogin in interface org.jboss.seam.security.Identitypublic String login()
login in interface org.jboss.seam.security.Identitypublic void quietLogin()
quietLogin in interface org.jboss.seam.security.Identityprotected boolean authenticate()
throws org.jboss.seam.security.AuthenticationException
org.jboss.seam.security.AuthenticationExceptionprotected void preAuthenticate()
protected void deferredAuthenticationObserver(@Observes
org.jboss.seam.security.events.DeferredAuthenticationEvent event)
protected void postAuthenticate()
protected org.jboss.seam.security.Authenticator lookupAuthenticator()
throws org.jboss.seam.security.AuthenticationException
org.jboss.seam.security.AuthenticationExceptionpublic void unAuthenticate()
public void logout()
logout in interface org.jboss.seam.security.Identitypublic boolean hasRole(String roleType, String group, String groupType)
hasRole in interface org.jboss.seam.security.Identitypublic boolean addRole(String roleType, String group, String groupType)
addRole in interface org.jboss.seam.security.Identitypublic boolean inGroup(String name, String groupType)
inGroup in interface org.jboss.seam.security.Identitypublic boolean addGroup(String name, String groupType)
addGroup in interface org.jboss.seam.security.Identitypublic void removeGroup(String name, String groupType)
removeGroup in interface org.jboss.seam.security.Identitypublic void removeRole(String roleType, String group, String groupType)
removeRole in interface org.jboss.seam.security.Identityrole - The name of the role to removepublic void checkRole(String roleType, String group, String groupType)
checkRole in interface org.jboss.seam.security.Identitypublic void checkGroup(String group, String groupType)
checkGroup in interface org.jboss.seam.security.Identitypublic void checkPermission(Object target, String action)
checkPermission in interface org.jboss.seam.security.Identitypublic void filterByPermission(Collection<?> collection, String action)
filterByPermission in interface org.jboss.seam.security.Identitypublic boolean hasPermission(Object target, String action)
hasPermission in interface org.jboss.seam.security.Identitypublic void runAs(RunAsOperation operation)
public void checkRestriction(String expr)
checkRestriction in interface org.jboss.seam.security.Identitypublic org.picketlink.idm.api.User getUser()
getUser in interface org.jboss.seam.security.Identitypublic Set<org.picketlink.idm.api.Role> getRoles()
getRoles in interface org.jboss.seam.security.Identitypublic Set<org.picketlink.idm.api.Group> getGroups()
getGroups in interface org.jboss.seam.security.Identitypublic boolean isVerified()
isVerified in interface org.jboss.seam.security.IdentityCopyright © 2013 Seam Framework. All Rights Reserved.