Java 类org.springframework.boot.actuate.autoconfigure.ShellProperties.JaasAuthenticationProperties 实例源码
项目:https-github.com-g0t4-jenkins2-course-spring-boot
文件:ShellPropertiesTests.java
@Test
public void testBindingJaas() {
JaasAuthenticationProperties props = load(JaasAuthenticationProperties.class,
"management.shell.auth.jaas.domain=my-test-domain");
Properties p = new Properties();
props.applyToCrshShellConfig(p);
assertThat(p.get("crash.auth.jaas.domain")).isEqualTo("my-test-domain");
}
项目:spring-boot-concourse
文件:ShellPropertiesTests.java
@Test
public void testBindingJaas() {
JaasAuthenticationProperties props = load(JaasAuthenticationProperties.class,
"management.shell.auth.jaas.domain=my-test-domain");
Properties p = new Properties();
props.applyToCrshShellConfig(p);
assertThat(p.get("crash.auth.jaas.domain")).isEqualTo("my-test-domain");
}
项目:contestparser
文件:ShellPropertiesTests.java
@Test
public void testBindingJaas() {
JaasAuthenticationProperties props = new JaasAuthenticationProperties();
RelaxedDataBinder binder = new RelaxedDataBinder(props, "shell.auth.jaas");
binder.setConversionService(new DefaultConversionService());
Map<String, String> map = new HashMap<String, String>();
map.put("shell.auth.jaas.domain", "my-test-domain");
binder.bind(new MutablePropertyValues(map));
assertFalse(binder.getBindingResult().hasErrors());
Properties p = new Properties();
props.applyToCrshShellConfig(p);
assertEquals("my-test-domain", p.get("crash.auth.jaas.domain"));
}
项目:https-github.com-g0t4-jenkins2-course-spring-boot
文件:CrshAutoConfiguration.java
@Bean
@ConditionalOnProperty(prefix = AUTH_PREFIX, name = "type", havingValue = "jaas")
@ConditionalOnMissingBean(CrshShellAuthenticationProperties.class)
public JaasAuthenticationProperties jaasAuthenticationProperties() {
return new JaasAuthenticationProperties();
}
项目:spring-boot-concourse
文件:CrshAutoConfiguration.java
@Bean
@ConditionalOnProperty(prefix = AUTH_PREFIX, name = "type", havingValue = "jaas")
@ConditionalOnMissingBean(CrshShellAuthenticationProperties.class)
public JaasAuthenticationProperties jaasAuthenticationProperties() {
return new JaasAuthenticationProperties();
}
项目:contestparser
文件:CrshAutoConfiguration.java
@Bean
@ConditionalOnProperty(prefix = "shell", name = "auth", havingValue = "jaas")
@ConditionalOnMissingBean(CrshShellAuthenticationProperties.class)
public JaasAuthenticationProperties jaasAuthenticationProperties() {
return new JaasAuthenticationProperties();
}