com.unboundid.directory.sdk.http.types
Class UsernamePasswordAuthenticationRequest

java.lang.Object
  extended by com.unboundid.directory.sdk.http.types.UsernamePasswordAuthenticationRequest
All Implemented Interfaces:
AuthenticationRequest

public class UsernamePasswordAuthenticationRequest
extends java.lang.Object
implements AuthenticationRequest

A AuthenticationRequest implementation where the user's credentials is a simple password.


Constructor Summary
UsernamePasswordAuthenticationRequest(java.lang.String principal, java.lang.String credentials, javax.servlet.http.HttpServletRequest httpServletRequest)
          Constructs a new UsernamePasswordAuthenticationRequest with the provided information.
 
Method Summary
 boolean equals(java.lang.Object o)
          
 java.lang.String getCredentials()
          Retrieves the password credential provided by the user.
 javax.servlet.http.HttpServletRequest getHttpServletRequest()
          The HttpServletRequest that initiated the authentication request.
 java.lang.String getPrincipal()
          Retrieves the username provided by the user.
 int hashCode()
          
 java.lang.String toString()
          
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

UsernamePasswordAuthenticationRequest

public UsernamePasswordAuthenticationRequest(java.lang.String principal,
                                             java.lang.String credentials,
                                             javax.servlet.http.HttpServletRequest httpServletRequest)
Constructs a new UsernamePasswordAuthenticationRequest with the provided information.

Parameters:
principal - The user resource to authentication against.
credentials - The password credential provided by the user.
httpServletRequest - The httpServletRequest that initiated the authentication request.
Method Detail

getCredentials

public java.lang.String getCredentials()
Retrieves the password credential provided by the user.

Specified by:
getCredentials in interface AuthenticationRequest
Returns:
The password credential provided by the user.

getPrincipal

public java.lang.String getPrincipal()
Retrieves the username provided by the user.

Specified by:
getPrincipal in interface AuthenticationRequest
Returns:
The username provided by the user.

getHttpServletRequest

public javax.servlet.http.HttpServletRequest getHttpServletRequest()
The HttpServletRequest that initiated the authentication request.

Specified by:
getHttpServletRequest in interface AuthenticationRequest
Returns:
The HttpServletRequest that initiated the authentication request, or null if not available.

equals

public boolean equals(java.lang.Object o)

Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()

Overrides:
hashCode in class java.lang.Object

toString

public java.lang.String toString()

Overrides:
toString in class java.lang.Object