From 1a9f24cc0cf7c5c12b35f101754cdad5c390dd7b Mon Sep 17 00:00:00 2001 From: Navdeep Gupta Date: Tue, 23 Jan 2024 17:57:48 -0500 Subject: [PATCH] fix: comments. Signed-off-by: Navdeep Gupta --- .../package.json | 3 +-- .../src/helpers.ts | 2 +- .../src/index.d.ts | 17 ----------------- .../src/index.ts | 1 - .../src/types.ts | 7 +------ yarn.lock | 1 - 6 files changed, 3 insertions(+), 28 deletions(-) delete mode 100644 plugins/auth-backend-module-aws-alb-provider/src/index.d.ts diff --git a/plugins/auth-backend-module-aws-alb-provider/package.json b/plugins/auth-backend-module-aws-alb-provider/package.json index 41e3e409e2..239b5e705d 100644 --- a/plugins/auth-backend-module-aws-alb-provider/package.json +++ b/plugins/auth-backend-module-aws-alb-provider/package.json @@ -40,8 +40,7 @@ "@types/passport": "^1.0.3", "jose": "^4.6.0", "jwt-decode": "^3.1.0", - "node-cache": "^5.1.2", - "passport": "^0.7.0" + "node-cache": "^5.1.2" }, "devDependencies": { "@backstage/backend-test-utils": "workspace:^", diff --git a/plugins/auth-backend-module-aws-alb-provider/src/helpers.ts b/plugins/auth-backend-module-aws-alb-provider/src/helpers.ts index a9ed980506..d97146bb93 100644 --- a/plugins/auth-backend-module-aws-alb-provider/src/helpers.ts +++ b/plugins/auth-backend-module-aws-alb-provider/src/helpers.ts @@ -13,7 +13,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -import { PassportProfile } from './types'; +import type { PassportProfile } from '@backstage/plugin-auth-node/'; import { ProfileInfo } from '@backstage/plugin-auth-node'; import { KeyObject } from 'crypto'; import jwtDecoder from 'jwt-decode'; diff --git a/plugins/auth-backend-module-aws-alb-provider/src/index.d.ts b/plugins/auth-backend-module-aws-alb-provider/src/index.d.ts deleted file mode 100644 index e000bc66e7..0000000000 --- a/plugins/auth-backend-module-aws-alb-provider/src/index.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -/* - * Copyright 2023 The Backstage Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -export { type PassportProfile } from './types'; diff --git a/plugins/auth-backend-module-aws-alb-provider/src/index.ts b/plugins/auth-backend-module-aws-alb-provider/src/index.ts index f84a1bc842..779f558f54 100644 --- a/plugins/auth-backend-module-aws-alb-provider/src/index.ts +++ b/plugins/auth-backend-module-aws-alb-provider/src/index.ts @@ -24,4 +24,3 @@ export { awsAlbAuthenticator } from './authenticator'; export { authModuleAwsAlbProvider } from './module'; export { awsAlbSignInResolvers } from './resolvers'; export { type AwsAlbResult } from './types'; -export { type PassportProfile } from './types'; diff --git a/plugins/auth-backend-module-aws-alb-provider/src/types.ts b/plugins/auth-backend-module-aws-alb-provider/src/types.ts index 0bd3f9e74f..c45640851c 100644 --- a/plugins/auth-backend-module-aws-alb-provider/src/types.ts +++ b/plugins/auth-backend-module-aws-alb-provider/src/types.ts @@ -14,8 +14,7 @@ * limitations under the License. */ -import passport from 'passport'; - +import type { PassportProfile } from '@backstage/plugin-auth-node/'; /** * JWT header extraction result, containing the raw value and the parsed JWT * payload. @@ -30,10 +29,6 @@ export type AwsAlbResult = { /** * @public */ -export type PassportProfile = passport.Profile & { - avatarUrl?: string; -}; - export type AwsAlbClaims = { sub: string; name: string; diff --git a/yarn.lock b/yarn.lock index 22f4497ca6..d5c18a8921 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4748,7 +4748,6 @@ __metadata: jose: ^4.6.0 jwt-decode: ^3.1.0 node-cache: ^5.1.2 - passport: ^0.7.0 languageName: unknown linkType: soft