|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.bryansaunders.jee6divelog.security.Identity
@SessionScoped @Named(value="identity") public class Identity
User Identity implements Serializable.
Field Summary | |
---|---|
static java.lang.Integer |
LOGGED_IN
Identity Logged In. |
static java.lang.Integer |
LOGGED_OUT
Identity Logged Out. |
static boolean |
LOGIN_FAILURE
Login Failure. |
static boolean |
LOGIN_SUCCESS
Login Success. |
static java.lang.String |
LOGOUT_FAILURE
Logout Failure. |
static java.lang.String |
LOGOUT_SUCCESS
Logout Success. |
Constructor Summary | |
---|---|
Identity()
Default Constructor. |
Method Summary | |
---|---|
java.util.Date |
getApiKeyExpiration()
Get the apiKeyExpiration. |
java.lang.String |
getPassword()
Get Password. |
java.util.Set<Permission> |
getPermissions()
Get the permissions. |
java.lang.String |
getPrivateApiKey()
Get the Private apiKey. |
java.lang.String |
getPublicApiKey()
Get the Public apiKey. |
java.util.Set<Role> |
getRoles()
Get the roles. |
java.lang.Integer |
getStatus()
Get the status. |
java.lang.String |
getUsername()
Get Username. |
boolean |
hasPermission(Permission permission)
Has the specified Permission. |
boolean |
hasRole(Role role)
Has the specified Role. |
boolean |
isLoggedIn()
Is the Identity Logged in? |
boolean |
isRememberMe()
Get the rememberMe. |
boolean |
login()
Login Identity. |
boolean |
login(boolean restLogin)
Login Identity. |
java.lang.String |
logout()
Logout the current User. |
boolean |
restLogin()
Login Identity for REST Service. |
void |
setApiKeyExpiration(java.util.Date newApiKeyExpiration)
Set the apiKeyExpiration. |
void |
setCredentials(Credentials newCredentials)
Set the credentials. |
void |
setPermissions(java.util.Set<Permission> newPermissions)
Set the permissions. |
void |
setPrivateApiKey(java.lang.String newApiKey)
Set the Private apiKey. |
void |
setPublicApiKey(java.lang.String newApiKey)
Set the Public apiKey. |
void |
setRememberMe(boolean newRememberMe)
Set the rememberMe. |
void |
setRoles(java.util.Set<Role> newRoles)
Set the roles. |
void |
setStatus(java.lang.Integer newStatus)
Set the status. |
void |
setUserAccountService(UserAccountService newUserAccountService)
Set the userAccountService. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final boolean LOGIN_FAILURE
public static final boolean LOGIN_SUCCESS
public static final java.lang.String LOGOUT_FAILURE
public static final java.lang.String LOGOUT_SUCCESS
public static final java.lang.Integer LOGGED_OUT
public static final java.lang.Integer LOGGED_IN
Constructor Detail |
---|
public Identity()
Method Detail |
---|
public boolean login()
public boolean restLogin()
public boolean login(boolean restLogin)
restLogin
- Is it a REST Login
public java.lang.String logout()
public boolean isLoggedIn()
public java.lang.Integer getStatus()
public void setStatus(java.lang.Integer newStatus)
newStatus
- the status to setpublic java.lang.String getUsername()
public java.lang.String getPassword()
public void setCredentials(Credentials newCredentials)
newCredentials
- the credentials to setpublic void setUserAccountService(UserAccountService newUserAccountService)
newUserAccountService
- the userAccountService to setpublic java.util.Set<Role> getRoles()
public void setRoles(java.util.Set<Role> newRoles)
newRoles
- the roles to setpublic java.util.Set<Permission> getPermissions()
public void setPermissions(java.util.Set<Permission> newPermissions)
newPermissions
- the permissions to setpublic boolean isRememberMe()
public void setRememberMe(boolean newRememberMe)
newRememberMe
- the rememberMe to setpublic boolean hasRole(Role role)
role
- Role to check for
public boolean hasPermission(Permission permission)
permission
- Permission to check for
public java.lang.String getPublicApiKey()
public void setPublicApiKey(java.lang.String newApiKey)
newApiKey
- the apiKey to setpublic java.lang.String getPrivateApiKey()
public void setPrivateApiKey(java.lang.String newApiKey)
newApiKey
- the apiKey to setpublic java.util.Date getApiKeyExpiration()
public void setApiKeyExpiration(java.util.Date newApiKeyExpiration)
newApiKeyExpiration
- the apiKeyExpiration to set
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |