AuthenticationConstants
, PluggableAuthenticator
TestAuthenticator
, WindowsSSONAuthenticator
public class DefaultAuthenticator extends AbstractPluggableAuthenticator
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 | Description |
---|---|
DefaultAuthenticator() |
Modifier and Type | Method | Description |
---|---|---|
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) |
Deprecated.
|
List<User> |
getUsersWithProjectPermission(Integer projectId,
PermissionType[] 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.
|
getConfigurationService, getUserService, initialize
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 occurspublic 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 occurspublic List<User> getUsersWithProjectPermission(Integer projectId, PermissionType[] 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 removalAuthenticatorException
- an error occurs@Deprecated public List<User> getUsersWithProjectPermission(Integer projectId, int[] permissionTypes, boolean requireAll, boolean activeOnly, int reqSource) throws AuthenticatorException
PluggableAuthenticator
projectId
- id of the project on which the users return have permissionspermissionTypes
- types of permissions requiredrequireAll
- true is the user must possess any of the permissions, false if only one is requiredactiveOnly
- true if only users listed as active should be returnedreqSource
- the source of the request (eg web, api)AuthenticatorException
- an error occurspublic 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 occurspublic 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 occurspublic 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 occursCopyright © 2002–2019 itracker. All rights reserved.