IAuthenticationManager
Authentication can be supplied to request
via UserSession
or ApplicationSession
. Both classes extend IAuthenticationManager
.
const session = new UserSession({
username: "jsmith",
password: "123456",
// optional
portal: "https://[yourserver]/arcgis/sharing/rest"
})
request(url, { authentication: session })
Properties
Property | Type | Notes |
---|---|---|
string |
Defaults to 'https://www.arcgis.com/sharing/rest'. |
Methods
getToken
Parameters
Parameter | Type | Default | Notes |
---|---|---|---|
url Required | string | ||
requestOptions Optional | ITokenRequestOptions |
Returns
Promise<string>
Interface defined in packages/arcgis-rest-request/src/utils/IAuthenticationManager.ts:15