org.restlet.security

## Class User

- java.lang.Object
- - org.restlet.security.User

All Implemented Interfaces:
  java.security.Principal

    public class User
    extends java.lang.Object
    implements java.security.Principal

User part of a security realm. Note the same user can be member of several groups.

Author:
  Jerome Louvel
See Also:
  `Realm`, `Group`

### Constructor Summary

Constructors
Constructor and Description
`User()` Default constructor.
`User(java.lang.String identifier)` Constructor.
`User(java.lang.String identifier, char[] secret)` Constructor.
`User(java.lang.String identifier, char[] secret, java.lang.String firstName, java.lang.String lastName, java.lang.String email)` Constructor.
`User(java.lang.String identifier, java.lang.String secret)` Constructor.
`User(java.lang.String identifier, java.lang.String secret, java.lang.String firstName, java.lang.String lastName, java.lang.String email)` Constructor.

### Method Summary

Methods
`java.lang.String` `getEmail()` Returns the email.
`java.lang.String` `getFirstName()` Returns the first name.
`java.lang.String` `getIdentifier()` Returns the identifier.
`java.lang.String` `getLastName()` Returns the last name.
`java.lang.String` `getName()` Returns the user identifier.
`char[]` `getSecret()` Returns the secret.
`void` `setEmail(java.lang.String email)` Sets the email.
`void` `setFirstName(java.lang.String firstName)` Sets the first name.
`void` `setIdentifier(java.lang.String identifier)` Sets the identifier.
`void` `setLastName(java.lang.String lastName)` Sets the last name.
`void` `setSecret(char[] secret)` Sets the secret.
`java.lang.String` `toString()`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Methods inherited from interface java.security.Principal

`equals, hashCode`

### Constructor Detail

#### User

    public User()

Default constructor.

#### User

    public User(java.lang.String identifier)

Constructor.

Parameters:
  `identifier` - The identifier (login).

#### User

    public User(java.lang.String identifier,
        char[] secret)

Constructor.

Parameters:
  `identifier` - The identifier (login).
  `secret` - The identification secret.

#### User

    public User(java.lang.String identifier,
        char[] secret,
        java.lang.String firstName,
        java.lang.String lastName,
        java.lang.String email)

Constructor.

Parameters:
  `identifier` - The identifier (login).
  `secret` - The identification secret.
  `firstName` - The first name.
  `lastName` - The last name.
  `email` - The email.

#### User

    public User(java.lang.String identifier,
        java.lang.String secret)

Constructor.

Parameters:
  `identifier` - The identifier (login).
  `secret` - The identification secret.

#### User

    public User(java.lang.String identifier,
        java.lang.String secret,
        java.lang.String firstName,
        java.lang.String lastName,
        java.lang.String email)

Constructor.

Parameters:
  `identifier` - The identifier (login).
  `secret` - The identification secret.
  `firstName` - The first name.
  `lastName` - The last name.
  `email` - The email.

### Method Detail

#### getEmail

    public java.lang.String getEmail()

Returns the email.

Returns:
  The email.

#### getFirstName

    public java.lang.String getFirstName()

Returns the first name.

Returns:
  The first name.

#### getIdentifier

    public java.lang.String getIdentifier()

Returns the identifier.

Returns:
  The identifier.

#### getLastName

    public java.lang.String getLastName()

Returns the last name.

Returns:
  The last name.

#### getName

    public java.lang.String getName()

Returns the user identifier.

Specified by:
  `getName` in interface `java.security.Principal`
See Also:
  `getIdentifier()`

#### getSecret

    public char[] getSecret()

Returns the secret.

Returns:
  The secret.

#### setEmail

    public void setEmail(java.lang.String email)

Sets the email.

Parameters:
  `email` - The email.

#### setFirstName

    public void setFirstName(java.lang.String firstName)

Sets the first name.

Parameters:
  `firstName` - The first name.

#### setIdentifier

    public void setIdentifier(java.lang.String identifier)

Sets the identifier.

Parameters:
  `identifier` - The identifier.

#### setLastName

    public void setLastName(java.lang.String lastName)

Sets the last name.

Parameters:
  `lastName` - The last name.

#### setSecret

    public void setSecret(char[] secret)

Sets the secret.

Parameters:
  `secret` - The secret.

#### toString

    public java.lang.String toString()

Specified by:
  `toString` in interface `java.security.Principal`
Overrides:
  `toString` in class `java.lang.Object`