【发布时间】:2020-01-06 10:51:44
【问题描述】:
我想知道 ADAL.js 是否适用于本地 ADFS 和 AD。 实际上,我需要获取 ADFS 的 Id_Token 并将其传递到 SharePoint REST API 的标头中。
在acticle ADAL.js 之后,我使用 Azure 参数找到了它:
@property {string} tenant - Your target tenant.
* @property {string} clientId - Client ID assigned to your app by Azure Active Directory.
* @property {string} redirectUri - Endpoint at which you expect to receive tokens.Defaults to `window.location.href`.
* @property {string} instance - Azure Active Directory Instance.Defaults to `https://login.microsoftonline.com/`.
* @property {Array} endpoints - Collection of {Endpoint-ResourceId} used for automatically attaching tokens in webApi calls.
* @property {Boolean} popUp - Set this to true to enable login in a popup winodow instead of a full redirect.Defaults to `false`.
事实上,我在本地使用 Active Directory 和 ADFS,作为开发人员,我也无权访问 AD 和 ADFS,有没有办法仅使用用户电子邮件获取 ID_token(为了不强制用户设置登录名和密码)
那么任何人都有一个示例方法来做到这一点?
【问题讨论】:
标签: javascript adfs adal.js