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 TypeMethodDescription@Nullable Class<?>Get theAuthenticationManagerclass that processed the authentication@Nullable AuthenticationGet theAuthenticationrequest that was observed@Nullable AuthenticationGet theAuthenticationresult that was observedvoidsetAuthenticationManagerClass(Class<?> authenticationManagerClass) Set theAuthenticationManagerclass that processed the authenticationvoidsetAuthenticationRequest(Authentication authenticationRequest) Set theAuthenticationrequest that was observedvoidsetAuthenticationResult(Authentication authenticationResult) Set theAuthenticationresult 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, removeHighCardinalityKeyValue, removeHighCardinalityKeyValues, removeLowCardinalityKeyValue, removeLowCardinalityKeyValues, setContextualName, setError, setName, setParentObservation, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface io.micrometer.observation.Observation.ContextView
getOrDefault
-
Constructor Details
-
AuthenticationObservationContext
public AuthenticationObservationContext()
-
-
Method Details
-
getAuthenticationRequest
Get theAuthenticationrequest that was observed- Returns:
- the observed
Authenticationrequest
-
setAuthenticationRequest
Set theAuthenticationrequest that was observed- Parameters:
authenticationRequest- the observedAuthenticationrequest
-
getAuthenticationResult
Get theAuthenticationresult that was observedNote that if authentication failed, no
Authenticationresult can be observed. In that case, this returnsnull.- Returns:
- any observed
Authenticationresult,nullotherwise
-
setAuthenticationResult
Set theAuthenticationresult that was observed- Parameters:
authenticationResult- the observedAuthenticationresult
-
getAuthenticationManagerClass
Get theAuthenticationManagerclass that processed the authentication- Returns:
- the observed
AuthenticationManagerclass
-
setAuthenticationManagerClass
Set theAuthenticationManagerclass that processed the authentication- Parameters:
authenticationManagerClass- the observedAuthenticationManagerclass
-