Class AuthenticationInterceptor

  • All Implemented Interfaces:
    org.aopalliance.aop.Advice, org.aopalliance.intercept.Interceptor, org.aopalliance.intercept.MethodInterceptor

    @ThreadSafe
    public class AuthenticationInterceptor
    extends Object
    implements org.aopalliance.intercept.MethodInterceptor
    Stores the Authentication object of the current user and allows this to be set to the SecurityContextHolder prior to authorization steps.
    Author:
    Tim Dudgeon
    • Constructor Detail

      • AuthenticationInterceptor

        public AuthenticationInterceptor()
        Creates a new instance of AuthenticationInterceptor
    • Method Detail

      • setAuthentication

        public void setAuthentication​(org.springframework.security.core.Authentication authentication)
      • getAuthentication

        public org.springframework.security.core.Authentication getAuthentication()
      • getUsername

        public String getUsername()
      • invoke

        public Object invoke​(org.aopalliance.intercept.MethodInvocation methodInvocation)
                      throws Throwable
        Specified by:
        invoke in interface org.aopalliance.intercept.MethodInterceptor
        Throws:
        Throwable