diff --git a/plugins/auth-backend/src/identity/index.ts b/plugins/auth-backend/src/identity/index.ts deleted file mode 100644 index 6ea025aae9..0000000000 --- a/plugins/auth-backend/src/identity/index.ts +++ /dev/null @@ -1,24 +0,0 @@ -/* - * Copyright 2020 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 { bindOidcRouter } from './router'; -export { TokenFactory } from './TokenFactory'; -export { DatabaseKeyStore } from './DatabaseKeyStore'; -export { MemoryKeyStore } from './MemoryKeyStore'; -export { FirestoreKeyStore } from './FirestoreKeyStore'; -export { KeyStores } from './KeyStores'; -export type { KeyStore, TokenParams } from './types'; -export { UserInfoDatabaseHandler } from './UserInfoDatabaseHandler'; diff --git a/plugins/auth-backend/src/identity/types.ts b/plugins/auth-backend/src/identity/types.ts index 059b9fca84..0693a2aba0 100644 --- a/plugins/auth-backend/src/identity/types.ts +++ b/plugins/auth-backend/src/identity/types.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import { TokenParams as _TokenParams } from '@backstage/plugin-auth-node'; +import { TokenParams } from '@backstage/plugin-auth-node'; /** Represents any form of serializable JWK */ export interface AnyJWK extends Record { @@ -24,12 +24,6 @@ export interface AnyJWK extends Record { kty: string; } -/** - * @public - * @deprecated import from `@backstage/plugin-auth-node` instead - */ -export type TokenParams = _TokenParams; - /** * A TokenIssuer is able to issue verifiable ID Tokens on demand. */ @@ -37,7 +31,7 @@ export type TokenIssuer = { /** * Issues a new ID Token */ - issueToken(params: _TokenParams): Promise; + issueToken(params: TokenParams): Promise; /** * List all public keys that are currently being used to sign tokens, or have been used diff --git a/plugins/auth-backend/src/lib/catalog/index.ts b/plugins/auth-backend/src/lib/catalog/index.ts deleted file mode 100644 index f0f5b10808..0000000000 --- a/plugins/auth-backend/src/lib/catalog/index.ts +++ /dev/null @@ -1,17 +0,0 @@ -/* - * Copyright 2020 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 { CatalogIdentityClient } from './CatalogIdentityClient'; diff --git a/plugins/auth-backend/src/lib/resolvers/CatalogAuthResolverContext.ts b/plugins/auth-backend/src/lib/resolvers/CatalogAuthResolverContext.ts index 31db763d09..a27954d6c4 100644 --- a/plugins/auth-backend/src/lib/resolvers/CatalogAuthResolverContext.ts +++ b/plugins/auth-backend/src/lib/resolvers/CatalogAuthResolverContext.ts @@ -31,7 +31,7 @@ import { AuthResolverContext, TokenParams, } from '@backstage/plugin-auth-node'; -import { CatalogIdentityClient } from '../catalog'; +import { CatalogIdentityClient } from '../catalog/CatalogIdentityClient'; function getDefaultOwnershipEntityRefs(entity: Entity) { const membershipRefs = diff --git a/plugins/auth-backend/src/lib/resolvers/index.ts b/plugins/auth-backend/src/lib/resolvers/index.ts deleted file mode 100644 index fc3ea8521c..0000000000 --- a/plugins/auth-backend/src/lib/resolvers/index.ts +++ /dev/null @@ -1,17 +0,0 @@ -/* - * Copyright 2022 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 { CatalogAuthResolverContext } from './CatalogAuthResolverContext'; diff --git a/plugins/auth-backend/src/providers/index.ts b/plugins/auth-backend/src/providers/index.ts deleted file mode 100644 index 772a913024..0000000000 --- a/plugins/auth-backend/src/providers/index.ts +++ /dev/null @@ -1,17 +0,0 @@ -/* - * Copyright 2020 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 ProviderFactories } from './router'; diff --git a/plugins/auth-backend/src/providers/router.ts b/plugins/auth-backend/src/providers/router.ts index 63891c38dc..63e37a5035 100644 --- a/plugins/auth-backend/src/providers/router.ts +++ b/plugins/auth-backend/src/providers/router.ts @@ -32,10 +32,6 @@ import { Minimatch } from 'minimatch'; import { CatalogAuthResolverContext } from '../lib/resolvers/CatalogAuthResolverContext'; import { TokenIssuer } from '../identity/types'; -/** - * @public - * @deprecated Migrate the auth plugin to the new backend system https://backstage.io/docs/backend-system/building-backends/migrating#the-auth-plugin - */ export type ProviderFactories = { [s: string]: AuthProviderFactory }; export function bindProviderRouters( diff --git a/plugins/auth-backend/src/service/index.ts b/plugins/auth-backend/src/service/index.ts deleted file mode 100644 index d26055aa59..0000000000 --- a/plugins/auth-backend/src/service/index.ts +++ /dev/null @@ -1,17 +0,0 @@ -/* - * Copyright 2024 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 { createRouter, type RouterOptions } from './router'; diff --git a/plugins/auth-backend/src/service/router.ts b/plugins/auth-backend/src/service/router.ts index 9c5a6b7711..d58d1bc976 100644 --- a/plugins/auth-backend/src/service/router.ts +++ b/plugins/auth-backend/src/service/router.ts @@ -27,12 +27,10 @@ import { import { AuthOwnershipResolver } from '@backstage/plugin-auth-node'; import { NotFoundError } from '@backstage/errors'; import { CatalogApi } from '@backstage/catalog-client'; -import { - bindOidcRouter, - KeyStores, - TokenFactory, - UserInfoDatabaseHandler, -} from '../identity'; +import { bindOidcRouter } from '../identity/router'; +import { KeyStores } from '../identity/KeyStores'; +import { TokenFactory } from '../identity/TokenFactory'; +import { UserInfoDatabaseHandler } from '../identity/UserInfoDatabaseHandler'; import session from 'express-session'; import connectSessionKnex from 'connect-session-knex'; import passport from 'passport'; @@ -43,7 +41,7 @@ import { StaticTokenIssuer } from '../identity/StaticTokenIssuer'; import { StaticKeyStore } from '../identity/StaticKeyStore'; import { bindProviderRouters, ProviderFactories } from '../providers/router'; -export interface RouterOptions { +interface RouterOptions { logger: LoggerService; database: DatabaseService; config: RootConfigService;