Class DefaultSSOService
java.lang.Object
de.hybris.platform.servicelayer.internal.service.AbstractService
de.hybris.platform.samlsinglesignon.DefaultSSOService
- All Implemented Interfaces:
SSOUserService,Serializable,org.springframework.beans.factory.Aware,org.springframework.beans.factory.BeanNameAware,org.springframework.beans.factory.InitializingBean
- Direct Known Subclasses:
BackofficeSSOService
Default SSO service for getting/creating user
- See Also:
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class de.hybris.platform.servicelayer.internal.service.AbstractService
AbstractService.SerializableDTO -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final Stringprotected static final Stringprotected static final StringFields inherited from class de.hybris.platform.servicelayer.internal.service.AbstractService
tenant -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidadjustUserAttributes(UserModel user, DefaultSSOService.SSOUserMapping mapping) Adjusting user groupsprotected UserModelcreateNewUser(String id, String name, DefaultSSOService.SSOUserMapping userMapping) create a new userprotected DefaultSSOService.SSOUserMappingfindMapping(Collection<String> roles) Maps SSO usergroups to hybris type and groups.protected DefaultSSOService.SSOUserMappingfindMappingInDatabase(Collection<String> roles) protected DefaultSSOService.SSOUserMappingfindMappingInProperties(Collection<String> roles) protected DefaultSSOService.SSOUserMappinggetMappingForRole(String role) getting the mapping for rolesgetOrCreateSSOUser(String id, String name, Collection<String> roles) Return UserModel for existing user or for the newly created.protected UserModellookupExisting(String id, DefaultSSOService.SSOUserMapping mapping) Check if a user exists or notprotected DefaultSSOService.SSOUserMappingperformMapping(List<SamlUserGroupModel> userGroupModels) voidsetModelService(ModelService modelService) voidsetSamlUserGroupDAO(SamlUserGroupDAO samlUserGroupDAO) voidsetUserService(UserService userService) protected voidvalidateMappings(Collection<String> roles, List<SamlUserGroupModel> userGroupModels) Methods inherited from class de.hybris.platform.servicelayer.internal.service.AbstractService
afterPropertiesSet, getCurrentTenant, setBeanName, setCurrentTenant, writeReplace
-
Field Details
-
MD5_PASS_ENCODING
- See Also:
-
SSO_PASS_ENCODING
- See Also:
-
SSO_DATABASE_USERGROUP_MAPPING
- See Also:
-
-
Constructor Details
-
DefaultSSOService
public DefaultSSOService()
-
-
Method Details
-
getOrCreateSSOUser
Description copied from interface:SSOUserServiceReturn UserModel for existing user or for the newly created.- Specified by:
getOrCreateSSOUserin interfaceSSOUserService- Parameters:
id- the user idname- the user nameroles- user roles- Returns:
- existing or newly created user model
-
createNewUser
protected UserModel createNewUser(String id, String name, DefaultSSOService.SSOUserMapping userMapping) create a new user- Parameters:
id- to be used as the user Idname- name of the useruserMapping- user mappings (groups and user type)- Returns:
- a new user model
-
lookupExisting
Check if a user exists or not- Parameters:
id- the user id to search formapping- groups/user type- Returns:
- return user model in case the user is found or null if not found
-
adjustUserAttributes
Adjusting user groups- Parameters:
user- the user to adjust the groups formapping- the mapping which holds the groups
-
findMapping
Maps SSO usergroups to hybris type and groups. If propertySSO_DATABASE_USERGROUP_MAPPINGis true, the mapping is taken from database. Otherwise it takes mapping from properties file.- Parameters:
roles- Roles to map- Returns:
- The mapping
-
findMappingInProperties
-
findMappingInDatabase
-
performMapping
-
validateMappings
-
getMappingForRole
getting the mapping for roles- Parameters:
role- the role to get the mapping for- Returns:
- SSO user mapping object which has the user type and the groups
-
setModelService
-
setUserService
-
setSamlUserGroupDAO
-