Class SecurityContextThreadLocalAccessor

java.lang.Object
org.springframework.graphql.execution.SecurityContextThreadLocalAccessor
All Implemented Interfaces:
io.micrometer.context.ThreadLocalAccessor<Object>

public class SecurityContextThreadLocalAccessor extends Object implements io.micrometer.context.ThreadLocalAccessor<Object>
ThreadLocalAccessor to extract and restore security context through SecurityContextHolder. This accessor is automatically registered via ServiceLoader but applies if Spring Security is present on the classpath.
Since:
1.0.0
Author:
Rob Winch, Rossen Stoyanchev
  • Constructor Details

    • SecurityContextThreadLocalAccessor

      public SecurityContextThreadLocalAccessor()
  • Method Details

    • key

      public Object key()
      Specified by:
      key in interface io.micrometer.context.ThreadLocalAccessor<Object>
    • getValue

      public Object getValue()
      Specified by:
      getValue in interface io.micrometer.context.ThreadLocalAccessor<Object>
    • setValue

      public void setValue(Object value)
      Specified by:
      setValue in interface io.micrometer.context.ThreadLocalAccessor<Object>
    • reset

      public void reset()
      Specified by:
      reset in interface io.micrometer.context.ThreadLocalAccessor<Object>