org.itracker.services.authentication
Class TestAuthenticator
java.lang.Object
org.itracker.services.authentication.AbstractPluggableAuthenticator
org.itracker.services.authentication.DefaultAuthenticator
org.itracker.services.authentication.TestAuthenticator
- All Implemented Interfaces:
- PluggableAuthenticator, AuthenticationConstants
public class TestAuthenticator
- extends DefaultAuthenticator
An authenticator that always returns the admin user.
Mainly for testing
- Author:
- Ricardo Trindade (ricardo.trindade@emation.pt)
| Fields inherited from interface org.itracker.services.util.AuthenticationConstants |
AUTH_TYPE_CERTIFICATE, AUTH_TYPE_PASSWORD_ENC, AUTH_TYPE_PASSWORD_PLAIN, AUTH_TYPE_REQUEST, AUTH_TYPE_SHARED_SECRET, AUTH_TYPE_UNKNOWN, REQ_SOURCE_API, REQ_SOURCE_UNKNOWN, REQ_SOURCE_WEB, UPDATE_TYPE_CORE, UPDATE_TYPE_PERMISSION_ADD, UPDATE_TYPE_PERMISSION_SET, UPDATE_TYPE_PREFERENCE |
|
Method Summary |
boolean |
allowPasswordUpdates(User user,
Object authentication,
int authType,
int reqSource)
The DefaultAuthenticator always allows password updates. |
boolean |
allowProfileUpdates(User user,
Object authentication,
int authType,
int reqSource)
The DefaultAuthenticator always allows profile updates. |
User |
checkLogin(String login,
Object authentication,
int authType,
int reqSource)
Checks the login of a user against the user profile provided in ITracker. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TestAuthenticator
public TestAuthenticator()
checkLogin
public User checkLogin(String login,
Object authentication,
int authType,
int reqSource)
throws AuthenticatorException
- Description copied from class:
DefaultAuthenticator
- Checks the login of a user against the user profile provided in ITracker. This is
the default authentication scheme provided by ITracker.
- Specified by:
checkLogin in interface PluggableAuthenticator- Overrides:
checkLogin in class DefaultAuthenticator
- Parameters:
login - the login the user/client providedauthentication - the user's authentication information, if knownauthType - the type of authentication information being providedreqSource - the source of the request (eg web, api)
- Returns:
- a User if the login is successful
- Throws:
AuthenticatorException - an exception if the login is unsuccessful, or an error occurs- See Also:
org.itracker.ejb.authentication.AbstractPluggableAuthenticator#checkLogin(java.lang.String,
java.lang.Object, int, int)
allowProfileUpdates
public boolean allowProfileUpdates(User user,
Object authentication,
int authType,
int reqSource)
throws AuthenticatorException
- Description copied from class:
DefaultAuthenticator
- The DefaultAuthenticator always allows profile updates.
- Specified by:
allowProfileUpdates in interface PluggableAuthenticator- Overrides:
allowProfileUpdates in class DefaultAuthenticator
- Parameters:
user - a User object that contains the data the user submittedauthentication - the user's authentication information, if knownauthType - the type of authentication information being providedreqSource - the source of the request (eg web, api)
- Returns:
- true
- Throws:
AuthenticatorException - an exception if an error occurs- See Also:
PluggableAuthenticator.allowPasswordUpdates(org.itracker.model.User, java.lang.Object, int, int),
PluggableAuthenticator.allowPermissionUpdates(org.itracker.model.User, java.lang.Object, int, int),
PluggableAuthenticator.allowPreferenceUpdates(org.itracker.model.User, java.lang.Object, int, int)
allowPasswordUpdates
public boolean allowPasswordUpdates(User user,
Object authentication,
int authType,
int reqSource)
throws AuthenticatorException
- Description copied from class:
DefaultAuthenticator
- The DefaultAuthenticator always allows password updates.
- Specified by:
allowPasswordUpdates in interface PluggableAuthenticator- Overrides:
allowPasswordUpdates in class DefaultAuthenticator
- Parameters:
user - a User object that contains the data the user submittedauthentication - the user's authentication information, if knownauthType - the type of authentication information being providedreqSource - the source of the request (eg web, api)
- Returns:
- true
- Throws:
AuthenticatorException - an exception if an error occurs- See Also:
PluggableAuthenticator.allowProfileUpdates(org.itracker.model.User, java.lang.Object, int, int),
PluggableAuthenticator.allowPermissionUpdates(org.itracker.model.User, java.lang.Object, int, int),
PluggableAuthenticator.allowPreferenceUpdates(org.itracker.model.User, java.lang.Object, int, int)
Copyright © 2002-2012 itracker. All Rights Reserved.