public class MockAuthenticationProvider extends java.lang.Object implements AuthenticationProvider
Constructor and Description |
---|
MockAuthenticationProvider(java.util.List<SuccessAuthenticationScenario> successAuthenticationScenarioList) |
MockAuthenticationProvider(java.util.List<SuccessAuthenticationScenario> successAuthenticationScenarioList,
java.util.List<FailedAuthenticationScenario> failedAuthenticationScenarioList) |
Modifier and Type | Method and Description |
---|---|
org.reactivestreams.Publisher<AuthenticationResponse> |
authenticate(io.micronaut.http.HttpRequest<?> httpRequest,
AuthenticationRequest<?,?> authenticationRequest)
Authenticates a user with the given request.
|
public MockAuthenticationProvider(java.util.List<SuccessAuthenticationScenario> successAuthenticationScenarioList)
successAuthenticationScenarioList
- Successful scenariospublic MockAuthenticationProvider(java.util.List<SuccessAuthenticationScenario> successAuthenticationScenarioList, java.util.List<FailedAuthenticationScenario> failedAuthenticationScenarioList)
successAuthenticationScenarioList
- Successful scenariosfailedAuthenticationScenarioList
- Failure scenariospublic org.reactivestreams.Publisher<AuthenticationResponse> authenticate(io.micronaut.http.HttpRequest<?> httpRequest, AuthenticationRequest<?,?> authenticationRequest)
AuthenticationProvider
Authentication
.
Publishers MUST emit cold observables! This method will be called for
all authenticators for each authentication request and it is assumed no work
will be done until the publisher is subscribed to.authenticate
in interface AuthenticationProvider
httpRequest
- The http requestauthenticationRequest
- The credentials to authenticate