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
- Specified by:
key
in interfaceio.micrometer.context.ThreadLocalAccessor<Object>
-
getValue
- Specified by:
getValue
in interfaceio.micrometer.context.ThreadLocalAccessor<Object>
-
setValue
- Specified by:
setValue
in interfaceio.micrometer.context.ThreadLocalAccessor<Object>
-
setValue
public void setValue()- Specified by:
setValue
in interfaceio.micrometer.context.ThreadLocalAccessor<Object>
-
reset
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
reset
in interfaceio.micrometer.context.ThreadLocalAccessor<Object>
-
restore
- Specified by:
restore
in interfaceio.micrometer.context.ThreadLocalAccessor<Object>
-
restoreInternal
-
restore
public void restore()- Specified by:
restore
in interfaceio.micrometer.context.ThreadLocalAccessor<Object>
-