UNPKG

node-sp-auth-nocolors

Version:

Unattended SharePoint http authentication with nodejs (Without Colors)

20 lines (15 loc) 737 B
import { IAuthResolver } from '../../IAuthResolver'; import { IAuthResponse } from '../../IAuthResponse'; import { HostingEnvironment } from '../../HostingEnvironment'; import { UrlHelper } from '../../../utils/UrlHelper'; export abstract class OnlineResolver implements IAuthResolver { protected hostingEnvironment: HostingEnvironment; protected endpointsMappings: Map<HostingEnvironment, string>; constructor(protected _siteUrl: string) { this.endpointsMappings = new Map(); this.hostingEnvironment = UrlHelper.ResolveHostingEnvironment(this._siteUrl); this.InitEndpointsMappings(); } public abstract getAuth(): Promise<IAuthResponse>; protected abstract InitEndpointsMappings(): void; }