@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 void |
addPermissions(HashSet<AdminRole> parsedRoles,
List<org.springframework.security.core.authority.SimpleGrantedAuthority> adminUserAuthorities) |
protected void |
convertPermissionPrefixToRole(List<org.springframework.security.core.authority.SimpleGrantedAuthority> adminUserAuthorities) |
protected AdminUserDetails |
createDetails(AdminUser adminUser,
BroadleafExternalAuthenticationUserDetails details,
Set<org.springframework.security.core.authority.SimpleGrantedAuthority> adminUserAuthorities) |
protected Set<org.springframework.security.core.authority.SimpleGrantedAuthority> |
extractAdminUserAuthorities(HashSet<AdminRole> parsedRoles)
Extracts the
SimpleGrantedAuthoritys for the given List of AdminRoles. |
protected AdminUser |
getAdminUser(BroadleafExternalAuthenticationUserDetails details,
HashSet<AdminRole> parsedRoles) |
protected HashSet<AdminRole> |
parseAdminRoles(BroadleafExternalAuthenticationUserDetails details) |
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 HashSet<AdminRole> parseAdminRoles(BroadleafExternalAuthenticationUserDetails details)
protected 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 void addPermissions(HashSet<AdminRole> parsedRoles, List<org.springframework.security.core.authority.SimpleGrantedAuthority> adminUserAuthorities)
protected void convertPermissionPrefixToRole(List<org.springframework.security.core.authority.SimpleGrantedAuthority> adminUserAuthorities)
protected AdminUser getAdminUser(BroadleafExternalAuthenticationUserDetails details, HashSet<AdminRole> parsedRoles)
protected AdminUserDetails createDetails(AdminUser adminUser, BroadleafExternalAuthenticationUserDetails details, Set<org.springframework.security.core.authority.SimpleGrantedAuthority> adminUserAuthorities)
protected HashSet<String> parseRolesFromUserDetails(BroadleafExternalAuthenticationUserDetails details)
details - the auth detailspublic void setRoleNameSubstitutions(Map<String,String[]> roleNameSubstitutions)
roleNameSubstitutions - Copyright © 2023. All rights reserved.