Skip to content

Commit 831d807

Browse files
committed
Add 'resource' to service.
1 parent 8c1bc9b commit 831d807

File tree

4 files changed

+10
-3
lines changed

4 files changed

+10
-3
lines changed

oauth-service.d.ts

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ export declare class OAuthService {
33
redirectUri: string;
44
loginUrl: string;
55
scope: string;
6+
resource: string;
67
rngUrl: string;
78
oidc: boolean;
89
options: any;

oauth-service.js

+3
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ var OAuthService = (function () {
99
this.redirectUri = "";
1010
this.loginUrl = "";
1111
this.scope = "";
12+
this.resource = "";
1213
this.rngUrl = "";
1314
this.oidc = false;
1415
this.state = "";
@@ -44,6 +45,8 @@ var OAuthService = (function () {
4445
+ encodeURIComponent(state)
4546
+ "&redirect_uri="
4647
+ encodeURIComponent(that.redirectUri)
48+
+ "&resource="
49+
+ encodeURIComponent(that.resource)
4750
+ "&scope="
4851
+ encodeURIComponent(that.scope);
4952
if (that.oidc) {

oauth-service.ts

+5-2
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ export class OAuthService {
1010
public redirectUri = "";
1111
public loginUrl = "";
1212
public scope = "";
13+
public resource = "";
1314
public rngUrl = "";
1415
public oidc = false;
1516
public options: any;
@@ -48,11 +49,13 @@ export class OAuthService {
4849
+ "?response_type="
4950
+ response_type
5051
+ "&client_id="
51-
+ encodeURIComponent(that.clientId)
52+
+ encodeURIComponent(that.clientId)
5253
+ "&state="
53-
+ encodeURIComponent(state)
54+
+ encodeURIComponent(state)
5455
+ "&redirect_uri="
5556
+ encodeURIComponent(that.redirectUri)
57+
+ "&resource="
58+
+ encodeURIComponent(that.resource)
5659
+ "&scope="
5760
+ encodeURIComponent(that.scope);
5861

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "angular2-oauth2",
3-
"version": "1.3.10",
3+
"version": "1.3.11",
44
"description": "",
55
"main": "oauth-service.js",
66
"author": "Manfred Steyer (http://www.softwarearchitekt.at)",

0 commit comments

Comments
 (0)