diff --git a/packages/backend/package.json b/packages/backend/package.json index 243ebf2ce3..3fda0ad728 100644 --- a/packages/backend/package.json +++ b/packages/backend/package.json @@ -47,6 +47,7 @@ "express": "^4.17.1", "express-promise-router": "^3.0.3", "knex": "^0.21.6", + "passport": "^0.4.1", "pg": "^8.3.0", "pg-connection-string": "^2.3.0", "sqlite3": "^5.0.0", diff --git a/plugins/auth-backend/src/identity/IdentityClient.test.ts b/plugins/auth-backend/src/identity/IdentityClient.test.ts index d3bb6aa9c5..4acaf335a4 100644 --- a/plugins/auth-backend/src/identity/IdentityClient.test.ts +++ b/plugins/auth-backend/src/identity/IdentityClient.test.ts @@ -23,10 +23,10 @@ import { PluginEndpointDiscovery } from '@backstage/backend-common'; const server = setupServer(); const mockBaseUrl = 'http://backstage:9191/i-am-a-mock-base'; const discovery: PluginEndpointDiscovery = { - async getBaseUrl(_pluginId) { + async getBaseUrl() { return mockBaseUrl; }, - async getExternalBaseUrl(_pluginId) { + async getExternalBaseUrl() { return mockBaseUrl; }, }; diff --git a/plugins/auth-backend/src/lib/passport/BackstageIdentityStrategy.ts b/plugins/auth-backend/src/lib/passport/BackstageIdentityStrategy.ts index 8f98583e55..a0ae4d4aac 100644 --- a/plugins/auth-backend/src/lib/passport/BackstageIdentityStrategy.ts +++ b/plugins/auth-backend/src/lib/passport/BackstageIdentityStrategy.ts @@ -1,3 +1,19 @@ +/* + * Copyright 2020 Spotify AB + * + * 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. + */ + import { Request } from 'express'; import { JWK, JWT, JWKS } from 'jose'; import { BackstageIdentity } from '../../providers';