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:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionreactor.core.publisher.Mono<org.springframework.security.core.Authentication> convert(org.springframework.web.server.ServerWebExchange exchange) Converts the givenServerWebExchangeto anreactor.core.publisher.Mono<ai.yda.framework.channel.shared.TokenAuthentication>.
-
Constructor Details
-
TokenAuthenticationConverter
public TokenAuthenticationConverter()Default constructor forTokenAuthenticationConverter.
-
-
Method Details
-
convert
public reactor.core.publisher.Mono<org.springframework.security.core.Authentication> convert(org.springframework.web.server.ServerWebExchange exchange) Converts the givenServerWebExchangeto anreactor.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:
convertin interfaceorg.springframework.security.web.server.authentication.ServerAuthenticationConverter- Parameters:
exchange- theServerWebExchangeto 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.
-