From 39cf858fd5d41aff018b8efe0bd20f0c76238f3c Mon Sep 17 00:00:00 2001 From: Javi Corvi Date: Fri, 1 Jul 2022 11:00:12 +0200 Subject: [PATCH 01/57] security configuration and srdomain integration --- src/app/app.module.ts | 8 +-- src/app/auth-config-factory.ts | 2 +- src/app/config-service.service.ts | 2 + .../document-detail.component.html | 8 ++- .../document-detail.component.ts | 7 +++ src/app/document.service.ts | 46 ++++++++++++++-- src/app/document.ts | 2 + src/app/findingsr.ts | 52 ++++++++++++++++++ src/assets/images/boarding-pass.pdf | Bin 0 -> 334755 bytes src/environments/environment.ts | 4 +- 10 files changed, 118 insertions(+), 13 deletions(-) create mode 100644 src/app/findingsr.ts create mode 100644 src/assets/images/boarding-pass.pdf diff --git a/src/app/app.module.ts b/src/app/app.module.ts index cd39424..8a8290b 100644 --- a/src/app/app.module.ts +++ b/src/app/app.module.ts @@ -62,8 +62,8 @@ import { ConfigServiceService } from './config-service.service'; MatToolbarModule, MatProgressSpinnerModule, MatProgressBarModule, - //OAuthModule.forRoot(), - OAuthModule.forRoot({ + OAuthModule.forRoot(), + /*OAuthModule.forRoot({ resourceServer: { //allowedUrls: [environment.apiUrl], //allowedUrls: [environment.oauth2_resource_server_allowed_url], @@ -74,10 +74,10 @@ import { ConfigServiceService } from './config-service.service'; //allowedUrls: [window.location.protocol + '//' + window.location.hostname + '/'], sendAccessToken: true } - }), + }),*/ ], providers: [LoginService, CookieService, - //{ provide: OAuthModuleConfig , useFactory: authConfigFactory, deps: [ConfigServiceService] }, + { provide: OAuthModuleConfig , useFactory: authConfigFactory, deps: [ConfigServiceService] }, //{ provide: OAuthModuleConfig , useFactory: authConfigFactory}, ], bootstrap: [AppComponent], diff --git a/src/app/auth-config-factory.ts b/src/app/auth-config-factory.ts index bb858c9..0b5475f 100644 --- a/src/app/auth-config-factory.ts +++ b/src/app/auth-config-factory.ts @@ -8,7 +8,7 @@ export function authConfigFactory(service: ConfigServiceService): OAuthModuleCon //allowedUrls: [service.getVarFromConf()], //allowedUrls: ["http://localhost:8091"], //allowedUrls: [environment.oauth2_resource_server_allowed_url], - allowedUrls: [service.getOauth2_resource_server_allowed_url()], + allowedUrls: [service.getOauth2_resource_server_allowed_url(),environment.apiSRDomainUrl], sendAccessToken: true, } }; diff --git a/src/app/config-service.service.ts b/src/app/config-service.service.ts index 68375ca..43aa901 100644 --- a/src/app/config-service.service.ts +++ b/src/app/config-service.service.ts @@ -12,4 +12,6 @@ export class ConfigServiceService { return environment.oauth2_resource_server_allowed_url; } + + } diff --git a/src/app/document-detail/document-detail.component.html b/src/app/document-detail/document-detail.component.html index f562fde..251d7ee 100644 --- a/src/app/document-detail/document-detail.component.html +++ b/src/app/document-detail/document-detail.component.html @@ -34,8 +34,12 @@
-

{{document.name}}

-
+

{{document.name}}

+ +
+ +
+