Class AuthorizationObservationContext<T>
java.lang.Object
io.micrometer.observation.Observation.Context
org.springframework.security.authorization.AuthorizationObservationContext<T>
- All Implemented Interfaces:
- io.micrometer.observation.Observation.ContextView
public class AuthorizationObservationContext<T>
extends io.micrometer.observation.Observation.Context
An 
Observation.Context used during authorizations- Since:
- 6.0
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionGet the observedAuthenticationfor this authorizationGet the observedAuthorizationResultDeprecated.Get the object for which access was requestedvoidsetAuthentication(Authentication authentication) Set the observedAuthenticationfor this authorizationvoidsetAuthorizationResult(AuthorizationResult authorizationResult) Set the observedAuthorizationResultvoidsetDecision(AuthorizationDecision decision) Deprecated.please usesetAuthorizationResult(AuthorizationResult)insteadMethods inherited from class io.micrometer.observation.Observation.ContextaddHighCardinalityKeyValue, 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.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface io.micrometer.observation.Observation.ContextViewgetOrDefault
- 
Constructor Details- 
AuthorizationObservationContext
 
- 
- 
Method Details- 
getAuthenticationGet the observedAuthenticationfor this authorizationNote that if the authorization did not require inspecting the Authentication, this will returnnull.- Returns:
- any observed Authentication,nullotherwise
 
- 
setAuthenticationSet the observedAuthenticationfor this authorization- Parameters:
- authentication- the observed- Authentication
 
- 
getObjectGet the object for which access was requested- Returns:
- the requested object
 
- 
getDecisionDeprecated.please usegetAuthorizationResult()insteadGet the observedAuthorizationDecision- Returns:
- the observed AuthorizationDecision
 
- 
setDecisionDeprecated.please usesetAuthorizationResult(AuthorizationResult)insteadSet the observedAuthorizationDecision- Parameters:
- decision- the observed- AuthorizationDecision
 
- 
getAuthorizationResultGet the observedAuthorizationResult- Returns:
- the observed AuthorizationResult
- Since:
- 6.4
 
- 
setAuthorizationResultSet the observedAuthorizationResult- Parameters:
- authorizationResult- the observed- AuthorizationResult
- Since:
- 6.4
 
 
- 
getAuthorizationResult()instead