@microsoft/mgt
Version:
The Microsoft Graph Toolkit
61 lines (60 loc) • 1.77 kB
TypeScript
/**
* -------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License.
* See License in the project root for license information.
* -------------------------------------------------------------------------------------------
*/
import { AuthenticationProviderOptions } from '@microsoft/microsoft-graph-client/lib/es/IAuthenticationProviderOptions';
import { IProvider } from './IProvider';
/**
* Wam provider authentication
*
* @export
* @class WamProvider
* @extends {IProvider}
*/
export declare class WamProvider extends IProvider {
private graphResource;
private clientId;
private authority;
private accessToken;
/**
* returns if Windows is the OS based on window
*
* @readonly
* @static
* @type {boolean}
* @memberof WamProvider
*/
static get isAvailable(): boolean;
/**
* returns accessToken
*
* @readonly
* @type {boolean}
* @memberof WamProvider
*/
get isLoggedIn(): boolean;
constructor(clientId: string, authority?: string);
/**
* login promise for the WamProvider
*
* @returns {Promise<void>}
* @memberof WamProvider
*/
login(): Promise<void>;
/**
* console logs the redirect url for auth
*
* @memberof WamProvider
*/
printRedirectUriToConsole(): void;
/**
* returns access token Promise
*
* @param {AuthenticationProviderOptions} options
* @returns {Promise<string>}
* @memberof WamProvider
*/
getAccessToken(options: AuthenticationProviderOptions): Promise<string>;
}