Class ReactiveSecurityContextHolderThreadLocalAccessor
java.lang.Object
org.springframework.security.core.context.ReactiveSecurityContextHolderThreadLocalAccessor
- All Implemented Interfaces:
io.micrometer.context.ThreadLocalAccessor<reactor.core.publisher.Mono<SecurityContext>>
public final class ReactiveSecurityContextHolderThreadLocalAccessor
extends Object
implements io.micrometer.context.ThreadLocalAccessor<reactor.core.publisher.Mono<SecurityContext>>
A
ThreadLocalAccessor for accessing a SecurityContext with the
ReactiveSecurityContextHolder.
This class adapts the ReactiveSecurityContextHolder to the
ThreadLocalAccessor contract to allow Micrometer Context Propagation to
automatically propagate a SecurityContext in Reactive applications. It is
automatically registered with the ContextRegistry through
the ServiceLoader mechanism when context-propagation is on the
classpath.
- Since:
- 6.5
- See Also:
-
ContextRegistry
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionreactor.core.publisher.Mono<SecurityContext>getValue()key()voidsetValue()voidsetValue(reactor.core.publisher.Mono<SecurityContext> securityContext) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.micrometer.context.ThreadLocalAccessor
reset, restore, restore
-
Constructor Details
-
ReactiveSecurityContextHolderThreadLocalAccessor
public ReactiveSecurityContextHolderThreadLocalAccessor()
-
-
Method Details
-
key
- Specified by:
keyin interfaceio.micrometer.context.ThreadLocalAccessor<reactor.core.publisher.Mono<SecurityContext>>
-
getValue
- Specified by:
getValuein interfaceio.micrometer.context.ThreadLocalAccessor<reactor.core.publisher.Mono<SecurityContext>>
-
setValue
- Specified by:
setValuein interfaceio.micrometer.context.ThreadLocalAccessor<reactor.core.publisher.Mono<SecurityContext>>
-
setValue
public void setValue()- Specified by:
setValuein interfaceio.micrometer.context.ThreadLocalAccessor<reactor.core.publisher.Mono<SecurityContext>>
-