Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.acegisecurity.userdetails
Interface UserDetails

All Superinterfaces:
  Serializable

All Known Implementing Classes:
  User

    public interface UserDetails

extends Serializable

Provides core user information.

Implementations are not used directly by Acegi Security for security purposes. They simply store user information which is later encapsulated into `Authentication` objects. This allows non-security related user information (such as email addresses, telephone numbers etc) to be stored in a convenient location.

Concrete implementations must take particular care to ensure the non-null contract detailed for each method is enforced. See `org.acegisecurity.providers.dao.User` for a reference implementation (which you might like to extend).

Version:
  $Id: UserDetails.java,v 1.7 2005/11/29 13:10:10 benalex Exp $
Author:
  Ben Alex

Method Summary
`GrantedAuthority[]` | `getAuthorities()` Returns the authorities granted to the user.
`String` | `getPassword()` Returns the password used to authenticate the user.
`String` | `getUsername()` Returns the username used to authenticate the user.
`boolean` | `isAccountNonExpired()` Indicates whether the user's account has expired.
`boolean` | `isAccountNonLocked()` Indicates whether the user is locked or unlocked.
`boolean` | `isCredentialsNonExpired()` Indicates whether the user's credentials (password) has expired.
`boolean` | `isEnabled()` Indicates whether the user is enabled or disabled.

Method Detail

### isAccountNonExpired

    boolean isAccountNonExpired()

  Indicates whether the user's account has expired. An expired account cannot be authenticated.

  Returns:
    `true` if the user's account is valid (ie non-expired), `false` if no longer valid (ie expired)

### isAccountNonLocked

    boolean isAccountNonLocked()

  Indicates whether the user is locked or unlocked. A locked user cannot be authenticated.

  Returns:
    `true` if the user is not locked, `false` otherwise

### getAuthorities

    GrantedAuthority[] getAuthorities()

  Returns the authorities granted to the user. Cannot return `null`.

  Returns:
    the authorities (never `null`)

### isCredentialsNonExpired

    boolean isCredentialsNonExpired()

  Indicates whether the user's credentials (password) has expired. Expired credentials prevent authentication.

  Returns:
    `true` if the user's credentials are valid (ie non-expired), `false` if no longer valid (ie expired)

### isEnabled

    boolean isEnabled()

  Indicates whether the user is enabled or disabled. A disabled user cannot be authenticated.

  Returns:
    `true` if the user is enabled, `false` otherwise

### getPassword

    String getPassword()

  Returns the password used to authenticate the user. Cannot return `null`.

  Returns:
    the password (never `null`)

### getUsername

    String getUsername()

  Returns the username used to authenticate the user. Cannot return `null`.

  Returns:
    the username (never `null`)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2004-2005 Acegi Technology Pty Limited. All Rights Reserved.