(fix): bind 'this' properly for getKey function
Signed-off-by: Jonah Back <jonah@jonahback.com>
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/plugin-auth-backend': patch
|
||||
---
|
||||
|
||||
Fix improper binding of 'this' in ALB Auth provider
|
||||
@@ -189,7 +189,7 @@ export class AwsAlbAuthProvider implements AuthProviderRouteHandlers {
|
||||
};
|
||||
}
|
||||
|
||||
async getKey(header: JWTHeaderParameters): Promise<KeyObject> {
|
||||
getKey = async (header: JWTHeaderParameters): Promise<KeyObject> => {
|
||||
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;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user