GigaSpaces XAP 9.0 API

com.gigaspaces.security.directory
Class User

java.lang.Object
  extended by com.gigaspaces.security.directory.User
All Implemented Interfaces:
UserDetails, Serializable

public class User
extends Object
implements UserDetails

Models user details retrieved by a UserManager.

Implementors may use this class directly, subclass it, or write their own UserDetails implementation from scratch.

Since:
7.0.1
Author:
Moran Avigdor
See Also:
Serialized Form

Constructor Summary
User(String username, String password)
           
User(String username, String password, Authority... authorities)
           
User(String username, String password, String... authorities)
           
 
Method Summary
 boolean equals(Object obj)
           
 Authority[] getAuthorities()
          Returns the granted 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.
 int hashCode()
           
 void setPassword(String encryptedPassword)
          Set an encrypted password (new user or one with an updated password).
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

User

public User(String username,
            String password)

User

public User(String username,
            String password,
            Authority... authorities)

User

public User(String username,
            String password,
            String... authorities)
Method Detail

getAuthorities

public Authority[] getAuthorities()
Description copied from interface: UserDetails
Returns the granted authorities granted to the user. Cannot return null.

Specified by:
getAuthorities in interface UserDetails
Returns:
the authorities (never null)

getPassword

public String getPassword()
Description copied from interface: UserDetails
Returns the password used to authenticate the user. Cannot return null.

Specified by:
getPassword in interface UserDetails
Returns:
the password (never null)

setPassword

public void setPassword(String encryptedPassword)
Set an encrypted password (new user or one with an updated password).

Parameters:
encryptedPassword - the encrypted password.
See Also:
UserManager.createUser(UserDetails), UserManager.updateUser(UserDetails)

getUsername

public String getUsername()
Description copied from interface: UserDetails
Returns the username used to authenticate the user. Cannot return null.

Specified by:
getUsername in interface UserDetails
Returns:
the username (never null)

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

GigaSpaces XAP 9.0 API

Copyright © GigaSpaces.