backend-common: leave ConfigReader to throw errors when config is missing in ServerTokenManager
Signed-off-by: Mike Lewis <mtlewis@users.noreply.github.com>
This commit is contained in:
@@ -26,10 +26,8 @@ export class ServerTokenManager implements TokenManager {
|
||||
}
|
||||
|
||||
static fromConfig(config: Config) {
|
||||
const secret = config.getOptionalString('backend.authorization.secret');
|
||||
if (!secret) {
|
||||
throw new Error('No backend auth secret set in app-config');
|
||||
}
|
||||
const secret = config.getString('backend.authorization.secret');
|
||||
|
||||
return new ServerTokenManager(secret);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user