|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.itracker.services.authentication.AbstractPluggableAuthenticator
org.itracker.services.authentication.DefaultAuthenticator
public class DefaultAuthenticator
This class provides a default authentication scheme for ITracker. It uses passwords in the user table provided by ITracker to authenticate users. This authenticator allows any user to self register if self registration is available in the system.
| Field Summary |
|---|
| 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 |
| Constructor Summary | |
|---|---|
DefaultAuthenticator()
|
|
| Method Summary | |
|---|---|
boolean |
allowPasswordUpdates(User user,
Object authentication,
int authType,
int reqSource)
The DefaultAuthenticator always allows password updates. |
boolean |
allowPermissionUpdates(User user,
Object authentication,
int authType,
int reqSource)
The DefaultAuthenticator always allows permission updates. |
boolean |
allowPreferenceUpdates(User user,
Object authentication,
int authType,
int reqSource)
The DefaultAuthenticator always allows preferences updates. |
boolean |
allowProfileCreation(User user,
Object authentication,
int authType,
int reqSource)
The DefaultAuthenticator always allows new user profiles. |
boolean |
allowProfileUpdates(User user,
Object authentication,
int authType,
int reqSource)
The DefaultAuthenticator always allows profile updates. |
boolean |
allowRegistration(User user,
Object authentication,
int authType,
int reqSource)
The DefaultAuthenticator always allows self registered users. |
User |
checkLogin(String login,
Object authentication,
int authType,
int reqSource)
Checks the login of a user against the user profile provided in ITracker. |
boolean |
createProfile(User user,
Object authentication,
int authType,
int reqSource)
The DefaultAuthenticator does not make any changes to a newly created profile. |
List<Permission> |
getUserPermissions(User user,
int reqSource)
The DefaultAuthenticator returns a list of user permissions from the database. |
List<User> |
getUsersWithProjectPermission(Integer projectId,
int[] permissionTypes,
boolean requireAll,
boolean activeOnly,
int reqSource)
Returns the list of users for a given project. |
boolean |
updateProfile(User user,
int updateType,
Object authentication,
int authType,
int reqSource)
The DefaultAuthenticator does not make any changes to an updated profile. |
| Methods inherited from class org.itracker.services.authentication.AbstractPluggableAuthenticator |
|---|
getConfigurationService, getUserService, initialize |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultAuthenticator()
| Method Detail |
|---|
public User checkLogin(String login,
Object authentication,
int authType,
int reqSource)
throws AuthenticatorException
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)
AuthenticatorException - an exception if the login is unsuccessful, or an error occurs
public List<Permission> getUserPermissions(User user,
int reqSource)
throws AuthenticatorException
user - a User object that contains the user to retrieve permissions forreqSource - the source of the request (eg web, api)
AuthenticatorException - an error occurs
public List<User> getUsersWithProjectPermission(Integer projectId,
int[] permissionTypes,
boolean requireAll,
boolean activeOnly,
int reqSource)
throws AuthenticatorException
projectId - - The Project to search for userspermissionTypes - - User rights to filterrequireAll - - Require all permissionsactiveOnly - - Filter users who are active (Possible user status: DELETED, ACTIVE, LOCKED)reqSource - - not used. TODO: Tagged for removal
AuthenticatorException
public boolean allowRegistration(User user,
Object authentication,
int authType,
int reqSource)
throws AuthenticatorException
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)
AuthenticatorException - an exception if an error occurs
public boolean allowProfileCreation(User user,
Object authentication,
int authType,
int reqSource)
throws AuthenticatorException
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)
AuthenticatorException - an exception if an error occurs
public boolean allowProfileUpdates(User user,
Object authentication,
int authType,
int reqSource)
throws AuthenticatorException
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)
AuthenticatorException - an exception if an error occursPluggableAuthenticator.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)
public boolean allowPasswordUpdates(User user,
Object authentication,
int authType,
int reqSource)
throws AuthenticatorException
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)
AuthenticatorException - an exception if an error occursPluggableAuthenticator.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)
public boolean allowPermissionUpdates(User user,
Object authentication,
int authType,
int reqSource)
throws AuthenticatorException
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)
AuthenticatorException - an exception if an error occursPluggableAuthenticator.allowProfileUpdates(org.itracker.model.User, java.lang.Object, int, int),
PluggableAuthenticator.allowPasswordUpdates(org.itracker.model.User, java.lang.Object, int, int),
PluggableAuthenticator.allowPreferenceUpdates(org.itracker.model.User, java.lang.Object, int, int)
public boolean allowPreferenceUpdates(User user,
Object authentication,
int authType,
int reqSource)
throws AuthenticatorException
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)
AuthenticatorException - an exception if an error occursPluggableAuthenticator.allowProfileUpdates(org.itracker.model.User, java.lang.Object, int, int),
PluggableAuthenticator.allowPasswordUpdates(org.itracker.model.User, java.lang.Object, int, int),
PluggableAuthenticator.allowPermissionUpdates(org.itracker.model.User, java.lang.Object, int, int)
public boolean createProfile(User user,
Object authentication,
int authType,
int reqSource)
throws AuthenticatorException
user - a User object that contains the newly created profileauthentication - the user's authentication information, if knownauthType - the type of authentication information being providedreqSource - the source of the request (eg web, api)
AuthenticatorException - an error occursPluggableAuthenticator.updateProfile(org.itracker.model.User, int, java.lang.Object, int, int)
public boolean updateProfile(User user,
int updateType,
Object authentication,
int authType,
int reqSource)
throws AuthenticatorException
user - a User object that contains the updated profileupdateType - the type of information that is being updatedauthentication - the user's authentication information, if knownauthType - the type of authentication information being providedreqSource - the source of the request (eg web, api)
AuthenticatorException - an exception if the login is unsuccessful, or an error occurs
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||