org.mmbase.security
Class UserContext

java.lang.Object
  extended byorg.mmbase.security.UserContext
Direct Known Subclasses:
ContextUserContext, NameContext, User

public class UserContext
extends java.lang.Object

A UserContext object is the result of an authentication, on which authorization can be based. Normally your authorization/authentication implementation will also provide an extension to this class. This default implementation is the most simple one, actually implementing 'no authorization' (because the rank is fixed to 'administrator'). This class is not necessarily also the container class for the client's credentials, although this is possible.

Version:
$Id: UserContext.java,v 1.14 2003/07/09 10:03:11 michiel Exp $
Author:
Eduard Witteveen

Constructor Summary
UserContext()
           
 
Method Summary
 java.lang.String getIdentifier()
          Gets the unique identifier for this user.
 java.lang.String getOwnerField()
          Gets the owner field value of new objects created by this user.
 Rank getRank()
          Gets the rank of this user.
 java.lang.String toString()
          Gets a string representation of this user context (for debugging)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

UserContext

public UserContext()
Method Detail

getIdentifier

public java.lang.String getIdentifier()
Gets the unique identifier for this user. This should be unique for every different user on the system.

Returns:
A unique identifier for this user.

getOwnerField

public java.lang.String getOwnerField()
Gets the owner field value of new objects created by this user. The default implementation returns the user's identifier. This can be changed if the authorization implementation does not attribute rights to users directly ('context' implementations).

Returns:
A possible value for the owner field

getRank

public Rank getRank()
             throws SecurityException
Gets the rank of this user.

Returns:
the user rank
Throws:
SecurityException

toString

public java.lang.String toString()
Gets a string representation of this user context (for debugging)

Returns:
a string describing the usercontext


MMBase build 1.7.4.20050922