Skip to content

Commit

Permalink
Merge pull request #50 from patrick-rodgers/dev
Browse files Browse the repository at this point in the history
fix for issue 45, remove types.d.ts dep in nodejs package
  • Loading branch information
patrick-rodgers committed Mar 16, 2018
2 parents db01c02 + 8248dd1 commit a16e3e3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
15 changes: 7 additions & 8 deletions packages/nodejs/src/net/adalfetchclient.ts
@@ -1,28 +1,27 @@
/// <reference path="types.d.ts" />
declare var global: any;
declare var require: (path: string) => any;
import { AuthenticationContext } from "adal-node";
const nodeFetch = require("node-fetch");
import { Util, HttpClientImpl } from "@pnp/common";

interface IAuthenticationContext {
// interface IAuthenticationContext {

new(authorityUrl: string): IAuthenticationContext;
acquireTokenWithClientCredentials(resource: string, clientId: string, clientSecret: string, callback: (err: any, token: AADToken) => void): void;
}
// new(authorityUrl: string): IAuthenticationContext;
// acquireTokenWithClientCredentials(resource: string, clientId: string, clientSecret: string, callback: (err: any, token: any) => void): void;
// }

export interface AADToken {
accessToken: string;
expiresIn: number;
expiresOn: Date;
isMRRT: boolean;
expiresOn: string | Date;
isMRRT?: boolean;
resource: string;
tokenType: string;
}

export class AdalFetchClient implements HttpClientImpl {

private authContext: IAuthenticationContext;
private authContext: any;

constructor(private _tenant: string,
private _clientId: string,
Expand Down
2 changes: 0 additions & 2 deletions packages/nodejs/src/net/types.d.ts

This file was deleted.

0 comments on commit a16e3e3

Please sign in to comment.