Spring Data Commons

org.springframework.data.authentication
Class UserCredentials

java.lang.Object
  extended by org.springframework.data.authentication.UserCredentials

public class UserCredentials
extends java.lang.Object

Class used to provide credentials for username/password authentication

Author:
Thomas Risberg, Oliver Gierke

Constructor Summary
UserCredentials()
           
UserCredentials(java.lang.String username, java.lang.String password)
          Creates a new UserCredentials instance from the given username and password.
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 java.lang.String getPassword()
          Get the password to use for authentication.
 java.lang.String getUsername()
          Get the username to use for authentication.
 int hashCode()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UserCredentials

public UserCredentials()

UserCredentials

public UserCredentials(java.lang.String username,
                       java.lang.String password)
Creates a new UserCredentials instance from the given username and password. Empty Strings provided will be treated like no username or password set.

Parameters:
username -
password -
Method Detail

getUsername

public java.lang.String getUsername()
Get the username to use for authentication.

Returns:
the username

getPassword

public java.lang.String getPassword()
Get the password to use for authentication.

Returns:
the password

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

Spring Data Commons

Copyright © 2012. All Rights Reserved.