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
public class BackofficeAuthenticationProvider extends CoreAuthenticationProvider
ExtendsCoreAuthenticationProvider, 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 Constructor Description BackofficeAuthenticationProvider()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.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
-
-
-
-
Method Detail
-
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
public void setUserService(UserService userService)
-
-