Class AccessTokenAppender
- java.lang.Object
-
- org.bremersee.web.reactive.function.client.AccessTokenAppender
-
- All Implemented Interfaces:
org.springframework.web.reactive.function.client.ExchangeFilterFunction
public class AccessTokenAppender extends Object implements org.springframework.web.reactive.function.client.ExchangeFilterFunction
The access token appender.- Author:
- Christian Bremer
-
-
Constructor Summary
Constructors Constructor Description AccessTokenAppender(AccessTokenProvider<reactor.core.publisher.Mono<String>> accessTokenProvider)
Instantiates a new access token appender.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description reactor.core.publisher.Mono<org.springframework.web.reactive.function.client.ClientResponse>
filter(org.springframework.web.reactive.function.client.ClientRequest request, org.springframework.web.reactive.function.client.ExchangeFunction next)
static AccessTokenAppender
fromAuthentication()
From authentication access token appender.static AccessTokenAppender
withAccessTokenRetriever(AccessTokenRetriever<reactor.core.publisher.Mono<String>> retriever, AccessTokenRetrieverProperties properties)
With access token retriever access token appender.static AccessTokenAppender
withAccessTokenRetriever(AccessTokenRetrieverProperties properties)
With access token retriever access token appender.
-
-
-
Constructor Detail
-
AccessTokenAppender
public AccessTokenAppender(AccessTokenProvider<reactor.core.publisher.Mono<String>> accessTokenProvider)
Instantiates a new access token appender.- Parameters:
accessTokenProvider
- the access token provider
-
-
Method Detail
-
filter
@NonNull public reactor.core.publisher.Mono<org.springframework.web.reactive.function.client.ClientResponse> filter(@NonNull org.springframework.web.reactive.function.client.ClientRequest request, @NonNull org.springframework.web.reactive.function.client.ExchangeFunction next)
- Specified by:
filter
in interfaceorg.springframework.web.reactive.function.client.ExchangeFilterFunction
-
fromAuthentication
public static AccessTokenAppender fromAuthentication()
From authentication access token appender.- Returns:
- the access token appender
-
withAccessTokenRetriever
public static AccessTokenAppender withAccessTokenRetriever(AccessTokenRetrieverProperties properties)
With access token retriever access token appender.- Parameters:
properties
- the properties- Returns:
- the access token appender
-
withAccessTokenRetriever
public static AccessTokenAppender withAccessTokenRetriever(AccessTokenRetriever<reactor.core.publisher.Mono<String>> retriever, AccessTokenRetrieverProperties properties)
With access token retriever access token appender.- Parameters:
retriever
- the retrieverproperties
- the properties- Returns:
- the access token appender
-
-