summaryrefslogtreecommitdiffhomepage
path: root/packages/server/src/authentication/verifyAuthenticationResponse.test.ts
diff options
context:
space:
mode:
authorCorentin Mors <corentin@dashlane.com>2023-07-20 09:30:10 +0200
committerCorentin Mors <corentin@dashlane.com>2023-07-20 16:43:01 +0200
commit57f58b87892fe01ba62f78be1b9ac219decd854c (patch)
tree518533a748005bebe93f7d7d477ce61b655680ba /packages/server/src/authentication/verifyAuthenticationResponse.test.ts
parent79f89b85ba19429c2f4974bc012071aa6f542c55 (diff)
Add matched RPID to verify response
Diffstat (limited to 'packages/server/src/authentication/verifyAuthenticationResponse.test.ts')
-rw-r--r--packages/server/src/authentication/verifyAuthenticationResponse.test.ts3
1 files changed, 3 insertions, 0 deletions
diff --git a/packages/server/src/authentication/verifyAuthenticationResponse.test.ts b/packages/server/src/authentication/verifyAuthenticationResponse.test.ts
index 5547224..c996991 100644
--- a/packages/server/src/authentication/verifyAuthenticationResponse.test.ts
+++ b/packages/server/src/authentication/verifyAuthenticationResponse.test.ts
@@ -45,6 +45,7 @@ test('should return authenticator info after verification', async () => {
expect(verification.authenticationInfo.newCounter).toEqual(144);
expect(verification.authenticationInfo.credentialID).toEqual(authenticator.credentialID);
expect(verification.authenticationInfo?.origin).toEqual(assertionOrigin);
+ expect(verification.authenticationInfo?.rpID).toEqual('dev.dontneeda.pw');
});
test('should throw when response challenge is not expected value', async () => {
@@ -226,6 +227,7 @@ test('should support multiple possible origins', async () => {
expect(verification.verified).toEqual(true);
expect(verification.authenticationInfo?.origin).toEqual(assertionOrigin);
+ expect(verification.authenticationInfo?.rpID).toEqual('dev.dontneeda.pw');
});
test('should throw an error if origin not in list of expected origins', async () => {
@@ -375,6 +377,7 @@ test('should return credential backup info', async () => {
expect(verification.authenticationInfo?.credentialDeviceType).toEqual('singleDevice');
expect(verification.authenticationInfo?.credentialBackedUp).toEqual(false);
expect(verification.authenticationInfo?.origin).toEqual(assertionOrigin);
+ expect(verification.authenticationInfo?.rpID).toEqual('dev.dontneeda.pw');
});
/**