Class AuthenticationObservationContext
java.lang.Object
io.micrometer.observation.Observation.Context
org.springframework.security.authentication.AuthenticationObservationContext
- All Implemented Interfaces:
io.micrometer.observation.Observation.ContextView
public class AuthenticationObservationContext
extends io.micrometer.observation.Observation.Context
An
Observation.Context
used during authentications- Since:
- 6.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionClass<?>
Get theAuthenticationManager
class that processed the authenticationGet theAuthentication
request that was observedGet theAuthentication
result that was observedvoid
setAuthenticationManagerClass
(Class<?> authenticationManagerClass) Set theAuthenticationManager
class that processed the authenticationvoid
setAuthenticationRequest
(Authentication authenticationRequest) Set theAuthentication
request that was observedvoid
setAuthenticationResult
(Authentication authenticationResult) Set theAuthentication
result that was observedMethods inherited from class io.micrometer.observation.Observation.Context
addHighCardinalityKeyValue, addHighCardinalityKeyValues, addLowCardinalityKeyValue, addLowCardinalityKeyValues, clear, computeIfAbsent, containsKey, get, getAllKeyValues, getContextualName, getError, getHighCardinalityKeyValue, getHighCardinalityKeyValues, getLowCardinalityKeyValue, getLowCardinalityKeyValues, getName, getOrDefault, getParentObservation, getRequired, put, remove, setContextualName, setError, setName, setParentObservation, toString
-
Constructor Details
-
AuthenticationObservationContext
public AuthenticationObservationContext()
-
-
Method Details
-
getAuthenticationRequest
Get theAuthentication
request that was observed- Returns:
- the observed
Authentication
request
-
setAuthenticationRequest
Set theAuthentication
request that was observed- Parameters:
authenticationRequest
- the observedAuthentication
request
-
getAuthenticationResult
Get theAuthentication
result that was observedNote that if authentication failed, no
Authentication
result can be observed. In that case, this returnsnull
.- Returns:
- any observed
Authentication
result,null
otherwise
-
setAuthenticationResult
Set theAuthentication
result that was observed- Parameters:
authenticationResult
- the observedAuthentication
result
-
getAuthenticationManagerClass
Get theAuthenticationManager
class that processed the authentication- Returns:
- the observed
AuthenticationManager
class
-
setAuthenticationManagerClass
Set theAuthenticationManager
class that processed the authentication- Parameters:
authenticationManagerClass
- the observedAuthenticationManager
class
-