org.broadleafcommerce.openadmin.server.security.service
Interface AdminSecurityService

All Known Implementing Classes:
AdminSecurityServiceImpl

public interface AdminSecurityService

Author:
jfischer

Method Summary
 AdminUser changePassword(PasswordChange passwordChange)
           
 GenericResponse changePassword(String username, String oldPassword, String password, String confirmPassword)
           
 void deleteAdminPermission(AdminPermission permission)
           
 void deleteAdminRole(AdminRole role)
           
 void deleteAdminUser(AdminUser user)
           
 boolean doesOperationExistForCeilingEntity(PermissionType permissionType, String ceilingEntityFullyQualifiedName)
           
 String getSalt()
          Deprecated. use getSaltSource() instead
 Object getSalt(AdminUser user)
          Gets the salt object for the current admin user.
 org.springframework.security.authentication.dao.SaltSource getSaltSource()
          Returns the SaltSource used with the blAdminPasswordEncoder to encrypt the user password.
 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<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
 void setSaltSource(org.springframework.security.authentication.dao.SaltSource saltSource)
          Sets the SaltSource used with blAdminPasswordencoder to encrypt the user password.
 

Method Detail

readAllAdminUsers

List<AdminUser> readAllAdminUsers()

readAdminUserById

AdminUser readAdminUserById(Long id)

readAdminUserByUserName

AdminUser readAdminUserByUserName(String userName)

saveAdminUser

AdminUser saveAdminUser(AdminUser user)

deleteAdminUser

void deleteAdminUser(AdminUser user)

readAllAdminRoles

List<AdminRole> readAllAdminRoles()

readAdminRoleById

AdminRole readAdminRoleById(Long id)

saveAdminRole

AdminRole saveAdminRole(AdminRole role)

deleteAdminRole

void deleteAdminRole(AdminRole role)

readAllAdminPermissions

List<AdminPermission> readAllAdminPermissions()

readAdminPermissionById

AdminPermission readAdminPermissionById(Long id)

saveAdminPermission

AdminPermission saveAdminPermission(AdminPermission permission)

deleteAdminPermission

void deleteAdminPermission(AdminPermission permission)

changePassword

AdminUser changePassword(PasswordChange passwordChange)

isUserQualifiedForOperationOnCeilingEntity

boolean isUserQualifiedForOperationOnCeilingEntity(AdminUser adminUser,
                                                   PermissionType permissionType,
                                                   String ceilingEntityFullyQualifiedName)

doesOperationExistForCeilingEntity

boolean doesOperationExistForCeilingEntity(PermissionType permissionType,
                                           String ceilingEntityFullyQualifiedName)

sendForgotUsernameNotification

GenericResponse sendForgotUsernameNotification(String emailAddress)
Looks up the corresponding AdminUser and emails the address on file with the associated username.

Parameters:
emailAddress -
Returns:
Response can contain errors including (notFound)

sendResetPasswordNotification

GenericResponse sendResetPasswordNotification(String userName)
Generates an access token and then emails the user.

Parameters:
userName -
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 - Name of the user
token - Valid reset token
password - new password
Returns:
Response can contain errors including (invalidUsername, inactiveUser, invalidToken, invalidPassword, tokenExpired, passwordMismatch)

changePassword

GenericResponse changePassword(String username,
                               String oldPassword,
                               String password,
                               String confirmPassword)

getSalt

@Deprecated
String getSalt()
Deprecated. use getSaltSource() instead


setSalt

@Deprecated
void setSalt(String salt)
Deprecated. use setSaltSource(SaltSource) instead


getSaltSource

org.springframework.security.authentication.dao.SaltSource getSaltSource()
Returns the SaltSource 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 configured


setSaltSource

void setSaltSource(org.springframework.security.authentication.dao.SaltSource saltSource)
Sets the SaltSource used with blAdminPasswordencoder to encrypt the user password. Usually configured within applicationContext-admin-security.xml

Parameters:
saltSource -

getSalt

Object getSalt(AdminUser user)
Gets the salt object for the current admin user. By default this delegates to getSaltSource(). If there is not a SaltSource configured (getSaltSource() returns null) then this also returns null.

Parameters:
user -
Returns:
the salt for the current admin user


Copyright © 2013. All Rights Reserved.