fix
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Timo Hocker 2021-01-05 22:10:41 +01:00
parent 8285e58337
commit 05f2e53a8f
8 changed files with 89 additions and 16 deletions

View File

@ -18,5 +18,6 @@ module.exports = {
Atomics: 'readonly',
SharedArrayBuffer: 'readonly'
},
parserOptions: { ecmaVersion: 2018 }
parserOptions: { ecmaVersion: 2018 },
rules: { 'node/no-unpublished-import': 'off' }
};

View File

@ -131,7 +131,7 @@ class AuthRequest {
return pt.id;
}
public invalid (error_description?: string) {
public invalid (error_description?: string): void {
this.default_header ();
this.response.writeHead (400);
this.response.end (JSON.stringify ({
@ -140,7 +140,7 @@ class AuthRequest {
}));
}
public deny () {
public deny (): void {
this.default_header ();
this.response.writeHead (401);
this.response.end (JSON.stringify ({ error: 'invalid_client' }));
@ -230,3 +230,12 @@ export default function create_auth_handler (
return Promise.resolve ();
};
}
export {
AccessSettings,
AccessResult,
AccessResponse,
AuthRequest,
AuthRequestHandler,
CreateHandlerOptions
};

View File

@ -100,5 +100,12 @@ class Authority {
const auth = (new Authority);
export { Authority };
export {
TokenType,
VerificationResult,
SignatureResult,
SignatureOptions,
Authority
};
export default auth;

View File

@ -89,4 +89,9 @@ export default function create_gateway (options: GatewayOptions): Gateway {
return g.process_request.bind (g);
}
export { Gateway, AnyFunc };
export {
AnyFunc,
Gateway,
GatewayOptions,
GatewayClass
};

View File

@ -35,3 +35,4 @@ class KeyStore {
const ks: KeyStore = (new KeyStore);
export default ks;
export { KeyStore };

View File

@ -1,7 +1,56 @@
import create_gateway from './Gateway';
import create_auth_handler from './AuthHandler';
/*
* Copyright (C) Sapphirecode - All Rights Reserved
* This file is part of Auth-Server-Helper which is released under MIT.
* See file 'LICENSE' for full license details.
* Created by Timo Hocker <timo@scode.ovh>, January 2021
*/
import blacklist from './Blacklist';
import authority from './Authority';
/* eslint-disable import/no-namespace */
import create_auth_handler, {
AccessResponse,
CreateHandlerOptions,
AuthRequestHandler,
AuthRequest,
AccessSettings,
AccessResult
} from './AuthHandler';
import authority, {
VerificationResult,
TokenType,
SignatureResult,
SignatureOptions,
Authority
} from './Authority';
import blacklist, { Blacklist } from './Blacklist';
import create_gateway, {
GatewayOptions,
GatewayClass,
Gateway,
AnyFunc
} from './Gateway';
import { KeyStore } from './KeyStore';
export { create_gateway, create_auth_handler, blacklist, authority };
export {
create_gateway,
create_auth_handler,
blacklist,
authority,
AccessResponse,
CreateHandlerOptions,
AuthRequestHandler,
AuthRequest,
AccessSettings,
AccessResult,
VerificationResult,
TokenType,
SignatureResult,
SignatureOptions,
Authority,
Blacklist,
GatewayOptions,
GatewayClass,
Gateway,
AnyFunc,
KeyStore
};

View File

@ -29,10 +29,10 @@
},
"files": [
"LICENSE",
"*.js",
"*.ts",
"*.d.ts",
"*.map"
"**/*.js",
"**/*.ts",
"**/*.d.ts",
"**/*.map"
],
"keywords": [
"authentication",
@ -47,4 +47,4 @@
"engines": {
"node": ">=10.0.0"
}
}
}

View File

@ -18,5 +18,6 @@ module.exports = {
Atomics: 'readonly',
SharedArrayBuffer: 'readonly'
},
parserOptions: { ecmaVersion: 2018 }
parserOptions: { ecmaVersion: 2018 },
rules: { 'node/no-unpublished-import': 'off' }
};