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()
void
setValue()
void
setValue
(reactor.core.publisher.Mono<SecurityContext> securityContext) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.micrometer.context.ThreadLocalAccessor
reset, restore, restore
-
Constructor Details
-
ReactiveSecurityContextHolderThreadLocalAccessor
public ReactiveSecurityContextHolderThreadLocalAccessor()
-
-
Method Details
-
key
- Specified by:
key
in interfaceio.micrometer.context.ThreadLocalAccessor<reactor.core.publisher.Mono<SecurityContext>>
-
getValue
- Specified by:
getValue
in interfaceio.micrometer.context.ThreadLocalAccessor<reactor.core.publisher.Mono<SecurityContext>>
-
setValue
- Specified by:
setValue
in interfaceio.micrometer.context.ThreadLocalAccessor<reactor.core.publisher.Mono<SecurityContext>>
-
setValue
public void setValue()- Specified by:
setValue
in interfaceio.micrometer.context.ThreadLocalAccessor<reactor.core.publisher.Mono<SecurityContext>>
-