feat: add static token issuer

Signed-off-by: rtriesscheijn <rtriesscheijn@bol.com>
This commit is contained in:
rtriesscheijn
2023-10-16 10:48:48 +02:00
parent 78bc50af22
commit bdf08ad04a
11 changed files with 611 additions and 13 deletions
+16 -1
View File
@@ -43,7 +43,7 @@ export interface Config {
/** To control how to store JWK data in auth-backend */
keyStore?: {
provider?: 'database' | 'memory' | 'firestore';
provider?: 'database' | 'memory' | 'firestore' | 'static';
firestore?: {
/** The host to connect to */
host?: string;
@@ -65,6 +65,21 @@ export interface Config {
/** Timeout used for database operations. Defaults to 10000ms */
timeout?: number;
};
static?: {
/** Must be declared at least once and the first one will be used for signing */
keys: Array<{
/** Path to the public key file in the SPKI format */
publicKeyFile: string;
/** Path to the matching private key file in the PKCS#8 format */
privateKeyFile: string;
/** id to uniquely identify this key within the JWK set */
keyId: string;
/** JWS "alg" (Algorithm) Header Parameter value. Defaults to ES256.
* Must match the algorithm used to generate the keys in the provided files
*/
algorithm?: string;
}>;
};
};
/**