Class ObservationAuthenticationManager
java.lang.Object
org.springframework.security.authentication.ObservationAuthenticationManager
- All Implemented Interfaces:
- AuthenticationManager
An 
AuthenticationManager that observes the authentication- Since:
- 6.0
- 
Constructor SummaryConstructorsConstructorDescriptionObservationAuthenticationManager(io.micrometer.observation.ObservationRegistry registry, AuthenticationManager delegate) 
- 
Method SummaryModifier and TypeMethodDescriptionauthenticate(Authentication authentication) Attempts to authenticate the passedAuthenticationobject, returning a fully populatedAuthenticationobject (including granted authorities) if successful.voidsetObservationConvention(io.micrometer.observation.ObservationConvention<AuthenticationObservationContext> convention) Use the provided convention for reporting observation data
- 
Constructor Details- 
ObservationAuthenticationManagerpublic ObservationAuthenticationManager(io.micrometer.observation.ObservationRegistry registry, AuthenticationManager delegate) 
 
- 
- 
Method Details- 
authenticateDescription copied from interface:AuthenticationManagerAttempts to authenticate the passedAuthenticationobject, returning a fully populatedAuthenticationobject (including granted authorities) if successful.An AuthenticationManagermust honour the following contract concerning exceptions:- A DisabledExceptionmust be thrown if an account is disabled and theAuthenticationManagercan test for this state.
- A LockedExceptionmust be thrown if an account is locked and theAuthenticationManagercan test for account locking.
- A BadCredentialsExceptionmust be thrown if incorrect credentials are presented. Whilst the above exceptions are optional, anAuthenticationManagermust always test credentials.
 - Specified by:
- authenticatein interface- AuthenticationManager
- Parameters:
- authentication- the authentication request object
- Returns:
- a fully authenticated object including credentials
- Throws:
- AuthenticationException- if authentication fails
 
- A 
- 
setObservationConventionpublic void setObservationConvention(io.micrometer.observation.ObservationConvention<AuthenticationObservationContext> convention) Use the provided convention for reporting observation data- Parameters:
- convention- The provided convention
- Since:
- 6.1
 
 
-