Lots of little updates to bring it in line with the other implemeentations etc...
All checks were successful
Publish to Private NPM Registry / publish (push) Successful in 40s
All checks were successful
Publish to Private NPM Registry / publish (push) Successful in 40s
This commit is contained in:
parent
30746a4e34
commit
d0dfa10536
5 changed files with 23 additions and 7 deletions
10
README.md
10
README.md
|
|
@ -1,2 +1,10 @@
|
||||||
# File based Implementation of bridgeman Accessible Auth Keystore
|
# File based Implementation of Bridgeman Accessible Auth Keystore
|
||||||
This is the file based implementation of the Bridgeman Accessible Auth Keystore.
|
This is the file based implementation of the Bridgeman Accessible Auth Keystore.
|
||||||
|
|
||||||
|
This is intended to be a simple implementation that just stores keys in a JSON file.
|
||||||
|
This is arguably pretty **INSECURE** (depending significantly on file protections etc... which are out of scope for this package).
|
||||||
|
But, it can be helpful for testing/development where simplicity might be preferable over strict security.
|
||||||
|
|
||||||
|
For more details on the Keystore concept itself or "upstream effects" see the [Keystore Library README](https://git.bridgemanaccessible.ca/Bridgeman-Accessible/ba-auth_keystore/src/branch/main/README.md)
|
||||||
|
|
||||||
|
This module/package/library includes a testing suite to verify functionality. It can be run using the yarn test command in any terminal/shell that supports Yarn. This test suite is also run as part of the public CI/CD automation on push.
|
||||||
|
|
@ -11,6 +11,9 @@ const { JWK } = NodeJose;
|
||||||
* File implementation for the keystore
|
* File implementation for the keystore
|
||||||
*/
|
*/
|
||||||
export class FileKeystore extends BaseKeystore {
|
export class FileKeystore extends BaseKeystore {
|
||||||
|
/** The type name of the keystore (used as the key for registration) */
|
||||||
|
public static readonly TYPE_NAME = 'file';
|
||||||
|
|
||||||
private keystoreFilePath: string | undefined;
|
private keystoreFilePath: string | undefined;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -86,4 +89,4 @@ export class FileKeystore extends BaseKeystore {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Keystore.addKeystoreType('file', FileKeystore.create);
|
Keystore.addKeystoreType(FileKeystore.TYPE_NAME, FileKeystore.create);
|
||||||
|
|
@ -1,3 +1,5 @@
|
||||||
import { FileKeystore } from './FileKeystore.js';
|
import { FileKeystore } from './FileKeystore.js';
|
||||||
|
|
||||||
export { FileKeystore };
|
const TYPE_NAME = FileKeystore.TYPE_NAME;
|
||||||
|
|
||||||
|
export { FileKeystore, TYPE_NAME };
|
||||||
|
|
@ -2,8 +2,11 @@
|
||||||
"extends": "./tsconfig.json",
|
"extends": "./tsconfig.json",
|
||||||
// Visit https://aka.ms/tsconfig to read more about this file
|
// Visit https://aka.ms/tsconfig to read more about this file
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
|
// File Layout
|
||||||
"rootDir": "./src",
|
"rootDir": "./src",
|
||||||
"types": [],
|
"outDir": "./dist",
|
||||||
|
|
||||||
|
"types": []
|
||||||
},
|
},
|
||||||
"exclude": [
|
"exclude": [
|
||||||
"node_modules",
|
"node_modules",
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
// File Layout
|
// File Layout
|
||||||
// "rootDir": "./src",
|
// "rootDir": "./src",
|
||||||
"outDir": "./dist",
|
// "outDir": "./dist",
|
||||||
|
|
||||||
// Environment Settings
|
// Environment Settings
|
||||||
// See also https://aka.ms/tsconfig/module
|
// See also https://aka.ms/tsconfig/module
|
||||||
|
|
@ -39,7 +39,7 @@
|
||||||
"isolatedModules": true,
|
"isolatedModules": true,
|
||||||
"noUncheckedSideEffectImports": true,
|
"noUncheckedSideEffectImports": true,
|
||||||
"moduleDetection": "force",
|
"moduleDetection": "force",
|
||||||
"skipLibCheck": true,
|
"skipLibCheck": true
|
||||||
},
|
},
|
||||||
"exclude": ["node_modules", "dist"],
|
"exclude": ["node_modules", "dist"],
|
||||||
"include": [
|
"include": [
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue