IAuthenticationManager
Interface
Authentication can be supplied to request
via ArcGISIdentityManager
, ApplicationCredentialsManager
or APIKeyManager
. These classes implement Code IAuthenticationManager.
Properties
Property | Type | Notes |
---|---|---|
boolean | Optional. Should return | |
string | Defaults to 'https://www.arcgis.com/sharing/rest'. |
canRefresh optional
portal
portal: string
Defaults to 'https://www.arcgis.com/sharing/rest'.
Methods
Method | Returns | Notes |
---|---|---|
| RequestCredentials | Optional. Returns the proper |
| Promise<string> | Returns the proper token for a given URL and request options. |
| Promise<IAuthenticationManager> | Optional. Refresh the stored credentials. |
getDomainCredentials optional
getDomainCredentials(url: string): RequestCredentials
Optional. Returns the proper credentials
option for fetch
for a given domain.
See trusted server. Used internally by underlying request methods to add support for specific security considerations.
Parameters
Parameter | Type | Notes |
---|---|---|
url | string | The url of the request |
Returns
RequestCredentials
"include" or "same-origin"
getToken
getToken(url: string, requestOptions?: ITokenRequestOptions): Promise<string>
Returns the proper token for a given URL and request options.
Parameters
Parameter | Type | Notes |
---|---|---|
url | string | The requested URL. |
request | ITokenRequestOptions | the requests options. |
Returns
Promise<string>
refreshCredentials optional
refreshCredentials(requestOptions?: ITokenRequestOptions): Promise<IAuthenticationManager>
Optional. Refresh the stored credentials.
Parameters
Parameter | Type |
---|---|
request | ITokenRequestOptions |
Returns
Promise<IAuthenticationManager>
canRefresh: boolean
Optional. Should return
true
if these credentials can be refreshed andfalse
if it cannot.