Class AudittrailAnnotationInterceptor

java.lang.Object
org.trustdeck.security.audittrail.annotation.AudittrailAnnotationInterceptor
All Implemented Interfaces:
org.springframework.web.servlet.HandlerInterceptor

@Component public class AudittrailAnnotationInterceptor extends Object implements org.springframework.web.servlet.HandlerInterceptor
This interceptor is used to pass some audit information through to the request-object to make it available for the filters where the actual logging is triggered.
Author:
Armin Müller and Eric Wündisch
  • Field Details

    • AUDIT_ANNOTATION_IDENTIFIER

      public static final String AUDIT_ANNOTATION_IDENTIFIER
      The identifying attribute name under which the audit annotation is stored in the request object.
    • AUDIT_KEYCLOAK_AUTHENTICATION_TOKEN

      public static final String AUDIT_KEYCLOAK_AUTHENTICATION_TOKEN
      The identifying attribute name under which the keycloak authentication token is stored in the request object.
  • Constructor Details

    • AudittrailAnnotationInterceptor

      public AudittrailAnnotationInterceptor()
  • Method Details

    • preHandle

      public boolean preHandle(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, Object handler) throws Exception
      Specified by:
      preHandle in interface org.springframework.web.servlet.HandlerInterceptor
      Throws:
      Exception
    • postHandle

      public void postHandle(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, Object handler, org.springframework.web.servlet.ModelAndView modelAndView) throws Exception
      Specified by:
      postHandle in interface org.springframework.web.servlet.HandlerInterceptor
      Throws:
      Exception
    • afterCompletion

      public void afterCompletion(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, Object handler, Exception exception) throws Exception
      Specified by:
      afterCompletion in interface org.springframework.web.servlet.HandlerInterceptor
      Throws:
      Exception