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