org.sape.carboncontrib.security
Class User

java.lang.Object
  extended byorg.sape.carboncontrib.security.User
All Implemented Interfaces:
Serializable

public class User
extends Object
implements Serializable

An object containing properties of a system user.

See Also:
Serialized Form

Field Summary
private static int BUF_LEN
           
protected  String credentials
          Credentials of the user for authenticating to a service.
protected  String principal
          Identity of the user for authenticating to a service, usually a username.
 
Constructor Summary
User()
          Default Constructor.
User(String principal, String credentials)
          Constructs a User object using the supplied principal and credentials.
 
Method Summary
 String getCredentials()
          Returns the user's credentials.
 String getPrincipal()
          Returns the user's principal.
 void setCredentials(String credentials)
          Sets the credentials.
 void setPrincipal(String principal)
          Sets the principal.
 String toString()
          Returns a String object representing the user.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

BUF_LEN

private static final int BUF_LEN
See Also:
Constant Field Values

principal

protected String principal
Identity of the user for authenticating to a service, usually a username. The format of the principal depends on the authentication scheme. If the principal is unspecified, the behaviour is determined by the service provider.


credentials

protected String credentials
Credentials of the user for authenticating to a service. The value of this property depends on the authentication scheme. For example, it could be a hashed password, clear-text password, key, certificate, and so on. If this property is unspecified, the behaviour is determined by the service provider.

Constructor Detail

User

public User()
Default Constructor.


User

public User(String principal,
            String credentials)
Constructs a User object using the supplied principal and credentials.

Parameters:
principal - - Identity of the user for authenticating to a service.
credentials - - Credentials of the user for authenticating to a service.
Method Detail

getPrincipal

public String getPrincipal()
Returns the user's principal.

Returns:
String - Principal

setPrincipal

public void setPrincipal(String principal)
Sets the principal.

Parameters:
principal - The principal to set

getCredentials

public String getCredentials()
Returns the user's credentials.

Returns:
String - credentials

setCredentials

public void setCredentials(String credentials)
Sets the credentials.

Parameters:
credentials - The credentials to set

toString

public String toString()

Returns a String object representing the user.

Returns:
String representation of this object.


Copyright 2003 Sapient Corporation. All Rights Reserved.