| java.lang.Object golfShop.business.user.GolfShopUserManagerImpl
GolfShopUserManagerImpl | public class GolfShopUserManagerImpl implements GolfShopUserManager(Code) | | The User Manager Business Object. This object handles requests
for user specific data and login verification.
author: Shawn McMurdo version: $Revision: 1.1 $ |
Field Summary | |
final public int | ACCOUNT_DISABLED ACCOUNT_DISABLED indicates that the account for the
requested user has been disabled by the administrator. | final public int | AUTH_FAILED Username and password verification failed because of
authentication failure.
AUTH_FAILED is thrown by a login request if the username
does not exist in the User database, the password was
incorrect, or an otherwise unknown error occured during the login
request. | final public int | AUTH_OK Username and password verification was successful. | final public int | IO_ERROR IO_ERROR is thrown by methods of the UserManager if a
communication failure prevented access to required information
from the User database or elsewhere. | final public int | MULTIPLE_LOGIN MULTIPLE_LOGIN indicates that a user has attempted to login
more than the maximum number of allowable sessions. | final public int | PASSWORD_TYPO PASSWORD_TYPO indicates that the two copies of the new
password were not identical, implying that a user may have
accidentally typed a new password incorrectly. | final public int | PASSWORD_WEAK PASSWORD_WEAK indicates that the UserManager refused
to accept a user's password change request because the new password
does not comply with policy relating to password strength. | final public int | PERMISSION_DENIED PERMISSION_DENIED indicates that a UserManager method has
failed because the requesting user has insufficient privilege
to perform the requested operation. | final public int | UNKNOWN_ERROR UNKNOWN_ERROR is indicated by methods other than the user login method
to report that an unknown error has prevented a request from
being processed. | final public int | UNKNOWN_HOST UNKNOWN_HOST indicates that a login attempt failed because the IP
address of the requester's host was not furnished with the login
request. | final public int | USERNAME_ALREADY_EXISTS USERNAME_ALREADY_EXISTS indicates that a new account could not be
created because an account with that same username already exists. |
Method Summary | |
public int | authenticate(String username, String password) Process an authentication request. | public void | createAccount(String username, String password, String address1, String address2, String city, String state, String zip, String creditCard, String email, Session session) This function creates a new account, then calls login() above to
create the session etc... | public User | getUser(String username) | public void | login(String username, String password, Session session) Process a login request issued by a user. | public void | logout(Session session) |
ACCOUNT_DISABLED | final public int ACCOUNT_DISABLED(Code) | | ACCOUNT_DISABLED indicates that the account for the
requested user has been disabled by the administrator.
|
AUTH_FAILED | final public int AUTH_FAILED(Code) | | Username and password verification failed because of
authentication failure.
AUTH_FAILED is thrown by a login request if the username
does not exist in the User database, the password was
incorrect, or an otherwise unknown error occured during the login
request. The reason for the third case is that it is not wise from a
security standpoint to give unknown users potentially valuable
information about possible errors occuring in the login facility.
|
AUTH_OK | final public int AUTH_OK(Code) | | Username and password verification was successful.
|
IO_ERROR | final public int IO_ERROR(Code) | | IO_ERROR is thrown by methods of the UserManager if a
communication failure prevented access to required information
from the User database or elsewhere.
|
MULTIPLE_LOGIN | final public int MULTIPLE_LOGIN(Code) | | MULTIPLE_LOGIN indicates that a user has attempted to login
more than the maximum number of allowable sessions.
|
PASSWORD_TYPO | final public int PASSWORD_TYPO(Code) | | PASSWORD_TYPO indicates that the two copies of the new
password were not identical, implying that a user may have
accidentally typed a new password incorrectly.
|
PASSWORD_WEAK | final public int PASSWORD_WEAK(Code) | | PASSWORD_WEAK indicates that the UserManager refused
to accept a user's password change request because the new password
does not comply with policy relating to password strength. For
example, the password may not have been long enough or contained
enough nonalphabetic characters.
|
PERMISSION_DENIED | final public int PERMISSION_DENIED(Code) | | PERMISSION_DENIED indicates that a UserManager method has
failed because the requesting user has insufficient privilege
to perform the requested operation.
|
UNKNOWN_ERROR | final public int UNKNOWN_ERROR(Code) | | UNKNOWN_ERROR is indicated by methods other than the user login method
to report that an unknown error has prevented a request from
being processed. The UserManager.login() method reports
AUTH_FAILED for unknown errors for security reasons.
|
UNKNOWN_HOST | final public int UNKNOWN_HOST(Code) | | UNKNOWN_HOST indicates that a login attempt failed because the IP
address of the requester's host was not furnished with the login
request.
|
USERNAME_ALREADY_EXISTS | final public int USERNAME_ALREADY_EXISTS(Code) | | USERNAME_ALREADY_EXISTS indicates that a new account could not be
created because an account with that same username already exists.
|
authenticate | public int authenticate(String username, String password)(Code) | | Process an authentication request. Verify
that the user's account and password are valid.
Parameters: username - The username for the account. Parameters: password - The password entered by the user. |
createAccount | public void createAccount(String username, String password, String address1, String address2, String city, String state, String zip, String creditCard, String email, Session session) throws LoginException, SessionException(Code) | | This function creates a new account, then calls login() above to
create the session etc...
Parameters: username - The user identification entered by the user. Parameters: password - The password entered by the user. exception: LoginException - Thrown if authentication fails. |
login | public void login(String username, String password, Session session) throws LoginException, SessionException(Code) | | Process a login request issued by a user. Verify
that the user's account and password are valid.
A username may be logged in multiple times. If the login is
sucessfull, the session object's user pointer is set to the
user data object represeting the logged in username.
Parameters: username - The user identification entered by the user. Parameters: password - The password entered by the user. Parameters: session - The session object for the broweser attempting thelogin. exception: LoginException - Thrown if authentication fails. |
|
|