站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBoss Seam 1.1.0 API 英文版文档

Identity (JBoss Seam API Documentation) - JBoss Seam 1.1.0 API 英文版文档


org.jboss.seam.security
Class Identity

java.lang.Object
  extended by org.jboss.seam.security.Identity
All Implemented Interfaces:
Serializable, Principal
Direct Known Subclasses:
UsernamePasswordToken

@Name(value="org.jboss.seam.security.identity")
@Scope(value=SESSION)
@Install(precedence=0,
         dependencies="org.jboss.seam.securityManager")
public abstract class Identity
extends Object
implements Principal, Serializable

See Also:
Serialized Form

Field Summary
protected  boolean authenticated
           
protected  boolean valid
           
 
Constructor Summary
Identity()
           
 
Method Summary
abstract  Object getCredentials()
           
abstract  Object getPrincipal()
           
abstract  Role[] getRoles()
           
static Identity instance()
           
 void invalidate()
           
 boolean isAuthenticated()
           
 boolean isUserInRole(String role)
          Checks if the authenticated user contains the specified role.
 boolean isValid()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.security.Principal
equals, getName, hashCode, toString
 

Field Detail

authenticated

protected boolean authenticated

valid

protected boolean valid
Constructor Detail

Identity

public Identity()
Method Detail

instance

public static Identity instance()

getRoles

public abstract Role[] getRoles()

getCredentials

public abstract Object getCredentials()

getPrincipal

public abstract Object getPrincipal()

isAuthenticated

public final boolean isAuthenticated()

isValid

public final boolean isValid()

invalidate

public final void invalidate()

isUserInRole

public boolean isUserInRole(String role)
Checks if the authenticated user contains the specified role.

Parameters:
role - String
Returns:
boolean Returns true if the authenticated user contains the role, or false if otherwise.