Class 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​(org.bremersee.security.authentication.AccessTokenProvider<reactor.core.publisher.Mono<String>> accessTokenProvider)
      Instantiates a new access token appender.
    • Constructor Detail

      • AccessTokenAppender

        public AccessTokenAppender​(org.bremersee.security.authentication.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 interface org.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​(org.bremersee.security.authentication.AccessTokenRetrieverProperties properties)
        With access token retriever access token appender.
        Parameters:
        properties - the properties
        Returns:
        the access token appender
      • withAccessTokenRetriever

        public static AccessTokenAppender withAccessTokenRetriever​(org.bremersee.security.authentication.AccessTokenRetriever<reactor.core.publisher.Mono<String>> retriever,
                                                                   org.bremersee.security.authentication.AccessTokenRetrieverProperties properties)
        With access token retriever access token appender.
        Parameters:
        retriever - the retriever
        properties - the properties
        Returns:
        the access token appender