IAuthenticationManager

Interface

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"
})

Properties

Property Type Notes
portal string

Defaults to 'https://www.arcgis.com/sharing/rest'.

Methods

Method Returns Notes
Promise<string>

getToken

Interface Method

Parameters

Parameter Type Default Notes
url Required string
requestOptions Optional ITokenRequestOptions

Returns

Promise<string>

request(url, { authentication: session })


Interface defined in packages/arcgis-rest-request/src/request.ts:24