diff --git a/package.json b/package.json index b07448a6a69f6930d8a186b9c41820ac9fe120d0..833bf65b0641a7082149a558e4ba4d9bfc9991af 100644 --- a/package.json +++ b/package.json @@ -16,13 +16,11 @@ "@angular/compiler": "^14.2.8", "@angular/core": "^14.2.8", "@angular/forms": "^14.2.8", + "@angular/material": "^14.2.7", "@angular/platform-browser": "^14.2.8", "@angular/platform-browser-dynamic": "^14.2.8", "@angular/router": "^14.2.8", "angular-auth-oidc-client": "14.1.5", - "primeflex": "^3.2.1", - "primeicons": "^6.0.1", - "primeng": "^14.1.2", "rxjs": "~6.6.0", "tslib": "^2.3.0", "zone.js": "~0.11.4" @@ -41,4 +39,4 @@ "karma-jasmine-html-reporter": "~1.7.0", "typescript": "~4.6.4" } -} +} \ No newline at end of file diff --git a/src/app/account.service.ts b/src/app/account.service.ts index b36989abd730e5d207a08aabe5142153ae1d60b8..9b84f1d6d05c53523d3aab1f4f73132ac41556e3 100644 --- a/src/app/account.service.ts +++ b/src/app/account.service.ts @@ -1,8 +1,8 @@ import {Injectable, OnDestroy, OnInit} from '@angular/core'; import {MessageService} from "./message.service"; import {HttpClient, HttpErrorResponse, HttpHeaders} from "@angular/common/http"; -import {map, Observable, of, tap, throwError} from 'rxjs'; -import { retry, catchError } from 'rxjs/operators'; +import { Observable, of, throwError} from 'rxjs'; +import { retry, catchError, tap ,map } from 'rxjs/operators'; import { Account } from './account'; import { environment } from '../environments/environment'; @@ -17,10 +17,7 @@ export class AccountService implements OnInit { ngOnInit() { this.logHeader = "[AccountService:ngOnInit()] "; this.messageService.add(this.logHeader + "\n keycloakURL: " + environment.keycloakURL - + "\n apiURL : " + environment.apiURL - + "\n secureRoute: " + environment.secureRoute + "\n"); - - // this.messageService.add(this.logHeader + 'Initial call to isAuthenticated: ' + this.isAuthenticated); + + "\n apiURL : " + environment.apiURL + "\n"); } private logHeader = '' private apiURL = environment.apiURL; diff --git a/src/app/auth-config.module.ts b/src/app/auth-config.module.ts index 37c45b1cafb672be623c11bdf72aeebac21a8603..fe99a2f4032579e4bb7af802e9e34573786139f2 100644 --- a/src/app/auth-config.module.ts +++ b/src/app/auth-config.module.ts @@ -11,7 +11,6 @@ import { environment } from '../environments/environment'; logLevel: LogLevel.Debug, // Do not change historyCleanupOff to true : https://github.com/damienbod/angular-auth-oidc-client/issues/1318 historyCleanupOff: false, - // authority: 'https://kube-master.informatik.fh-nuernberg.de:8087/auth/realms/rzldap', authority: environment.keycloakURL + 'realms/RBAC', redirectUrl: window.location.origin, postLogoutRedirectUri: window.location.origin, @@ -25,7 +24,7 @@ import { environment } from '../environments/environment'; // startCheckSession: true, ignoreNonceAfterRefresh: true, // routes that get added a bearer token by HTTP_INTERCEPTORS provided by angular-auth-oidc-client lib' - secureRoutes: [ environment.secureRoute ] + secureRoutes: [ environment.apiURL ] }, }), ], diff --git a/src/environments/environment.ts b/src/environments/environment.ts index 071aea23f4bf758d98ed4aa8e95b32b394d41991..7b8f89ebd3ef5d7db28fb8255b5ab2b59eef9b80 100644 --- a/src/environments/environment.ts +++ b/src/environments/environment.ts @@ -5,11 +5,11 @@ export const environment = { production: false, - keycloakURL: 'http://localhost:8280/auth/', + // keycloakURL: 'http://localhost:8280/auth/', // keycloakURL: '/auth/', - // keycloakURL: 'https://kube-master-h1.informatik.fh-nuernberg.de:/auth/', - apiURL: 'http://localhostxx:8080/api', - secureRoute: 'http://localhost:8080/' + keycloakURL: 'https://kube-master-h1.informatik.fh-nuernberg.de/auth/', + apiURL: 'http://localhost:8080/api', + // secureRoute: 'http://localhost:8080/api' }; /*