diff options
author | Banse, Christian <christian.banse@aisec.fraunhofer.de> | 2019-07-15 13:40:39 +0200 |
---|---|---|
committer | Banse, Christian <christian.banse@aisec.fraunhofer.de> | 2019-07-15 15:49:49 +0200 |
commit | 122d9157a8264669cf84c2783535eb06809529a5 (patch) | |
tree | 533d41d4701e9f98874a482f9076fb8402c3e39e /src/app/open-id.service.ts | |
parent | 8b5dca5867cdf5b74c255ab277595f1145ae92d4 (diff) | |
download | reclaim-ui-122d9157a8264669cf84c2783535eb06809529a5.tar.gz reclaim-ui-122d9157a8264669cf84c2783535eb06809529a5.zip |
Updated to Angular 8
* Used new RxJS 6-style operators
* Fixed linting errors
Diffstat (limited to 'src/app/open-id.service.ts')
-rw-r--r-- | src/app/open-id.service.ts | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/app/open-id.service.ts b/src/app/open-id.service.ts index 8fd7619..dbc2f18 100644 --- a/src/app/open-id.service.ts +++ b/src/app/open-id.service.ts | |||
@@ -6,7 +6,7 @@ import { ConfigService } from './config.service'; | |||
6 | import { Router } from '@angular/router'; | 6 | import { Router } from '@angular/router'; |
7 | 7 | ||
8 | @Injectable() | 8 | @Injectable() |
9 | export class OpenIdService { | 9 | export class OpenIdService { |
10 | params: any; | 10 | params: any; |
11 | 11 | ||
12 | constructor(private http: HttpClient, | 12 | constructor(private http: HttpClient, |
@@ -24,7 +24,7 @@ export class OpenIdService { | |||
24 | 24 | ||
25 | parseRouteParams(params: any): any { | 25 | parseRouteParams(params: any): any { |
26 | this.params = params; | 26 | this.params = params; |
27 | console.log("Added OIDC params"); | 27 | console.log('Added OIDC params'); |
28 | console.log(this.params); | 28 | console.log(this.params); |
29 | } | 29 | } |
30 | 30 | ||
@@ -46,9 +46,9 @@ export class OpenIdService { | |||
46 | 46 | ||
47 | inOpenIdFlow(): any { | 47 | inOpenIdFlow(): any { |
48 | if (this.params['redirect_uri'] !== undefined) { | 48 | if (this.params['redirect_uri'] !== undefined) { |
49 | console.log ("In OIDC flow"); | 49 | console.log ('In OIDC flow'); |
50 | } else { | 50 | } else { |
51 | console.log ("Not in OIDC flow"); | 51 | console.log ('Not in OIDC flow'); |
52 | console.log (this.params); | 52 | console.log (this.params); |
53 | } | 53 | } |
54 | return this.params['redirect_uri'] !== undefined; | 54 | return this.params['redirect_uri'] !== undefined; |
@@ -56,7 +56,7 @@ export class OpenIdService { | |||
56 | 56 | ||
57 | getClientId(): any { | 57 | getClientId(): any { |
58 | if (!this.inOpenIdFlow()) { | 58 | if (!this.inOpenIdFlow()) { |
59 | return ""; | 59 | return ''; |
60 | } | 60 | } |
61 | return this.params['client_id']; | 61 | return this.params['client_id']; |
62 | } | 62 | } |
@@ -65,8 +65,8 @@ export class OpenIdService { | |||
65 | if (!this.inOpenIdFlow()) { | 65 | if (!this.inOpenIdFlow()) { |
66 | return []; | 66 | return []; |
67 | } | 67 | } |
68 | var scopes = this.params['scope'].split(" "); | 68 | const scopes = this.params['scope'].split(' '); |
69 | const i = scopes.indexOf("openid"); | 69 | const i = scopes.indexOf('openid'); |
70 | scopes.splice(i, 1); | 70 | scopes.splice(i, 1); |
71 | return scopes; | 71 | return scopes; |
72 | } | 72 | } |