public interface AdminSecurityService
Modifier and Type | Field and Description |
---|---|
static String[] |
DEFAULT_PERMISSIONS |
Modifier and Type | Method and Description |
---|---|
AdminUser |
changePassword(PasswordChange passwordChange) |
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
|
void |
clearAdminSecurityCache()
Clears the cache used for
isUserQualifiedForOperationOnCeilingEntity(AdminUser, PermissionType, String) |
void |
deleteAdminPermission(AdminPermission permission) |
void |
deleteAdminRole(AdminRole role) |
void |
deleteAdminUser(AdminUser user) |
boolean |
doesOperationExistForCeilingEntity(PermissionType permissionType,
String ceilingEntityFullyQualifiedName) |
String |
getSalt()
Deprecated.
use
getSaltSource() instead, this will be removed in 4.2 |
Object |
getSalt(AdminUser user,
String unencodedPassword)
Deprecated.
the new
PasswordEncoder handles salting internally, this will be removed in 4.2 |
org.springframework.security.authentication.dao.SaltSource |
getSaltSource()
Deprecated.
the new
PasswordEncoder handles salting internally, this will be removed in 4.2 |
boolean |
isUserQualifiedForOperationOnCeilingEntity(AdminUser adminUser,
PermissionType permissionType,
String ceilingEntityFullyQualifiedName) |
AdminPermission |
readAdminPermissionById(Long id) |
AdminRole |
readAdminRoleById(Long id) |
AdminUser |
readAdminUserById(Long id) |
AdminUser |
readAdminUserByUserName(String userName) |
List<AdminUser> |
readAdminUsersByEmail(String email)
Returns a list of admin users that match the given email.
|
List<AdminPermission> |
readAllAdminPermissions() |
List<AdminRole> |
readAllAdminRoles() |
List<AdminUser> |
readAllAdminUsers() |
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.
|
AdminPermission |
saveAdminPermission(AdminPermission permission) |
AdminRole |
saveAdminRole(AdminRole role) |
AdminUser |
saveAdminUser(AdminUser user) |
GenericResponse |
sendForgotUsernameNotification(String emailAddress)
Looks up the corresponding AdminUser and emails the address on file with
the associated username.
|
GenericResponse |
sendResetPasswordNotification(String userName)
Generates an access token and then emails the user.
|
void |
setSalt(String salt)
Deprecated.
use
setSaltSource(SaltSource) instead, this will be removed in 4.2 |
void |
setSaltSource(org.springframework.security.authentication.dao.SaltSource saltSource)
Deprecated.
the new
PasswordEncoder handles salting internally, this will be removed in 4.2 |
static final String[] DEFAULT_PERMISSIONS
void deleteAdminUser(AdminUser user)
void deleteAdminRole(AdminRole role)
List<AdminPermission> readAllAdminPermissions()
AdminPermission readAdminPermissionById(Long id)
AdminPermission saveAdminPermission(AdminPermission permission)
void deleteAdminPermission(AdminPermission permission)
void clearAdminSecurityCache()
isUserQualifiedForOperationOnCeilingEntity(AdminUser, PermissionType, String)
AdminUser changePassword(PasswordChange passwordChange)
boolean isUserQualifiedForOperationOnCeilingEntity(AdminUser adminUser, PermissionType permissionType, String ceilingEntityFullyQualifiedName)
boolean doesOperationExistForCeilingEntity(PermissionType permissionType, String ceilingEntityFullyQualifiedName)
GenericResponse sendForgotUsernameNotification(String emailAddress)
emailAddress
- email address of user to emailGenericResponse sendResetPasswordNotification(String userName)
userName
- the username of the user to send a password reset emailGenericResponse resetPasswordUsingToken(String username, String token, String password, String confirmPassword)
username
- the username of the usertoken
- a valid reset token from the emailpassword
- the new desired passwordconfirmPassword
- the password confirmation to match passwordGenericResponse changePassword(String username, String oldPassword, String password, String confirmPassword)
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@Deprecated String getSalt()
getSaltSource()
instead, this will be removed in 4.2@Deprecated void setSalt(String salt)
setSaltSource(SaltSource)
instead, this will be removed in 4.2salt
- the new salt string to use@Deprecated org.springframework.security.authentication.dao.SaltSource getSaltSource()
PasswordEncoder
handles salting internally, this will be removed in 4.2SaltSource
used with the blAdminPasswordEncoder to encrypt the user password. Usually configured in
applicationContext-admin-security.xml. This is not a required property and will return null if not configuredSaltSource
@Deprecated void setSaltSource(org.springframework.security.authentication.dao.SaltSource saltSource)
PasswordEncoder
handles salting internally, this will be removed in 4.2SaltSource
used with blAdminPasswordEncoder to encrypt the user password. Usually configured within
applicationContext-admin-security.xmlsaltSource
- the new SaltSource
to use@Deprecated Object getSalt(AdminUser user, String unencodedPassword)
PasswordEncoder
handles salting internally, this will be removed in 4.2getSaltSource()
. If there is
not a SaltSource
configured (getSaltSource()
returns null) then this also returns null.user
- the AdminUser
to get UserDetails
fromunencodedPassword
- the unencoded passwordCopyright © 2019. All rights reserved.