Skip to content

Commit 77aaf19

Browse files
committed
Add a new user to market app. It utilizes BCrypt Encoder for storing passwords. So, it was just adding a new entry to the database script.
1 parent ee81065 commit 77aaf19

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

jdk_11_maven/cs/rest-gui/market/market-core/src/main/resources/data.sql

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,8 @@ INSERT INTO storage (id, available) VALUES (11, true);
8585

8686
INSERT INTO user_account (id, email, password, name, active) VALUES (1, 'admin', '$2a$10$Cmwx2Xr/PVpkibiiDz0s7eaVGZHPUvAu5ivdVC5BJgSYbp3c06FY6', 'Admin', true);
8787
INSERT INTO user_account (id, email, password, name, active) VALUES (4, 'ivan.petrov@yandex.ru', '$2a$10$LfLg6vp4.wyowWP9ysg3F.yQ/udNKfRhGlHJ298xGCtBLC2dDX.OC', 'Ivan Petrov', true);
88+
INSERT INTO user_account (id, email, password, name, active) VALUES (5, 'user2@yandex.ru', '$2a$12$vMKCOwlcHtiPqQJaS6TqR.YFZyjcXTz1BVQk5pPlW/oIidNRIrqfm', 'Yuri Dolgoruki', true);
89+
8890

8991
INSERT INTO user_role (user_id, role_id) VALUES (1, 0);
9092

jdk_11_maven/em/embedded/rest/market/src/main/java/em/embedded/market/EmbeddedEvoMasterController.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,8 @@ public SutInfoDto.OutputFormat getPreferredOutputFormat() {
138138
public List<AuthenticationDto> getInfoForAuthentication() {
139139
return Arrays.asList(
140140
AuthUtils.getForBasic("admin","admin","password"),
141-
AuthUtils.getForBasic("user", "ivan.petrov@yandex.ru", "petrov")
141+
AuthUtils.getForBasic("user", "ivan.petrov@yandex.ru", "petrov"),
142+
AuthUtils.getForBasic("user2", "user2@yandex.ru", "yuridolgoruki")
142143
);
143144
}
144145

0 commit comments

Comments
 (0)