jrun.servlet.security
Class AuthenticatedPrincipal

java.lang.Object
  |
  +--jrun.servlet.security.AuthenticatedPrincipal
All Implemented Interfaces:
java.security.Principal, java.io.Serializable

public class AuthenticatedPrincipal
extends java.lang.Object
implements java.security.Principal, java.io.Serializable

Represents an authenticated user. Once a user has been authenticated by JRun through the StandardSecurityFilter and JAAS, the user will be placed in ServletUsers.

Author:
Karl Moss, Brian Deitte
See Also:
Serialized Form

Method Summary
 boolean equals(java.lang.Object o)
          Determine if this AuthenticatedPrincipal equals the given AuthenticatedPrincipal
 java.lang.String getAuthType()
          Returns the type of authentication (i.e.
protected  java.lang.Object getContextId()
           
 java.lang.String getName()
          Returns the name of the authenticated user
 boolean invalid()
          See if the principal is invalid.
 boolean isUserInRole(java.lang.String role, java.lang.String servletName)
           
 void logoff()
          Log off user from the web application.
protected  void setAuthType(java.lang.String type)
          Sets the type of authentication used to authenticate the user (i.e.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.security.Principal
hashCode
 

Method Detail

getName

public java.lang.String getName()
Returns the name of the authenticated user
Specified by:
getName in interface java.security.Principal
Returns:
The name of the authenticated user

setAuthType

protected void setAuthType(java.lang.String type)
Sets the type of authentication used to authenticate the user (i.e. "BASIC" or "FORM")
Parameters:
type - The authentication type

getAuthType

public java.lang.String getAuthType()
Returns the type of authentication (i.e. "BASIC" or "FORM")
Returns:
The authentication type

getContextId

protected java.lang.Object getContextId()

logoff

public void logoff()
Log off user from the web application.

invalid

public boolean invalid()
See if the principal is invalid. It should be invalid after logoff.

isUserInRole

public boolean isUserInRole(java.lang.String role,
                            java.lang.String servletName)

equals

public boolean equals(java.lang.Object o)
Determine if this AuthenticatedPrincipal equals the given AuthenticatedPrincipal
Specified by:
equals in interface java.security.Principal
Overrides:
equals in class java.lang.Object
Returns:
true if the principals match

toString

public java.lang.String toString()
Specified by:
toString in interface java.security.Principal
Overrides:
toString in class java.lang.Object


Copyright � 2002 Macromedia Corporation. All Rights Reserved.