Class DefaultUserToAuthenticationConverter
- java.lang.Object
-
- de.hybris.platform.servicelayer.security.spring.DefaultUserToAuthenticationConverter
-
- All Implemented Interfaces:
UserToAuthenticationConverter
public class DefaultUserToAuthenticationConverter extends java.lang.Object implements UserToAuthenticationConverter
This implementation copies username and password, converts all user groups toGrantedAuthoritys and puts them into aUsernamePasswordAuthenticationToken. Role names are prefixed, by default with "ROLE_" but this can be configured by setting therolePrefix.
-
-
Constructor Summary
Constructors Constructor Description DefaultUserToAuthenticationConverter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.springframework.security.core.Authenticationconvert(UserModel user)Convert the UserModel to an Authentication object.voidsetRolePrefix(java.lang.String rolePrefix)voidsetUserService(UserService userService)
-
-
-
Method Detail
-
convert
public org.springframework.security.core.Authentication convert(UserModel user)
Description copied from interface:UserToAuthenticationConverterConvert the UserModel to an Authentication object.- Specified by:
convertin interfaceUserToAuthenticationConverter
-
setRolePrefix
public void setRolePrefix(java.lang.String rolePrefix)
-
setUserService
public void setUserService(UserService userService)
-
-