Skip to content

Commit

Permalink
BAU: Remove source ip from mfa service
Browse files Browse the repository at this point in the history
This is no longer required to set the ip in headers, since the common headers library that is now used gets this from the request that we now pass through.
  • Loading branch information
BeckaL committed May 22, 2024
1 parent 26f0f9a commit eb325ec
Show file tree
Hide file tree
Showing 9 changed files with 1 addition and 11 deletions.
2 changes: 0 additions & 2 deletions src/components/common/mfa/mfa-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ export function mfaService(axios: Http = http): MfaServiceInterface {
sessionId: string,
clientSessionId: string,
emailAddress: string,
sourceIp: string,
persistentSessionId: string,
isResendCodeRequest: boolean,
userLanguage: string,
Expand All @@ -36,7 +35,6 @@ export function mfaService(axios: Http = http): MfaServiceInterface {
{
sessionId: sessionId,
clientSessionId: clientSessionId,
sourceIp: sourceIp,
persistentSessionId: persistentSessionId,
userLanguage: userLanguage,
},
Expand Down
1 change: 0 additions & 1 deletion src/components/common/mfa/send-mfa-controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ export function sendMfaGeneric(
sessionId,
clientSessionId,
email,
req.ip,
persistentSessionId,
isResendCodeRequest,
xss(req.cookies.lng as string),
Expand Down
3 changes: 1 addition & 2 deletions src/components/common/mfa/tests/mfa-service.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ describe("mfa service", () => {
});

it("successfully calls the API to make a request to send an mfa code", async () => {
const { email, sessionId, clientSessionId, ip, diPersistentSessionId } =
const { email, sessionId, clientSessionId, diPersistentSessionId } =
commonVariables;
const req = createMockRequest(PATH_NAMES.ENTER_MFA, {
headers: requestHeadersWithIpAndAuditEncoded,
Expand Down Expand Up @@ -63,7 +63,6 @@ describe("mfa service", () => {
sessionId,
clientSessionId,
email,
ip,
diPersistentSessionId,
isResendCodeRequest,
userLanguage,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ describe("send mfa controller", () => {
sinon.match.any,
sinon.match.any,
sinon.match.any,
sinon.match.any,
JOURNEY_TYPE.REAUTHENTICATION
);
});
Expand Down
1 change: 0 additions & 1 deletion src/components/common/mfa/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ export interface MfaServiceInterface {
sessionId: string,
clientSessionId: string,
emailAddress: string,
sourceIp: string,
persistentSessionId: string,
isResendCodeRequest: boolean,
userLanguage: string,
Expand Down
1 change: 0 additions & 1 deletion src/components/enter-password/enter-password-controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,6 @@ export function enterPasswordPost(
sessionId,
clientSessionId,
email,
req.ip,
persistentSessionId,
false,
xss(req.cookies.lng as string),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,6 @@ describe("enter password controller", () => {
sinon.match.any,
sinon.match.any,
sinon.match.any,
sinon.match.any,
JOURNEY_TYPE.REAUTHENTICATION
);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ export function resetPassword2FASmsGet(
sessionId,
clientSessionId,
email,
req.ip,
persistentSessionId,
false,
xss(req.cookies.lng as string),
Expand Down
1 change: 0 additions & 1 deletion src/components/reset-password/reset-password-controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,6 @@ export function resetPasswordPost(
sessionId,
clientSessionId,
email,
req.ip,
persistentSessionId,
false,
xss(req.cookies.lng as string),
Expand Down

0 comments on commit eb325ec

Please sign in to comment.