catalog-model: deprecate ENTITY_DEFAULT_NAMESPACE, replace with DEFAULT_NAMESPACE

Signed-off-by: Johan Haals <johan.haals@gmail.com>
This commit is contained in:
Johan Haals
2022-02-15 10:05:57 +01:00
parent 1c9891e3fb
commit 7aeb491394
37 changed files with 108 additions and 91 deletions
@@ -18,7 +18,7 @@ import express, { CookieOptions } from 'express';
import crypto from 'crypto';
import { URL } from 'url';
import {
ENTITY_DEFAULT_NAMESPACE,
DEFAULT_NAMESPACE,
parseEntityRef,
stringifyEntityRef,
} from '@backstage/catalog-model';
@@ -271,7 +271,7 @@ export class OAuthAdapter implements AuthProviderRouteHandlers {
const userEntityRef = stringifyEntityRef(
parseEntityRef(identity.id, {
defaultKind: 'user',
defaultNamespace: ENTITY_DEFAULT_NAMESPACE,
defaultNamespace: DEFAULT_NAMESPACE,
}),
);
const token = await this.options.tokenIssuer.issueToken({
@@ -15,7 +15,7 @@
*/
import {
ENTITY_DEFAULT_NAMESPACE,
DEFAULT_NAMESPACE,
parseEntityRef,
stringifyEntityRef,
} from '@backstage/catalog-model';
@@ -44,7 +44,7 @@ export function prepareBackstageIdentityResponse(
const userEntityRef = stringifyEntityRef(
parseEntityRef(sub, {
defaultKind: 'user',
defaultNamespace: ENTITY_DEFAULT_NAMESPACE,
defaultNamespace: DEFAULT_NAMESPACE,
}),
);
return {