Skip to content

Commit

Permalink
Support customizing portal when instantiating ApplicationSession
Browse files Browse the repository at this point in the history
  • Loading branch information
alukach authored Jan 8, 2019
1 parent b84bad2 commit 3ffdddb
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion packages/arcgis-rest-auth/src/ApplicationSession.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ export interface IApplicationSessionOptions {
* Expiration date for the `token`
*/
expires?: Date;

/**
* URL of ArcGIS REST base, defaults to "https://www.arcgis.com/sharing/rest"
*/
portal?: string;
}

/**
Expand Down Expand Up @@ -63,7 +68,7 @@ export class ApplicationSession implements IAuthenticationManager {
this.clientSecret = options.clientSecret;
this.token = options.token;
this.expires = options.expires;
this.portal = "https://www.arcgis.com/sharing/rest";
this.portal = options.portal || "https://www.arcgis.com/sharing/rest";
}

// url isnt actually read or passed through.
Expand Down

0 comments on commit 3ffdddb

Please sign in to comment.