Class BackofficeAuthenticationProvider
java.lang.Object
de.hybris.platform.spring.security.CoreAuthenticationProvider
com.hybris.backoffice.spring.security.BackofficeAuthenticationProvider
- All Implemented Interfaces:
org.springframework.beans.factory.Aware,org.springframework.beans.factory.InitializingBean,org.springframework.context.MessageSourceAware,org.springframework.security.authentication.AuthenticationProvider
Extends
CoreAuthenticationProvider, additionally checks if user is an employee.-
Nested Class Summary
Nested classes/interfaces inherited from class de.hybris.platform.spring.security.CoreAuthenticationProvider
CoreAuthenticationProvider.CoreAuthenticationException -
Field Summary
Fields inherited from class de.hybris.platform.spring.security.CoreAuthenticationProvider
messages -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.security.core.Authenticationauthenticate(org.springframework.security.core.Authentication authentication) protected voidcheckBackofficeAccess(EmployeeModel employee) Checks if user has permissions to access Backoffice application.protected org.springframework.security.core.AuthenticationcoreAuthenticate(org.springframework.security.core.Authentication authentication) voidsetUserService(UserService userService) Methods inherited from class de.hybris.platform.spring.security.CoreAuthenticationProvider
additionalAuthenticationChecks, afterPropertiesSet, createSuccessAuthentication, getPreAuthenticationChecks, getUserDetailsService, retrieveUser, setMessageSource, setPreAuthenticationChecks, setUserDetailsService, supports
-
Constructor Details
-
BackofficeAuthenticationProvider
public BackofficeAuthenticationProvider()
-
-
Method Details
-
authenticate
public org.springframework.security.core.Authentication authenticate(org.springframework.security.core.Authentication authentication) throws org.springframework.security.core.AuthenticationException - Specified by:
authenticatein interfaceorg.springframework.security.authentication.AuthenticationProvider- Overrides:
authenticatein classCoreAuthenticationProvider- Throws:
org.springframework.security.core.AuthenticationException
-
checkBackofficeAccess
protected void checkBackofficeAccess(EmployeeModel employee) throws org.springframework.security.authentication.DisabledException Checks if user has permissions to access Backoffice application. Should throw DisabledException if access is denied.- Parameters:
employee- user to check- Throws:
org.springframework.security.authentication.DisabledException- if user has no access to Backoffice
-
coreAuthenticate
protected org.springframework.security.core.Authentication coreAuthenticate(org.springframework.security.core.Authentication authentication) -
setUserService
-