diff options
author | Martin Schanzenbach <mschanzenbach@posteo.de> | 2020-08-06 09:16:26 +0200 |
---|---|---|
committer | Martin Schanzenbach <mschanzenbach@posteo.de> | 2020-08-06 09:16:26 +0200 |
commit | 744c90aa5abe6269ddeb70a3d6b951200e1bba91 (patch) | |
tree | dcc6c7aaa5d7d259e69be48e7e024ef1086f9ddf /src/app/open-id.service.ts | |
parent | 7ff4a52ddab16dfc60fd60fe4e0ce3dc5c023056 (diff) | |
download | reclaim-ui-744c90aa5abe6269ddeb70a3d6b951200e1bba91.tar.gz reclaim-ui-744c90aa5abe6269ddeb70a3d6b951200e1bba91.zip |
fix phone number claim name; pass claims parameter
Diffstat (limited to 'src/app/open-id.service.ts')
-rw-r--r-- | src/app/open-id.service.ts | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/app/open-id.service.ts b/src/app/open-id.service.ts index 6264783..b1cfff9 100644 --- a/src/app/open-id.service.ts +++ b/src/app/open-id.service.ts | |||
@@ -17,7 +17,7 @@ export class OpenIdService { | |||
17 | scopesDescriptions = {"profile": "User profile access such as email, (nick)name, gender and birthdate.", | 17 | scopesDescriptions = {"profile": "User profile access such as email, (nick)name, gender and birthdate.", |
18 | "email": "Your email information.", | 18 | "email": "Your email information.", |
19 | "address": "Your physical address information.", | 19 | "address": "Your physical address information.", |
20 | "phone": "Your phone number."}; | 20 | "phone_number": "Your phone number."}; |
21 | 21 | ||
22 | constructor(private http: HttpClient, | 22 | constructor(private http: HttpClient, |
23 | private config: ConfigService, | 23 | private config: ConfigService, |
@@ -74,9 +74,9 @@ export class OpenIdService { | |||
74 | redirectUri += '&redirect_uri=' + this.params['redirect_uri']; | 74 | redirectUri += '&redirect_uri=' + this.params['redirect_uri']; |
75 | redirectUri += '&response_type=' + this.params['response_type']; | 75 | redirectUri += '&response_type=' + this.params['response_type']; |
76 | redirectUri += '&scope=' + this.params['scope']; | 76 | redirectUri += '&scope=' + this.params['scope']; |
77 | if (this.referenceString !== "") | 77 | if (this.params['claims'] !== undefined) |
78 | { | 78 | { |
79 | redirectUri += " " + this.referenceString; | 79 | redirectUri += "&claims" + this.params['claims']; |
80 | } | 80 | } |
81 | if (this.params['state'] !== undefined) | 81 | if (this.params['state'] !== undefined) |
82 | { | 82 | { |
@@ -228,7 +228,7 @@ export class OpenIdService { | |||
228 | } | 228 | } |
229 | 229 | ||
230 | getStandardPhoneClaims(): Object { | 230 | getStandardPhoneClaims(): Object { |
231 | return {"phone": "Phone number"}; | 231 | return {"phone_number": "Phone number"}; |
232 | } | 232 | } |
233 | 233 | ||
234 | getStandardAddressClaims(): Object { | 234 | getStandardAddressClaims(): Object { |
@@ -255,7 +255,7 @@ export class OpenIdService { | |||
255 | if (scopes.includes("address")) { | 255 | if (scopes.includes("address")) { |
256 | result = result.concat(Object.keys(this.getStandardAddressClaims())); | 256 | result = result.concat(Object.keys(this.getStandardAddressClaims())); |
257 | } | 257 | } |
258 | if (scopes.includes("phone")) { | 258 | if (scopes.includes("phone_number")) { |
259 | result = result.concat(Object.keys(this.getStandardPhoneClaims())); | 259 | result = result.concat(Object.keys(this.getStandardPhoneClaims())); |
260 | } | 260 | } |
261 | result = result.concat(this.getRequestedClaimNames()); | 261 | result = result.concat(this.getRequestedClaimNames()); |