Class 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
    Extends CoreAuthenticationProvider, additionally checks if user is an employee.
    • Constructor Detail

      • BackofficeAuthenticationProvider

        public BackofficeAuthenticationProvider()
    • Method Detail

      • authenticate

        public org.springframework.security.core.Authentication authenticate​(org.springframework.security.core.Authentication authentication)
                                                                      throws org.springframework.security.core.AuthenticationException
        Specified by:
        authenticate in interface org.springframework.security.authentication.AuthenticationProvider
        Overrides:
        authenticate in class CoreAuthenticationProvider
        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)