diff --git a/.changeset/chilled-dolls-accept.md b/.changeset/chilled-dolls-accept.md new file mode 100644 index 0000000000..1df2b0dc98 --- /dev/null +++ b/.changeset/chilled-dolls-accept.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-auth-node': patch +--- + +Deprecated the `getBearerTokenFromAuthorizationHeader` function, which is being replaced by the new `HttpAuthService`. diff --git a/plugins/auth-node/api-report.md b/plugins/auth-node/api-report.md index 5c8c547442..26e11236d2 100644 --- a/plugins/auth-node/api-report.md +++ b/plugins/auth-node/api-report.md @@ -223,7 +223,7 @@ export class DefaultIdentityClient implements IdentityApi { // @public (undocumented) export function encodeOAuthState(state: OAuthState): string; -// @public +// @public @deprecated export function getBearerTokenFromAuthorizationHeader( authorizationHeader: unknown, ): string | undefined; diff --git a/plugins/auth-node/src/identity/getBearerTokenFromAuthorizationHeader.ts b/plugins/auth-node/src/identity/getBearerTokenFromAuthorizationHeader.ts index 8451cd6ab1..f9ed969144 100644 --- a/plugins/auth-node/src/identity/getBearerTokenFromAuthorizationHeader.ts +++ b/plugins/auth-node/src/identity/getBearerTokenFromAuthorizationHeader.ts @@ -24,6 +24,7 @@ * call it directly with e.g. the output of `req.header('authorization')` * without first checking that it exists. * + * @deprecated Use the `credentials` method of `HttpAuthService` from `@backstage/backend-plugin-api` instead * @public */ export function getBearerTokenFromAuthorizationHeader(