From 34da1574a3d768e7076ee2160e882e9b1d010d6b Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Thu, 21 Oct 2021 13:48:49 +0200 Subject: [PATCH] auth-backend: rename postgres keystore provider to database Signed-off-by: Patrik Oldsberg --- plugins/auth-backend/config.d.ts | 2 +- plugins/auth-backend/src/identity/KeyStores.ts | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/auth-backend/config.d.ts b/plugins/auth-backend/config.d.ts index 6f31cd07df..25da7fa332 100644 --- a/plugins/auth-backend/config.d.ts +++ b/plugins/auth-backend/config.d.ts @@ -33,7 +33,7 @@ export interface Config { /** To control how to store JWK data in auth-backend */ keyStore?: { - provider?: 'postgres' | 'memory' | 'firestore'; + provider?: 'database' | 'memory' | 'firestore'; firestore?: { /** The host to connect to */ host?: string; diff --git a/plugins/auth-backend/src/identity/KeyStores.ts b/plugins/auth-backend/src/identity/KeyStores.ts index 5ec63f5439..74e60a0502 100644 --- a/plugins/auth-backend/src/identity/KeyStores.ts +++ b/plugins/auth-backend/src/identity/KeyStores.ts @@ -32,7 +32,7 @@ type Options = { export class KeyStores { /** * Looks at the `auth.keyStore` section in the application configuration - * and returns a KeyStore store. Defaults to `postgres` + * and returns a KeyStore store. Defaults to `database` * * @returns a KeyStore store */ @@ -43,11 +43,11 @@ export class KeyStores { const { logger, database } = options ?? {}; const ks = config.getOptionalConfig('auth.keyStore'); - const provider = ks?.getOptionalString('provider') ?? 'postgres'; + const provider = ks?.getOptionalString('provider') ?? 'database'; logger?.info(`Configuring "${provider}" as KeyStore provider`); - if (provider === 'postgres') { + if (provider === 'database') { if (!database) { throw new Error('This KeyStore provider requires a database'); }