diff --git a/.changeset/tricky-hounds-cry.md b/.changeset/tricky-hounds-cry.md new file mode 100644 index 0000000000..d54d59fd30 --- /dev/null +++ b/.changeset/tricky-hounds-cry.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-auth-backend': patch +--- + +Fix improper binding of 'this' in ALB Auth provider diff --git a/plugins/auth-backend/src/providers/aws-alb/provider.ts b/plugins/auth-backend/src/providers/aws-alb/provider.ts index 78bfb9f0ec..b8d43a11e6 100644 --- a/plugins/auth-backend/src/providers/aws-alb/provider.ts +++ b/plugins/auth-backend/src/providers/aws-alb/provider.ts @@ -189,7 +189,7 @@ export class AwsAlbAuthProvider implements AuthProviderRouteHandlers { }; } - async getKey(header: JWTHeaderParameters): Promise { + getKey = async (header: JWTHeaderParameters): Promise => { if (!header.kid) { throw new AuthenticationError('No key id was specified in header'); } @@ -208,7 +208,7 @@ export class AwsAlbAuthProvider implements AuthProviderRouteHandlers { keyValue.export({ format: 'pem', type: 'spki' }), ); return keyValue; - } + }; } /**