@@ -0,0 +1,8 @@
|
||||
---
|
||||
'@backstage/plugin-auth-backend-module-oauth2-proxy-provider': patch
|
||||
'@backstage/plugin-auth-backend-module-aws-alb-provider': patch
|
||||
'@backstage/plugin-auth-backend-module-gcp-iap-provider': patch
|
||||
'@backstage/plugin-auth-node': patch
|
||||
---
|
||||
|
||||
Fix issue with `providerInfo` not being set properly for some auth providers, by making `providerInfo` an explicit optional return from `authenticate`
|
||||
@@ -107,6 +107,10 @@ describe('AwsAlbProvider', () => {
|
||||
expiresInSeconds: mockClaims.exp,
|
||||
accessToken: mockAccessToken,
|
||||
},
|
||||
providerInfo: {
|
||||
accessToken: mockAccessToken,
|
||||
expiresInSeconds: mockClaims.exp,
|
||||
},
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@@ -45,7 +45,10 @@ describe('GcpIapProvider', () => {
|
||||
},
|
||||
ctx,
|
||||
),
|
||||
).resolves.toEqual({ result: { iapToken: { sub: 's', email: 'e' } } });
|
||||
).resolves.toEqual({
|
||||
result: { iapToken: { sub: 's', email: 'e' } },
|
||||
providerInfo: { iapToken: { sub: 's', email: 'e' } },
|
||||
});
|
||||
});
|
||||
|
||||
it('should find custom JWT header', async () => {
|
||||
@@ -66,7 +69,10 @@ describe('GcpIapProvider', () => {
|
||||
},
|
||||
ctx,
|
||||
),
|
||||
).resolves.toEqual({ result: { iapToken: { sub: 's', email: 'e' } } });
|
||||
).resolves.toEqual({
|
||||
result: { iapToken: { sub: 's', email: 'e' } },
|
||||
providerInfo: { iapToken: { sub: 's', email: 'e' } },
|
||||
});
|
||||
});
|
||||
|
||||
it('should throw if header is missing', async () => {
|
||||
|
||||
@@ -538,7 +538,11 @@ export type ProfileTransform<TResult> = (
|
||||
}>;
|
||||
|
||||
// @public (undocumented)
|
||||
export interface ProxyAuthenticator<TContext, TResult, TProviderInfo> {
|
||||
export interface ProxyAuthenticator<
|
||||
TContext,
|
||||
TResult,
|
||||
TProviderInfo = undefined,
|
||||
> {
|
||||
// (undocumented)
|
||||
authenticate(
|
||||
options: {
|
||||
|
||||
@@ -19,7 +19,11 @@ import { Request } from 'express';
|
||||
import { ProfileTransform } from '../types';
|
||||
|
||||
/** @public */
|
||||
export interface ProxyAuthenticator<TContext, TResult, TProviderInfo> {
|
||||
export interface ProxyAuthenticator<
|
||||
TContext,
|
||||
TResult,
|
||||
TProviderInfo = undefined,
|
||||
> {
|
||||
defaultProfileTransform: ProfileTransform<TResult>;
|
||||
initialize(ctx: { config: Config }): TContext;
|
||||
authenticate(
|
||||
|
||||
Reference in New Issue
Block a user