@Service(value="blAdminUserProvisioningService") public class AdminUserProvisioningServiceImpl extends Object implements AdminUserProvisioningService
| Modifier and Type | Field and Description |
|---|---|
protected AdminExternalLoginUserExtensionManager |
adminExternalLoginExtensionManager |
protected AdminSecurityHelper |
adminSecurityHelper |
protected Map<String,String[]> |
roleNameSubstitutions |
protected AdminSecurityService |
securityService |
| Constructor and Description |
|---|
AdminUserProvisioningServiceImpl() |
| Modifier and Type | Method and Description |
|---|---|
protected Set<org.springframework.security.core.authority.SimpleGrantedAuthority> |
extractAdminUserAuthorities(HashSet<AdminRole> parsedRoles)
Extracts the
SimpleGrantedAuthoritys for the given List of AdminRoles. |
protected HashSet<String> |
parseRolesFromUserDetails(BroadleafExternalAuthenticationUserDetails details)
Uses the provided role name substitutions to map the LDAP roles to Broadleaf roles.
|
AdminUserDetails |
provisionAdminUser(BroadleafExternalAuthenticationUserDetails details)
This method uses the details argument to add or update an AdminUser object in the database,
along with appropriate roles and permissions.
|
void |
setRoleNameSubstitutions(Map<String,String[]> roleNameSubstitutions)
This allows you to declaratively set a map containing values that will substitute role names from LDAP to Broadleaf roles names in cases that they might be different.
|
protected AdminSecurityService securityService
protected AdminExternalLoginUserExtensionManager adminExternalLoginExtensionManager
protected AdminSecurityHelper adminSecurityHelper
public AdminUserDetails provisionAdminUser(BroadleafExternalAuthenticationUserDetails details)
AdminUserProvisioningServiceprovisionAdminUser in interface AdminUserProvisioningServiceprotected Set<org.springframework.security.core.authority.SimpleGrantedAuthority> extractAdminUserAuthorities(HashSet<AdminRole> parsedRoles)
SimpleGrantedAuthoritys for the given List of AdminRoles. In addition, this will handle
populating the default roles. This method returns a Set in order to avoid the duplication between the permissions of different roles.parsedRoles - a List of AdminRoleprotected HashSet<String> parseRolesFromUserDetails(BroadleafExternalAuthenticationUserDetails details)
details - the auth detailspublic void setRoleNameSubstitutions(Map<String,String[]> roleNameSubstitutions)
roleNameSubstitutions - Copyright © 2018. All rights reserved.