Class TokenAuthenticationManager
java.lang.Object
ai.yda.framework.channel.rest.spring.streaming.security.TokenAuthenticationManager
- All Implemented Interfaces:
org.springframework.security.authentication.ReactiveAuthenticationManager
public class TokenAuthenticationManager
extends Object
implements org.springframework.security.authentication.ReactiveAuthenticationManager
Provide mechanism to processes an
Authentication request with TokenAuthentication in the reactive
manner.- Since:
- 0.1.0
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionTokenAuthenticationManager(String token) Constructs a newTokenAuthenticationManagerinstance with the provided token. -
Method Summary
Modifier and TypeMethodDescriptionreactor.core.publisher.Mono<org.springframework.security.core.Authentication> authenticate(org.springframework.security.core.Authentication authentication) Authenticates the givenAuthenticationrequest by comparing its credentials with the stored token key hash.
-
Constructor Details
-
TokenAuthenticationManager
Constructs a newTokenAuthenticationManagerinstance with the provided token.- Parameters:
token- the token from which the key hash is extracted and stored for authentication purposes.
-
-
Method Details
-
authenticate
public reactor.core.publisher.Mono<org.springframework.security.core.Authentication> authenticate(org.springframework.security.core.Authentication authentication) throws org.springframework.security.core.AuthenticationException Authenticates the givenAuthenticationrequest by comparing its credentials with the stored token key hash.- Specified by:
authenticatein interfaceorg.springframework.security.authentication.ReactiveAuthenticationManager- Parameters:
authentication- theAuthenticationrequest to be processed.- Returns:
- the authenticated
reactor.core.publisher.Mono<org.springframework.security.core.Authentication>object if the credentials match the token key hash. - Throws:
org.springframework.security.core.AuthenticationException- if the credentials do not match the token key hash.
-