backend-common: rename config block from authorization to auth
Signed-off-by: Mike Lewis <mtlewis@users.noreply.github.com>
This commit is contained in:
+2
-2
@@ -23,9 +23,9 @@ app:
|
||||
title: '#backstage'
|
||||
|
||||
backend:
|
||||
# Used for enabling authorization, secret is shared by all backend plugins
|
||||
# Used for enabling authentication, secret is shared by all backend plugins
|
||||
# See authenticate-api-requests.md in the contrib docs for information on the format
|
||||
# authorization:
|
||||
# auth:
|
||||
# secret: ${BACKEND_SECRET}
|
||||
baseUrl: http://localhost:7007
|
||||
listen:
|
||||
|
||||
Vendored
+1
-1
@@ -21,7 +21,7 @@ export interface Config {
|
||||
|
||||
backend: {
|
||||
/** Backend configuration for when request authentication is enabled */
|
||||
authorization?: {
|
||||
auth?: {
|
||||
/**
|
||||
* Secret shared by all backends for generating tokens
|
||||
* Format is base64 24-bit key
|
||||
|
||||
@@ -18,7 +18,7 @@ import { ServerTokenManager } from './ServerTokenManager';
|
||||
|
||||
const emptyConfig = new ConfigReader({});
|
||||
const configWithSecret = new ConfigReader({
|
||||
backend: { authorization: { secret: 'a-secret-key' } },
|
||||
backend: { auth: { secret: 'a-secret-key' } },
|
||||
});
|
||||
|
||||
describe('ServerTokenManager', () => {
|
||||
|
||||
@@ -26,7 +26,7 @@ export class ServerTokenManager implements TokenManager {
|
||||
}
|
||||
|
||||
static fromConfig(config: Config) {
|
||||
const secret = config.getString('backend.authorization.secret');
|
||||
const secret = config.getString('backend.auth.secret');
|
||||
|
||||
return new ServerTokenManager(secret);
|
||||
}
|
||||
|
||||
@@ -6,9 +6,9 @@ organization:
|
||||
name: My Company
|
||||
|
||||
backend:
|
||||
# Used for enabling authorization, secret is shared by all backend plugins
|
||||
# Used for enabling authentication, secret is shared by all backend plugins
|
||||
# See authenticate-api-requests.md in the contrib docs for information on the format
|
||||
# authorization:
|
||||
# auth:
|
||||
# secret: ${BACKEND_SECRET}
|
||||
baseUrl: http://localhost:7007
|
||||
listen:
|
||||
|
||||
Reference in New Issue
Block a user