com.elasticpath.service.auth.impl
Class EpUserIdentityService

java.lang.Object
  extended by com.elasticpath.service.auth.impl.EpUserIdentityService
All Implemented Interfaces:
UserIdentityService

public class EpUserIdentityService
extends java.lang.Object
implements UserIdentityService

This is a default indentity service for EP authentication. As Customer will set/update password through Hibernate automatically, so this implementation of UserIdentityService is empty.


Constructor Summary
EpUserIdentityService()
           
 
Method Summary
 void add(java.lang.String userId, java.lang.String password)
          Create a new user identity.
 void changePassword(java.lang.String userId, java.lang.String oldPassword, java.lang.String newPassword)
          Secure method for changing the password, checks authentication first.
 boolean exists(java.lang.String userId)
          Check whether the given user exists.
 void remove(java.lang.String userId)
          Remove a user identity.
 void setPassword(java.lang.String userId, java.lang.String password)
          Change the password without requiring authentication, for use by administrators.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EpUserIdentityService

public EpUserIdentityService()
Method Detail

add

public void add(java.lang.String userId,
                java.lang.String password)
         throws UserIdExistException,
                IdentityServiceException
Create a new user identity.

Specified by:
add in interface UserIdentityService
Parameters:
userId - - the ID of the user identity to create
password - - the password to associate with the user identity
Throws:
UserIdExistException - - The userId already exists
IdentityServiceException - - A problem occured servicing the add request

changePassword

public void changePassword(java.lang.String userId,
                           java.lang.String oldPassword,
                           java.lang.String newPassword)
                    throws UserIdNonExistException,
                           IdentityServiceException
Secure method for changing the password, checks authentication first.

Specified by:
changePassword in interface UserIdentityService
Parameters:
userId - - the ID of the user identity to change the password of
oldPassword - - the old password for authentication purposes
newPassword - - the new password to set
Throws:
UserIdNonExistException - - The user does not exist
IdentityServiceException - - A problem occured servicing the add request

exists

public boolean exists(java.lang.String userId)
               throws IdentityServiceException
Check whether the given user exists.

Specified by:
exists in interface UserIdentityService
Parameters:
userId - - the ID of the user identity to check
Returns:
true if the user exists
Throws:
IdentityServiceException - - A problem occured servicing the add request

remove

public void remove(java.lang.String userId)
            throws UserIdNonExistException,
                   IdentityServiceException
Remove a user identity.

Specified by:
remove in interface UserIdentityService
Parameters:
userId - - the ID of the user identity to remove
Throws:
UserIdNonExistException - - The user does not exist
IdentityServiceException - - A problem occured servicing the add request

setPassword

public void setPassword(java.lang.String userId,
                        java.lang.String password)
                 throws UserIdNonExistException,
                        IdentityServiceException
Change the password without requiring authentication, for use by administrators.

Specified by:
setPassword in interface UserIdentityService
Parameters:
userId - - the ID of the user identity to set the password of
password - - the password to set
Throws:
UserIdNonExistException - - The user does not exist
IdentityServiceException - - A problem occured servicing the add request