Class ObservationAuthorizationManager<T>

java.lang.Object
org.springframework.security.authorization.ObservationAuthorizationManager<T>
All Implemented Interfaces:
org.springframework.beans.factory.Aware, org.springframework.context.MessageSourceAware, AuthorizationManager<T>

public final class ObservationAuthorizationManager<T> extends Object implements AuthorizationManager<T>, org.springframework.context.MessageSourceAware
An AuthorizationManager that observes the authorization
Since:
6.0
  • Constructor Details

    • ObservationAuthorizationManager

      public ObservationAuthorizationManager(io.micrometer.observation.ObservationRegistry registry, AuthorizationManager<T> delegate)
  • Method Details

    • check

      public AuthorizationDecision check(Supplier<Authentication> authentication, T object)
      Description copied from interface: AuthorizationManager
      Determines if access is granted for a specific authentication and object.
      Specified by:
      check in interface AuthorizationManager<T>
      Parameters:
      authentication - the Supplier of the Authentication to check
      object - the AuthorizationManager object to check
      Returns:
      an AuthorizationDecision or null if no decision could be made
    • setObservationConvention

      public void setObservationConvention(io.micrometer.observation.ObservationConvention<AuthorizationObservationContext<?>> convention)
      Use the provided convention for reporting observation data
      Parameters:
      convention - The provided convention
      Since:
      6.1
    • setMessageSource

      public void setMessageSource(org.springframework.context.MessageSource messageSource)
      Set the MessageSource that this object runs in.
      Specified by:
      setMessageSource in interface org.springframework.context.MessageSourceAware
      Parameters:
      messageSource - The message source to be used by this object
      Since:
      6.2