當前位置: 首頁>>編程示例 >>用法及示例精選 >>正文


JavaScript ArcGIS IdentityManager.findOAuthInfo用法及代碼示例

基本信息

以下是所在類或對象的基本信息。

AMD: require(["esri/identity/IdentityManager"], (esriId) => { /* code goes here */ });

ESM: import esriId from "@arcgis/core/identity/IdentityManager";

類: esri/identity/IdentityManager

自從:用於 JavaScript 4.0 的 ArcGIS API

用法說明

IdentityManager.findOAuthInfo函數(或屬性)的定義如下:

findOAuthInfo (url) {OAuthInfo}


返回傳入的 Portal 服務器 URL 的 OAuthInfo 配置。

參數:

類型說明
url String

門戶的 URL。

返回:

類型 說明
OAuthInfo 傳入的 Portal 服務器 URL 的 OAuthInfo 配置。

例子:

require(["esri/identity/IdentityManager"], function(esriId) {
  let portalURL = "https://host.arcgis.com";
  findOAuthInfo = function (){
    let oAuthInfo = esriId.findOAuthInfo(portalURL)
    console.log(oAuthInfo.toJSON())
  }
});

相關用法


注:本文由純淨天空篩選整理自arcgis.com大神的英文原創作品 IdentityManager.findOAuthInfo。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。