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

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


org.jboss.seam.security
Class Authentication

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

@Name(value="org.jboss.seam.security.authentication")
@Scope(value=SESSION)
@Install(value=false)
public abstract class Authentication
extends Object
implements Principal, Serializable

An Authentication represents either a login token or an authenticated Principal.

Author:
Shane Bryzak
See Also:
Serialized Form

Field Summary
protected  boolean authenticated
           
protected  boolean valid
           
 
Constructor Summary
Authentication()
           
 
Method Summary
abstract  Object getCredentials()
           
abstract  Object getPrincipal()
           
abstract  String[] getRoles()
           
static Authentication 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

Authentication

public Authentication()
Method Detail

instance

public static Authentication instance()

getRoles

public abstract String[] 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.