Make default username and password configurable

Closes gh-10963
This commit is contained in:
Madhura Bhave
2017-12-11 13:02:33 -08:00
parent e68d8a3f98
commit 47ed096981
33 changed files with 170 additions and 135 deletions

View File

@@ -83,7 +83,7 @@ public class SampleSecureApplicationTests {
headers.setContentType(MediaType.APPLICATION_FORM_URLENCODED);
MultiValueMap<String, String> form = new LinkedMultiValueMap<>();
form.set("username", "user");
form.set("password", "user");
form.set("password", "password");
ResponseEntity<String> entity = this.restTemplate.exchange("/login",
HttpMethod.POST, new HttpEntity<>(form, headers), String.class);
assertThat(entity.getStatusCode()).isEqualTo(HttpStatus.FOUND);