Skip to content

Commit

Permalink
[Angular] Add account with authentication JWT
Browse files Browse the repository at this point in the history
  • Loading branch information
qmonmert committed Mar 25, 2022
1 parent c6dadd0 commit fed1cb7
Show file tree
Hide file tree
Showing 21 changed files with 936 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,8 @@ public void addAngular(Project project) {
public void addStyledAngular(Project project) {
angularService.addStyledAngular(project);
}

public void addJwtAngular(Project project) {
angularService.addJwtAngular(project);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,10 @@ public static List<String> dependencies() {
);
}

public static List<String> jwtDependencies() {
return List.of("ngx-webstorage");
}

public static Map<String, String> scripts() {
// @formatter:off
return Map.of(
Expand All @@ -55,6 +59,10 @@ public static List<String> files() {
return List.of("angular.json", "jest.conf.js", "tsconfig.app.json", "tsconfig.json", "tsconfig.spec.json");
}

public static List<String> jwtFiles() {
return List.of("proxy.conf.json");
}

public static Map<String, String> angularFiles() {
String primaryApp = "app/common/primary/app";
String environments = "environments";
Expand All @@ -75,4 +83,22 @@ public static Map<String, String> angularFiles() {
Map.entry("environment.spec.ts", environments)
);
}

public static Map<String, String> angularJwtFiles() {
String primaryAppAuth = "app/common/primary/app/auth";
String primaryAppInterceptor = "app/common/primary/app/interceptor";
String primaryAppLogin = "app/common/primary/app/login";
String primaryAppModel = "app/common/primary/app/model";
return Map.ofEntries(
Map.entry("account.service.ts", primaryAppAuth),
Map.entry("account.service.spec.ts", primaryAppAuth),
Map.entry("auth-jwt.service.ts", primaryAppAuth),
Map.entry("auth-jwt.service.spec.ts", primaryAppAuth),
Map.entry("auth.interceptor.ts", primaryAppInterceptor),
Map.entry("login.service.ts", primaryAppLogin),
Map.entry("login.service.spec.ts", primaryAppLogin),
Map.entry("account.model.ts", primaryAppModel),
Map.entry("login.model.ts", primaryAppModel)
);
}
}
Loading

0 comments on commit fed1cb7

Please sign in to comment.