Examples of KeyAuthenticationProperties


Examples of org.springframework.boot.actuate.autoconfigure.ShellProperties.KeyAuthenticationProperties

  @Bean
  @ConditionalOnProperty(prefix = "shell", name = "auth", havingValue = "key")
  @ConditionalOnMissingBean({ CrshShellAuthenticationProperties.class })
  public CrshShellAuthenticationProperties keyAuthenticationProperties() {
    return new KeyAuthenticationProperties();
  }
View Full Code Here

Examples of org.springframework.boot.actuate.autoconfigure.ShellProperties.KeyAuthenticationProperties

    assertEquals("my-test-domain", p.get("crash.auth.jaas.domain"));
  }

  @Test
  public void testBindingKey() {
    KeyAuthenticationProperties props = new KeyAuthenticationProperties();
    RelaxedDataBinder binder = new RelaxedDataBinder(props, "shell.auth.key");
    binder.setConversionService(new DefaultConversionService());
    Map<String, String> map = new HashMap<String, String>();
    map.put("shell.auth.key.path", "~/.ssh/test.pem");
    binder.bind(new MutablePropertyValues(map));
    assertFalse(binder.getBindingResult().hasErrors());

    Properties p = new Properties();
    props.applyToCrshShellConfig(p);

    assertEquals("~/.ssh/test.pem", p.get("crash.auth.key.path"));
  }
View Full Code Here

Examples of org.springframework.boot.actuate.autoconfigure.ShellProperties.KeyAuthenticationProperties

    assertEquals("~/.ssh/test.pem", p.get("crash.auth.key.path"));
  }

  @Test
  public void testBindingKeyIgnored() {
    KeyAuthenticationProperties props = new KeyAuthenticationProperties();
    RelaxedDataBinder binder = new RelaxedDataBinder(props, "shell.auth.key");
    binder.setConversionService(new DefaultConversionService());
    Map<String, String> map = new HashMap<String, String>();
    binder.bind(new MutablePropertyValues(map));
    assertFalse(binder.getBindingResult().hasErrors());

    Properties p = new Properties();
    props.applyToCrshShellConfig(p);

    assertNull(p.get("crash.auth.key.path"));
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.