Class RuleRoleHandler

java.lang.Object
ch.tocco.nice2.security.spi.auth.AuthenticationHandlerAdapter
ch.tocco.nice2.userbase.impl.auth.RuleRoleHandler
All Implemented Interfaces:
AuthenticationHandler

@Component @Order(400) public class RuleRoleHandler extends AuthenticationHandlerAdapter
Dynamic role adding
  • Field Details

  • Constructor Details

    • RuleRoleHandler

      public RuleRoleHandler(org.slf4j.Logger log, RuleRoleService ruleRoleService)
  • Method Details

    • postAuthenticate

      public void postAuthenticate(Challenge challenge)
      Description copied from interface: AuthenticationHandler

      After authentication has been successful for all registered AuthenticationHandlers, the post-authentication step is invoked to add more authorization information to the principal which is sure to be not null and authenticated when this method is invoked.

      This handler may also decide in this step to give a new vote for this challenge which overrides the previously given vote.

      If this throws any exception, authentication process is immediately stopped to failed state.

      Specified by:
      postAuthenticate in interface AuthenticationHandler
      Overrides:
      postAuthenticate in class AuthenticationHandlerAdapter
      Parameters:
      challenge - the challenge to authenticate