From 8285e583376c4ab542603d9cfef52181ebd4895e Mon Sep 17 00:00:00 2001 From: Timo Hocker Date: Tue, 5 Jan 2021 21:35:45 +0100 Subject: [PATCH] fix --- lib/index.ts | 2 +- package.json | 2 +- test/spec/AuthHandler.ts | 3 +-- test/spec/Gateway.ts | 4 ++-- 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/lib/index.ts b/lib/index.ts index 8a11a83..5c605ee 100644 --- a/lib/index.ts +++ b/lib/index.ts @@ -4,4 +4,4 @@ import create_auth_handler from './AuthHandler'; import blacklist from './Blacklist'; import authority from './Authority'; -export default { create_gateway, create_auth_handler, blacklist, authority }; +export { create_gateway, create_auth_handler, blacklist, authority }; diff --git a/package.json b/package.json index 3c12237..0adec7d 100644 --- a/package.json +++ b/package.json @@ -47,4 +47,4 @@ "engines": { "node": ">=10.0.0" } -} \ No newline at end of file +} diff --git a/test/spec/AuthHandler.ts b/test/spec/AuthHandler.ts index 5020248..f713c5f 100644 --- a/test/spec/AuthHandler.ts +++ b/test/spec/AuthHandler.ts @@ -9,8 +9,7 @@ import http, { IncomingMessage, ServerResponse } from 'http'; import { to_b64 } from '@sapphirecode/encoding-helper'; import auth from '../../lib/Authority'; import { get, modify_signature, Response } from '../Helper'; -import create_auth_handler from '../../lib/AuthHandler'; - +import { create_auth_handler } from '../../lib/index'; const expires_seconds = 600; const refresh_expires_seconds = 3600; diff --git a/test/spec/Gateway.ts b/test/spec/Gateway.ts index a93a701..4fd6533 100644 --- a/test/spec/Gateway.ts +++ b/test/spec/Gateway.ts @@ -6,7 +6,7 @@ */ import http from 'http'; -import gateway from '../../lib/Gateway'; +import { create_gateway } from '../../lib/index'; import authority from '../../lib/Authority'; import blacklist from '../../lib/Blacklist'; import { get } from '../Helper'; @@ -21,7 +21,7 @@ describe ('gateway', () => { jasmine.clock () .mockDate (new Date); - const g = gateway ({ + const g = create_gateway ({ redirect_url: 'http://localhost/auth', cookie_name: 'cookie_jar' });