Definitions for ADAL.JS

This commit is contained in:
Matthieu Maitre
2016-03-26 01:34:57 -07:00
parent a44529fcb1
commit 25f2e05427
4 changed files with 247 additions and 0 deletions
+15
View File
@@ -0,0 +1,15 @@
/// <reference path="adal.d.ts" />
var endpoints = {
"https://yourhost/api": "b6a68585-5287-45b2-ba82-383ba1f60932",
};
var config : adal.Config = {
tenant: "52d4b072-9470-49fb-8721-bc3a1c9912a1", // Optional by default, it sends common
clientId: "e9a5a8b6-8af7-4719-9821-0deef255f68e", // Required
endpoints: endpoints // If you need to send CORS api requests.
};
var auth = new AuthenticationContext(config);
var userName: string = auth.getCachedUser().userName;