Class TokenAuthenticationConverter

java.lang.Object
ai.yda.framework.channel.rest.spring.streaming.security.TokenAuthenticationConverter
All Implemented Interfaces:
org.springframework.security.web.server.authentication.ServerAuthenticationConverter

public class TokenAuthenticationConverter extends Object implements org.springframework.security.web.server.authentication.ServerAuthenticationConverter
Provides strategy used for converting from a ServerWebExchange to an reactor.core.publisher.Mono<ai.yda.framework.channel.shared.TokenAuthentication>. Used to authenticate with TokenAuthenticationManager. If the result is null, then it signals that no authentication attempt should be made.
Since:
0.1.0
See Also:
  • TokenAuthentication
  • Constructor Details

  • Method Details

    • convert

      public reactor.core.publisher.Mono<org.springframework.security.core.Authentication> convert(org.springframework.web.server.ServerWebExchange exchange)
      Converts the given ServerWebExchange to an reactor.core.publisher.Mono<ai.yda.framework.channel.shared.TokenAuthentication>. If the result is null, then it signals that no authentication attempt should be made.
      Specified by:
      convert in interface org.springframework.security.web.server.authentication.ServerAuthenticationConverter
      Parameters:
      exchange - the ServerWebExchange to be converted.
      Returns:
      the reactor.core.publisher.Mono<org.springframework.security.core.Authentication> that is a result of conversion or null if there is no authentication.