Skip to content

Commit

Permalink
typescript definition updates based on PR feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
jbarrus committed Oct 9, 2019
1 parent 222ad6f commit c5e2c5d
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,25 @@
import { AuthorizationParameters, TokenSet } from 'openid-client';
import { Request, RequestHandler } from 'express';

interface AuthParams {
issuerBaseURL?: string;
interface ConfigParams {
auth0Logout?: boolean;
authorizationParams?: AuthorizationParameters
baseURL?: string;
clientID?: string;
clientSecret?: string;
clockTolerance?: number;
getUser?: (tokenSet: TokenSet) => any;
required?: boolean | ((request: Request) => boolean);
errorOnRequiredAuth?: boolean;
getUser?: (tokenSet: TokenSet) => undefined | object;
idpLogout?: boolean;
auth0Logout?: boolean;
routes?: boolean;
idTokenAlg?: string;
issuerBaseURL?: string;
loginPath?: string;
logoutPath?: string;
redirectUriPath?: string;
authorizationParams?: AuthorizationParameters
required?: boolean | ((request: Request) => boolean);
routes?: boolean;
}

export function auth(params?: AuthParams): RequestHandler;
export function auth(params?: ConfigParams): RequestHandler;
export function requiresAuth(): RequestHandler;
export function unauthorizedHandler(): RequestHandler;

0 comments on commit c5e2c5d

Please sign in to comment.