Skip to content

Commit

Permalink
add links from IAuthenticationManager. resolves #154
Browse files Browse the repository at this point in the history
  • Loading branch information
jgravois committed Jul 23, 2018
1 parent 534f7d2 commit 1a813c9
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/arcgis-rest-auth/src/UserSession.ts
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ export interface IUserSessionOptions {
* ```
* Used to manage the authentication of ArcGIS Online and ArcGIS Enterprise users
* in `request`. This class also includes several
* helper methods for authenticating users with OAuth 2.0 in both browser and
* helper methods for authenticating users with [OAuth 2.0](https://developers.arcgis.com/documentation/core-concepts/security-and-authentication/browser-based-user-logins/) in both browser and
* server applications.
*
*/
Expand Down
16 changes: 16 additions & 0 deletions packages/arcgis-rest-request/src/request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,23 @@ import { encodeQueryString } from "./utils/encode-query-string";
import { requiresFormData } from "./utils/process-params";
import { ArcGISRequestError } from "./utils/ArcGISRequestError";

/**
* Authentication can be supplied to `request` via [`UserSession`](../../auth/UserSession/) or [`ApplicationSession`](../../auth/ApplicationSession/). Both classes extend `IAuthenticationManager`.
* ```js
* const session = new UserSession({
* username: "jsmith",
* password: "123456",
* // optional
* portal: "https://[yourserver]/arcgis/sharing/rest"
* })
*
* request(url, { authentication: session })
* ```
*/
export interface IAuthenticationManager {
/**
* Defaults to 'https://www.arcgis.com/sharing/rest'.
*/
portal: string;
getToken(url: string): Promise<string>;
}
Expand Down

0 comments on commit 1a813c9

Please sign in to comment.