Class AuthorizeReturnObjectDataHintsRegistrar

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

public final class AuthorizeReturnObjectDataHintsRegistrar extends Object implements SecurityHintsRegistrar
A SecurityHintsRegistrar that scans all beans for implementations of RepositoryFactoryBeanSupport, registering the corresponding entity class as a TypeHint should any if that repository's method use AuthorizeReturnObject.

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 AuthorizeReturnObjectDataHintsRegistrar(proxyFactory);
        }
 
Since:
6.4
See Also:
  • Constructor Details

    • AuthorizeReturnObjectDataHintsRegistrar

      public AuthorizeReturnObjectDataHintsRegistrar(AuthorizationProxyFactory proxyFactory)
  • Method Details

    • registerHints

      public void registerHints(org.springframework.aot.hint.RuntimeHints hints, org.springframework.beans.factory.config.ConfigurableListableBeanFactory beanFactory)
      Description copied from interface: SecurityHintsRegistrar
      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