chore: Address PR comments

Signed-off-by: Carlos Esteban Lopez <lcarlosesteb@vmware.com>
This commit is contained in:
Carlos Esteban Lopez
2023-11-22 14:12:00 -05:00
parent e06962c68c
commit ada059e149
5 changed files with 15 additions and 15 deletions
@@ -17,12 +17,12 @@ export default authModuleVmwareCloudProvider;
// @public
export const vmwareCloudAuthenticator: OAuthAuthenticator<
vmwareCloudAuthenticatorContext,
vmwarePassportProfile
VMwareCloudAuthenticatorContext,
VMwarePassportProfile
>;
// @public (undocumented)
export interface vmwareCloudAuthenticatorContext {
export interface VMwareCloudAuthenticatorContext {
// (undocumented)
helper: PassportOAuthAuthenticatorHelper;
// (undocumented)
@@ -40,7 +40,7 @@ export namespace vmwareCloudSignInResolvers {
}
// @public (undocumented)
export type vmwarePassportProfile = PassportProfile & {
export type VMwarePassportProfile = PassportProfile & {
organizationId?: string;
};
```
@@ -30,7 +30,7 @@ import { setupServer } from 'msw/node';
import {
vmwareCloudAuthenticator,
vmwareCloudAuthenticatorContext,
VMwareCloudAuthenticatorContext,
} from './authenticator';
jest.mock('uid2', () => jest.fn().mockReturnValue('sessionid'));
@@ -60,7 +60,7 @@ describe('vmwareCloudAuthenticator', () => {
};
let fakeSession: Record<string, any>;
let authenticatorCtx: vmwareCloudAuthenticatorContext;
let authenticatorCtx: VMwareCloudAuthenticatorContext;
beforeAll(async () => {
idToken = await new SignJWT(signInInfo)
@@ -31,14 +31,14 @@ import {
} from 'passport-oauth2';
/** @public */
export interface vmwareCloudAuthenticatorContext {
export interface VMwareCloudAuthenticatorContext {
organizationId?: string;
providerStrategy: OAuth2Strategy;
helper: PassportOAuthAuthenticatorHelper;
}
/** @public */
export type vmwarePassportProfile = PassportProfile & {
export type VMwarePassportProfile = PassportProfile & {
organizationId?: string;
};
@@ -48,8 +48,8 @@ export type vmwarePassportProfile = PassportProfile & {
* @public
*/
export const vmwareCloudAuthenticator = createOAuthAuthenticator<
vmwareCloudAuthenticatorContext,
vmwarePassportProfile
VMwareCloudAuthenticatorContext,
VMwarePassportProfile
>({
defaultProfileTransform: async input => {
if (!input.session.idToken) {
@@ -201,7 +201,7 @@ export const vmwareCloudAuthenticator = createOAuthAuthenticator<
fullProfile: {
...result.fullProfile,
organizationId: ctx.organizationId,
} as vmwarePassportProfile,
} as VMwarePassportProfile,
}));
},
@@ -211,7 +211,7 @@ export const vmwareCloudAuthenticator = createOAuthAuthenticator<
fullProfile: {
...result.fullProfile,
organizationId: ctx.organizationId,
} as vmwarePassportProfile,
} as VMwarePassportProfile,
}));
},
});
@@ -22,8 +22,8 @@
export {
vmwareCloudAuthenticator,
type vmwareCloudAuthenticatorContext,
type vmwarePassportProfile,
type VMwareCloudAuthenticatorContext,
type VMwarePassportProfile,
} from './authenticator';
export { authModuleVmwareCloudProvider as default } from './module';
export { vmwareCloudSignInResolvers } from './resolvers';
@@ -60,7 +60,7 @@ export namespace vmwareCloudSignInResolvers {
},
});
} catch (e) {
if (!(e instanceof NotFoundError)) {
if (e.name !== NotFoundError.name) {
throw e;
}
return ctx.issueToken({