Class AuthenticationLoggingInterceptor

java.lang.Object
io.micronaut.gcp.credentials.AuthenticationLoggingInterceptor
All Implemented Interfaces:
io.micronaut.aop.Interceptor<Object,Object>, io.micronaut.aop.MethodInterceptor<Object,Object>, io.micronaut.core.order.Ordered

@Singleton public class AuthenticationLoggingInterceptor extends Object implements io.micronaut.aop.MethodInterceptor<Object,Object>
An interceptor for managed instances of GoogleCredentials that logs certain types of authentication errors that the GCP libraries handle silently as infinitely retryable events.
Since:
5.2.0
Author:
Jeremy Grelle
  • Field Summary

    Fields inherited from interface io.micronaut.aop.Interceptor

    ARGUMENT, CACHEABLE_LAZY_TARGET, HOTSWAP, LAZY, PROXY_TARGET

    Fields inherited from interface io.micronaut.core.order.Ordered

    HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    @Nullable Object
    intercept(io.micronaut.aop.MethodInvocationContext<Object,Object> context)
    Intercepts the "getRequestMetadata" call and logs any retryable errors before allowing the GCP library to continue its normal retry algorithm.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface io.micronaut.aop.MethodInterceptor

    intercept

    Methods inherited from interface io.micronaut.core.order.Ordered

    getOrder
  • Constructor Details

    • AuthenticationLoggingInterceptor

      public AuthenticationLoggingInterceptor()
  • Method Details

    • intercept

      @Nullable public @Nullable Object intercept(io.micronaut.aop.MethodInvocationContext<Object,Object> context)
      Intercepts the "getRequestMetadata" call and logs any retryable errors before allowing the GCP library to continue its normal retry algorithm.
      Specified by:
      intercept in interface io.micronaut.aop.MethodInterceptor<Object,Object>
      Parameters:
      context - The method invocation context
      Returns:
      the result of the method invocation