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

This commit is contained in:
Alan Bridgeman 2026-02-18 12:54:59 -06:00
parent 30746a4e34
commit d0dfa10536
5 changed files with 23 additions and 7 deletions

View file

@ -1,2 +1,10 @@
# File based Implementation of bridgeman Accessible Auth Keystore
This is the file based implementation of the 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 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.

View file

@ -11,6 +11,9 @@ const { JWK } = NodeJose;
* File implementation for the keystore
*/
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;
/**
@ -86,4 +89,4 @@ export class FileKeystore extends BaseKeystore {
}
}
Keystore.addKeystoreType('file', FileKeystore.create);
Keystore.addKeystoreType(FileKeystore.TYPE_NAME, FileKeystore.create);

View file

@ -1,3 +1,5 @@
import { FileKeystore } from './FileKeystore.js';
export { FileKeystore };
const TYPE_NAME = FileKeystore.TYPE_NAME;
export { FileKeystore, TYPE_NAME };

View file

@ -2,8 +2,11 @@
"extends": "./tsconfig.json",
// Visit https://aka.ms/tsconfig to read more about this file
"compilerOptions": {
// File Layout
"rootDir": "./src",
"types": [],
"outDir": "./dist",
"types": []
},
"exclude": [
"node_modules",

View file

@ -3,7 +3,7 @@
"compilerOptions": {
// File Layout
// "rootDir": "./src",
"outDir": "./dist",
// "outDir": "./dist",
// Environment Settings
// See also https://aka.ms/tsconfig/module
@ -39,7 +39,7 @@
"isolatedModules": true,
"noUncheckedSideEffectImports": true,
"moduleDetection": "force",
"skipLibCheck": true,
"skipLibCheck": true
},
"exclude": ["node_modules", "dist"],
"include": [