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
+40
View File
@@ -0,0 +1,40 @@
// Type definitions for Active Directory Authentication Library (ADAL) for JavaScript 1.0.8
// Project: https://github.com/AzureAD/azure-activedirectory-library-for-js
// Definitions by: mmaitre314 <https://github.com/mmaitre314>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
/// <reference path="adal.d.ts" />
/// <reference path="../angularjs/angular.d.ts" />
declare namespace adal {
interface AdalAuthenticationServiceProvider {
init(configOptions: Config, httpProvider: angular.IHttpProvider): void;
}
interface UserInfo {
isAuthenticated: boolean,
userName: string,
loginError: string,
profile: any
}
interface AdalAuthenticationService {
config: Config;
userInfo: UserInfo,
login(): void;
loginInProgress(): boolean;
logOut(): void;
getCachedToken(resource: string): string;
acquireToken(resource: string): angular.IPromise<string>;
getUser(): angular.IPromise<User>;
getResourceForEndpoint(endpoint: string): string,
clearCache(): void;
clearCacheForResource(resource: string): void;
info(message: string): void;
verbose(message: string): void;
}
}