|
|
|
@ -76,8 +76,8 @@ class InitializeAuthenticationProviderBeanManagerConfigurer extends GlobalAuthen |
|
|
|
+ "using the DSL.", authenticationProviders.size(), beanNames)); |
|
|
|
+ "using the DSL.", authenticationProviders.size(), beanNames)); |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
|
var authenticationProvider = authenticationProviders.get(0).getBean(); |
|
|
|
AuthenticationProvider authenticationProvider = authenticationProviders.get(0).getBean(); |
|
|
|
var authenticationProviderBeanName = authenticationProviders.get(0).getName(); |
|
|
|
String authenticationProviderBeanName = authenticationProviders.get(0).getName(); |
|
|
|
|
|
|
|
|
|
|
|
auth.authenticationProvider(authenticationProvider); |
|
|
|
auth.authenticationProvider(authenticationProvider); |
|
|
|
this.logger.info(LogMessage.format( |
|
|
|
this.logger.info(LogMessage.format( |
|
|
|
@ -85,19 +85,6 @@ class InitializeAuthenticationProviderBeanManagerConfigurer extends GlobalAuthen |
|
|
|
authenticationProviderBeanName)); |
|
|
|
authenticationProviderBeanName)); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* @return a bean of the requested class if there's just a single registered |
|
|
|
|
|
|
|
* component, null otherwise. |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
private <T> T getBeanOrNull(Class<T> type) { |
|
|
|
|
|
|
|
String[] beanNames = InitializeAuthenticationProviderBeanManagerConfigurer.this.context |
|
|
|
|
|
|
|
.getBeanNamesForType(type); |
|
|
|
|
|
|
|
if (beanNames.length != 1) { |
|
|
|
|
|
|
|
return null; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return InitializeAuthenticationProviderBeanManagerConfigurer.this.context.getBean(beanNames[0], type); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* @return a list of beans of the requested class, along with their names. If |
|
|
|
* @return a list of beans of the requested class, along with their names. If |
|
|
|
* there are no registered beans of that type, the list is empty. |
|
|
|
* there are no registered beans of that type, the list is empty. |
|
|
|
|