Interface AdminSecurityService
- All Known Implementing Classes:
AdminSecurityServiceImpl
public interface AdminSecurityService
- Author:
- jfischer
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionchangePassword
(String username, String oldPassword, String password, String confirmPassword) Change a user's password only if oldPassword matches what's stored for that userchangePassword
(PasswordChange passwordChange) void
Clears the cache used forisUserQualifiedForOperationOnCeilingEntity(AdminUser, PermissionType, String)
void
deleteAdminPermission
(AdminPermission permission) void
deleteAdminRole
(AdminRole role) void
deleteAdminUser
(AdminUser user) boolean
doesOperationExistForCeilingEntity
(PermissionType permissionType, String ceilingEntityFullyQualifiedName) boolean
isUserQualifiedForOperationOnCeilingEntity
(AdminUser adminUser, PermissionType permissionType, String ceilingEntityFullyQualifiedName) readAdminUserByUserName
(String userName) readAdminUsersByEmail
(String email) Returns a list of admin users that match the given email.resetPasswordUsingToken
(String username, String token, String password, String confirmPassword) Updates the password for the passed in user only if the passed in token is valid for that user.saveAdminPermission
(AdminPermission permission) saveAdminRole
(AdminRole role) saveAdminUser
(AdminUser user) sendForgotUsernameNotification
(String emailAddress) Looks up the corresponding AdminUser and emails the address on file with the associated username.sendResetPasswordNotification
(String userName) Generates an access token and then emails the user.
-
Field Details
-
DEFAULT_PERMISSIONS
-
-
Method Details
-
readAllAdminUsers
-
readAdminUserById
-
readAdminUserByUserName
-
saveAdminUser
-
deleteAdminUser
-
readAllAdminRoles
-
readAdminRoleById
-
saveAdminRole
-
deleteAdminRole
-
readAllAdminPermissions
List<AdminPermission> readAllAdminPermissions() -
readAdminPermissionById
-
saveAdminPermission
-
deleteAdminPermission
-
clearAdminSecurityCache
void clearAdminSecurityCache()Clears the cache used forisUserQualifiedForOperationOnCeilingEntity(AdminUser, PermissionType, String)
-
changePassword
-
isUserQualifiedForOperationOnCeilingEntity
boolean isUserQualifiedForOperationOnCeilingEntity(AdminUser adminUser, PermissionType permissionType, String ceilingEntityFullyQualifiedName) -
doesOperationExistForCeilingEntity
boolean doesOperationExistForCeilingEntity(PermissionType permissionType, String ceilingEntityFullyQualifiedName) -
sendForgotUsernameNotification
Looks up the corresponding AdminUser and emails the address on file with the associated username.- Parameters:
emailAddress
- email address of user to email- Returns:
- Response can contain errors including (notFound)
-
sendResetPasswordNotification
Generates an access token and then emails the user.- Parameters:
userName
- the username of the user to send a password reset email- Returns:
- Response can contain errors including (invalidEmail, invalidUsername, inactiveUser)
-
resetPasswordUsingToken
GenericResponse resetPasswordUsingToken(String username, String token, String password, String confirmPassword) Updates the password for the passed in user only if the passed in token is valid for that user.- Parameters:
username
- the username of the usertoken
- a valid reset token from the emailpassword
- the new desired passwordconfirmPassword
- the password confirmation to match password- Returns:
- Response can contain errors including (invalidUsername, inactiveUser, invalidToken, invalidPassword, tokenExpired, passwordMismatch)
-
changePassword
GenericResponse changePassword(String username, String oldPassword, String password, String confirmPassword) Change a user's password only if oldPassword matches what's stored for that user- Parameters:
username
- the username to change the password foroldPassword
- the user's current passwordpassword
- the desired new passwordconfirmPassword
- the confirm password to ensure it matches password- Returns:
- Response can contain errors including (invalidUser, emailNotFound, inactiveUser, invalidPassword, passwordMismatch)
-
readAdminUsersByEmail
Returns a list of admin users that match the given email. This could potentially return more than one user if the admin.user.requireUniqueEmailAddress property is set to false.
-