Source:
void createOAuth2LoginFilter(BeanReference sessionStrategy, BeanReference authManager) { Element oauth2LoginElt = DomUtils.getChildElementByTagName(this.httpElt, Elements.OAUTH2_LOGIN); if (oauth2LoginElt != null) { OAuth2LoginBeanDefinitionParser parser = new OAuth2LoginBeanDefinitionParser(); BeanDefinition filterBean = parser.parse(oauth2LoginElt, this.pc); filterBean.getPropertyValues().addPropertyValue("authenticationManager", authManager); BeanDefinition oauth2LoginAuthProvider = parser.getOAuth2LoginAuthenticationProvider(); oauth2AuthorizationRequestRedirectFilter = parser.getOAuth2AuthorizationRequestRedirectFilter(); oauth2LoginEntryPoint = parser.getOAuth2LoginAuthenticationEntryPoint(); String oauth2LoginAuthenticationProviderId = pc.getReaderContext() .generateBeanName(oauth2LoginAuthProvider); oauth2LoginFilterId = pc.getReaderContext().generateBeanName(filterBean); oauth2AuthorizationRequestRedirectFilterId = pc.getReaderContext() .generateBeanName(oauth2AuthorizationRequestRedirectFilter); pc.registerBeanComponent(new BeanComponentDefinition(oauth2AuthorizationRequestRedirectFilter, oauth2AuthorizationRequestRedirectFilterId)); pc.registerBeanComponent(new BeanComponentDefinition(filterBean, oauth2LoginFilterId)); pc.registerBeanComponent( new BeanComponentDefinition(oauth2LoginAuthProvider, oauth2LoginAuthenticationProviderId)); oauth2LoginAuthenticationProviderRef = new RuntimeBeanReference(oauth2LoginAuthenticationProviderId); BeanDefinition oauth2LoginOidcAuthProvider = parser.getOAuth2LoginOidcAuthenticationProvider(); String oauth2LoginOidcAuthenticationProviderId = pc.getReaderContext() .generateBeanName(oauth2LoginOidcAuthProvider); pc.registerBeanComponent( new BeanComponentDefinition(oauth2LoginOidcAuthProvider, oauth2LoginOidcAuthenticationProviderId)); oauth2LoginOidcAuthenticationProviderRef = new RuntimeBeanReference( oauth2LoginOidcAuthenticationProviderId); } }

Target:
void createOAuth2LoginFilter(BeanReference sessionStrategy, BeanReference authManager) { Element oauth2LoginElt = DomUtils.getChildElementByTagName(this.httpElt, Elements.OAUTH2_LOGIN); if (oauth2LoginElt != null) { OAuth2LoginBeanDefinitionParser parser = new OAuth2LoginBeanDefinitionParser(requestCache, portMapper, portResolver, sessionStrategy, allowSessionCreation); BeanDefinition oauth2LoginFilterBean = parser.parse(oauth2LoginElt, this.pc); oauth2LoginFilterBean.getPropertyValues().addPropertyValue("authenticationManager", authManager); BeanDefinition oauth2LoginAuthProvider = parser.getOAuth2LoginAuthenticationProvider(); oauth2AuthorizationRequestRedirectFilter = parser.getOAuth2AuthorizationRequestRedirectFilter(); oauth2LoginEntryPoint = parser.getOAuth2LoginAuthenticationEntryPoint(); String oauth2LoginAuthenticationProviderId = pc.getReaderContext() .generateBeanName(oauth2LoginAuthProvider); oauth2LoginFilterId = pc.getReaderContext().generateBeanName(oauth2LoginFilterBean); oauth2AuthorizationRequestRedirectFilterId = pc.getReaderContext() .generateBeanName(oauth2AuthorizationRequestRedirectFilter); oauth2LoginLinks = parser.getOAuth2LoginLinks(); pc.registerBeanComponent(new BeanComponentDefinition(oauth2AuthorizationRequestRedirectFilter, oauth2AuthorizationRequestRedirectFilterId)); pc.registerBeanComponent(new BeanComponentDefinition(oauth2LoginFilterBean, oauth2LoginFilterId)); pc.registerBeanComponent( new BeanComponentDefinition(oauth2LoginAuthProvider, oauth2LoginAuthenticationProviderId)); oauth2LoginAuthenticationProviderRef = new RuntimeBeanReference(oauth2LoginAuthenticationProviderId); BeanDefinition oauth2LoginOidcAuthProvider = parser.getOAuth2LoginOidcAuthenticationProvider(); String oauth2LoginOidcAuthenticationProviderId = pc.getReaderContext() .generateBeanName(oauth2LoginOidcAuthProvider); pc.registerBeanComponent( new BeanComponentDefinition(oauth2LoginOidcAuthProvider, oauth2LoginOidcAuthenticationProviderId)); oauth2LoginOidcAuthenticationProviderRef = new RuntimeBeanReference( oauth2LoginOidcAuthenticationProviderId); } }