auth-node,auth-backend: remove deprecated identity result fields

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
Patrik Oldsberg
2022-03-17 22:56:03 +01:00
parent ffaaec5950
commit 15d3a3c39a
15 changed files with 25 additions and 254 deletions
+2 -4
View File
@@ -135,12 +135,11 @@ describe('IdentityClient', () => {
const token = await factory.issueToken({ claims: { sub: 'foo' } });
const response = await client.authenticate(token);
expect(response).toEqual({
id: 'foo',
token: token,
identity: {
ownershipEntityRefs: [],
type: 'user',
userEntityRef: 'foo',
ownershipEntityRefs: [],
},
});
});
@@ -202,12 +201,11 @@ describe('IdentityClient', () => {
const token = await factory.issueToken({ claims: { sub: 'foo' } });
const response = await client.authenticate(token);
expect(response).toEqual({
id: 'foo',
token: token,
identity: {
ownershipEntityRefs: [],
type: 'user',
userEntityRef: 'foo',
ownershipEntityRefs: [],
},
});
});
-1
View File
@@ -87,7 +87,6 @@ export class IdentityClient {
}
const user: BackstageIdentityResponse = {
id: decoded.sub,
token,
identity: {
type: 'user',
-21
View File
@@ -14,8 +14,6 @@
* limitations under the License.
*/
import { Entity } from '@backstage/catalog-model';
/**
* A representation of a successful Backstage sign-in.
*
@@ -25,25 +23,6 @@ import { Entity } from '@backstage/catalog-model';
* @public
*/
export interface BackstageSignInResult {
/**
* An opaque ID that uniquely identifies the user within Backstage.
*
* This is typically the same as the user entity `metadata.name`.
*
* @deprecated Use the `identity` field instead
*/
id: string;
/**
* The entity that the user is represented by within Backstage.
*
* This entity may or may not exist within the Catalog, and it can be used
* to read and store additional metadata about the user.
*
* @deprecated Use the `identity` field instead.
*/
entity?: Entity;
/**
* The token used to authenticate the user within Backstage.
*/