Skip to content

Commit 0c987dd

Browse files
Merge pull request kaakaww#67 from kaakaww/new-user
Add janesmith as a user
2 parents 1d2da92 + c93d441 commit 0c987dd

File tree

3 files changed

+13
-2
lines changed

3 files changed

+13
-2
lines changed

src/main/java/hawk/Application.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,12 @@ public CommandLineRunner commandLineRunner(ApplicationContext ctx, ItemRepo repo
6666
System.out.println(String.format("Adding user%d", i));
6767
userRepo.save(new User(String.format("user%d", i), String.format("we have the best users, users%d", i), "1234567"));
6868
});
69+
70+
// This should be removed once we confirm that all instances of "user" have been removed
6971
userRepo.save(new User("user", "The auth user", "1234567"));
7072

73+
userRepo.save(new User("janesmith", "The auth user", "1234567"));
74+
7175
TenantContext.setCurrentTenant("12345678");
7276
Stream.of(4, 5, 6).forEach(i -> {
7377
System.out.println(String.format("Adding item%d", i));

src/main/java/hawk/MultiHttpSecurityConfig.java

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,13 @@ public UserDetailsService userDetailsService() {
161161
.roles("USER")
162162
.build();
163163

164-
return new InMemoryUserDetailsManager(user);
164+
UserDetails user2 =
165+
User.withDefaultPasswordEncoder()
166+
.username("janesmith")
167+
.password("password")
168+
.roles("USER")
169+
.build();
170+
171+
return new InMemoryUserDetailsManager(user, user2);
165172
}
166173
}

stackhawk.d/stackhawk-auth-form-cookie.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ app:
1010
loginPagePath: /login
1111
usernameField: username
1212
passwordField: password
13-
scanUsername: "user"
13+
scanUsername: "janesmith"
1414
scanPassword: "password"
1515
cookieAuthorization:
1616
cookieNames:

0 commit comments

Comments
 (0)