|
|
@ -108,39 +108,33 @@ public class CrshAutoConfiguration {
|
|
|
|
private CrshProperties properties;
|
|
|
|
private CrshProperties properties;
|
|
|
|
|
|
|
|
|
|
|
|
@Bean
|
|
|
|
@Bean
|
|
|
|
@ConditionalOnExpression("#{environment['shell.auth'] == 'jaas'}")
|
|
|
|
@ConditionalOnExpression("'${shell.auth:simple}' == 'jaas'")
|
|
|
|
@ConditionalOnMissingBean({ AuthenticationProperties.class })
|
|
|
|
@ConditionalOnMissingBean({ AuthenticationProperties.class })
|
|
|
|
public AuthenticationProperties jaasAuthenticationProperties() {
|
|
|
|
public AuthenticationProperties jaasAuthenticationProperties() {
|
|
|
|
return new JaasAuthenticationProperties();
|
|
|
|
return new JaasAuthenticationProperties();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Bean
|
|
|
|
@Bean
|
|
|
|
@ConditionalOnExpression("#{environment['shell.auth'] == 'key'}")
|
|
|
|
@ConditionalOnExpression("'${shell.auth:simple}' == 'key'")
|
|
|
|
@ConditionalOnMissingBean({ AuthenticationProperties.class })
|
|
|
|
@ConditionalOnMissingBean({ AuthenticationProperties.class })
|
|
|
|
public AuthenticationProperties keyAuthenticationProperties() {
|
|
|
|
public AuthenticationProperties keyAuthenticationProperties() {
|
|
|
|
return new KeyAuthenticationProperties();
|
|
|
|
return new KeyAuthenticationProperties();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Bean
|
|
|
|
@Bean
|
|
|
|
@ConditionalOnExpression("#{environment['shell.auth'] == 'simple'}")
|
|
|
|
@ConditionalOnExpression("'${shell.auth:simple}' == 'simple'")
|
|
|
|
@ConditionalOnMissingBean({ AuthenticationProperties.class })
|
|
|
|
@ConditionalOnMissingBean({ AuthenticationProperties.class })
|
|
|
|
public AuthenticationProperties simpleAuthenticationProperties() {
|
|
|
|
public AuthenticationProperties simpleAuthenticationProperties() {
|
|
|
|
return new SimpleAuthenticationProperties();
|
|
|
|
return new SimpleAuthenticationProperties();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Bean
|
|
|
|
@Bean
|
|
|
|
@ConditionalOnExpression("#{environment['shell.auth'] == 'spring'}")
|
|
|
|
@ConditionalOnExpression("'${shell.auth:simple}' == 'spring'")
|
|
|
|
@ConditionalOnMissingBean({ AuthenticationProperties.class })
|
|
|
|
@ConditionalOnMissingBean({ AuthenticationProperties.class })
|
|
|
|
public AuthenticationProperties SpringAuthenticationProperties() {
|
|
|
|
public AuthenticationProperties SpringAuthenticationProperties() {
|
|
|
|
return new SpringAuthenticationProperties();
|
|
|
|
return new SpringAuthenticationProperties();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Bean
|
|
|
|
|
|
|
|
@ConditionalOnBean({ AuthenticationManager.class })
|
|
|
|
|
|
|
|
public CRaSHPlugin<?> shellAuthenticationManager() {
|
|
|
|
|
|
|
|
return new AuthenticationManagerAdapter();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Bean
|
|
|
|
@Bean
|
|
|
|
@ConditionalOnMissingBean({ PluginLifeCycle.class })
|
|
|
|
@ConditionalOnMissingBean({ PluginLifeCycle.class })
|
|
|
|
public PluginLifeCycle shellBootstrap() {
|
|
|
|
public PluginLifeCycle shellBootstrap() {
|
|
|
@ -149,6 +143,17 @@ public class CrshAutoConfiguration {
|
|
|
|
return bs;
|
|
|
|
return bs;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Configuration
|
|
|
|
|
|
|
|
@ConditionalOnBean({ AuthenticationManager.class })
|
|
|
|
|
|
|
|
public static class ShellAuthenticationManager {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Bean
|
|
|
|
|
|
|
|
public CRaSHPlugin<?> shellAuthenticationManager() {
|
|
|
|
|
|
|
|
return new AuthenticationManagerAdapter();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public static class CrshBootstrap extends PluginLifeCycle {
|
|
|
|
public static class CrshBootstrap extends PluginLifeCycle {
|
|
|
|
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
@Autowired
|
|
|
|