com.elasticpath.service.auth
Interface UserIdentityService

All Known Implementing Classes:
EpUserIdentityService

public interface UserIdentityService

UserIdentityService provides services for managing a user identity, which is the principal used for authentication.


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.
 

Method Detail

add

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

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

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.

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

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

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

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

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

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

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