Class AuthorizeReturnObjectCoreHintsRegistrar

java.lang.Object
org.springframework.security.aot.hint.AuthorizeReturnObjectCoreHintsRegistrar
All Implemented Interfaces:
SecurityHintsRegistrar

public final class AuthorizeReturnObjectCoreHintsRegistrar extends Object implements SecurityHintsRegistrar
A SecurityHintsRegistrar that scans all beans for methods that use AuthorizeReturnObject and registers those return objects as TypeHints.

It also traverses those found types for other return values.

An instance of this class is published as an infrastructural bean by the spring-security-config module. However, in the event you need to publish it yourself, remember to publish it as an infrastructural bean like so:

        @Bean
        @Role(BeanDefinition.ROLE_INFRASTRUCTURE)
        static SecurityHintsRegistrar proxyThese(AuthorizationProxyFactory proxyFactory) {
                return new AuthorizeReturnObjectHintsRegistrar(proxyFactory);
        }
 
Since:
6.4
See Also:
  • Constructor Details

    • AuthorizeReturnObjectCoreHintsRegistrar

      public AuthorizeReturnObjectCoreHintsRegistrar(AuthorizationProxyFactory proxyFactory)
  • Method Details

    • registerHints

      public void registerHints(org.springframework.aot.hint.RuntimeHints hints, org.springframework.beans.factory.config.ConfigurableListableBeanFactory beanFactory)
      Register hints after preparing them through Security's infrastructural beans
      Specified by:
      registerHints in interface SecurityHintsRegistrar
      Parameters:
      hints - the registration target for any AOT hints
      beanFactory - the bean factory