Class RejectUserPreAuthenticationChecks

  • All Implemented Interfaces:
    org.springframework.beans.factory.Aware, org.springframework.context.MessageSourceAware, org.springframework.security.core.userdetails.UserDetailsChecker

    public class RejectUserPreAuthenticationChecks
    extends org.springframework.security.authentication.AccountStatusUserDetailsChecker
    Used by CoreAuthenticationProvider.

    The setup below rejects login attempts of user 'foo' (UID based restriction) and of customers in general (type based restriction).

    See: /ext/cockpit/resources/cockpit/cockpit-spring-security.xml

            
                    
                            
                                    foo
                            
                    
                    
                            
                                    Customer
                            
                    
            
     
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected org.springframework.context.support.MessageSourceAccessor messages  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void check​(org.springframework.security.core.userdetails.UserDetails userDetails)  
      protected void checkForAllowedGroups​(User user)  
      protected void checkUserType​(User user)  
      protected ComposedType getComposedType​(java.lang.String code)  
      void setAllowedUserGroups​(java.util.Collection<java.lang.String> allowedUserGroups)  
      void setAllowedUserTypes​(java.util.Collection<java.lang.String> allowedUserTypes)  
      • Methods inherited from class org.springframework.security.authentication.AccountStatusUserDetailsChecker

        setMessageSource
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • messages

        protected org.springframework.context.support.MessageSourceAccessor messages
    • Constructor Detail

      • RejectUserPreAuthenticationChecks

        public RejectUserPreAuthenticationChecks()
    • Method Detail

      • setAllowedUserTypes

        public void setAllowedUserTypes​(java.util.Collection<java.lang.String> allowedUserTypes)
      • setAllowedUserGroups

        public void setAllowedUserGroups​(java.util.Collection<java.lang.String> allowedUserGroups)
      • check

        public void check​(org.springframework.security.core.userdetails.UserDetails userDetails)
        Specified by:
        check in interface org.springframework.security.core.userdetails.UserDetailsChecker
        Overrides:
        check in class org.springframework.security.authentication.AccountStatusUserDetailsChecker
      • checkForAllowedGroups

        protected void checkForAllowedGroups​(User user)
      • checkUserType

        protected void checkUserType​(User user)
      • getComposedType

        protected ComposedType getComposedType​(java.lang.String code)