[PR #4339] [MERGED] feat: add support for Digest authorization #4759

Closed
opened 2026-03-17 02:15:57 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/hoppscotch/hoppscotch/pull/4339
Author: @anwarulislam
Created: 9/11/2024
Status: Merged
Merged: 10/29/2024
Merged by: @jamesgeorge007

Base: nextHead: feat/digest-auth


📝 Commits (10+)

📊 Changes

29 files changed (+964 additions, -49 deletions)

View changed files

📝 packages/hoppscotch-cli/package.json (+1 -0)
📝 packages/hoppscotch-cli/src/__tests__/e2e/commands/test.spec.ts (+19 -13)
packages/hoppscotch-cli/src/__tests__/e2e/fixtures/collections/digest-auth-coll.json (+43 -0)
packages/hoppscotch-cli/src/__tests__/e2e/fixtures/collections/digest-auth-failure-coll.json (+43 -0)
packages/hoppscotch-cli/src/__tests__/e2e/fixtures/collections/digest-auth-success-coll.json (+43 -0)
packages/hoppscotch-cli/src/__tests__/e2e/fixtures/environments/digest-auth-envs.json (+21 -0)
packages/hoppscotch-cli/src/utils/auth/digest.ts (+139 -0)
📝 packages/hoppscotch-cli/src/utils/pre-request.ts (+45 -0)
📝 packages/hoppscotch-cli/src/utils/request.ts (+1 -0)
📝 packages/hoppscotch-common/locales/en.json (+14 -3)
📝 packages/hoppscotch-common/package.json (+1 -0)
📝 packages/hoppscotch-common/src/components.d.ts (+1 -0)
📝 packages/hoppscotch-common/src/components/app/spotlight/Entry.vue (+5 -4)
📝 packages/hoppscotch-common/src/components/graphql/Authorization.vue (+24 -9)
📝 packages/hoppscotch-common/src/components/graphql/Headers.vue (+2 -1)
📝 packages/hoppscotch-common/src/components/http/Authorization.vue (+48 -7)
📝 packages/hoppscotch-common/src/components/http/authorization/AWSSign.vue (+3 -3)
packages/hoppscotch-common/src/components/http/authorization/Digest.vue (+172 -0)
📝 packages/hoppscotch-common/src/composables/codemirror.ts (+2 -2)
packages/hoppscotch-common/src/helpers/auth/digest.ts (+147 -0)

...and 9 more files

📄 Description

Closes HFE-570

What's changed

This PR introduces Digest authentication as new request auth types.

Note for reviewers

Digest auth works in two stages.

First, it requests for an initial response, where we get necessary information like realm, nonce, algorithm, etc., from the server in the header WWW-Authenticate.

Then, we have to parse information from that header. Finally, we have to generate an authorization header and request with that auth header in the Authorization header property.

To test digest auth in CLI

hopp test src/__tests__/e2e/fixtures/collections/digest-auth-coll.json -e src/__tests__/e2e/fixtures/environments/digest-auth-envs.json


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/hoppscotch/hoppscotch/pull/4339 **Author:** [@anwarulislam](https://github.com/anwarulislam) **Created:** 9/11/2024 **Status:** ✅ Merged **Merged:** 10/29/2024 **Merged by:** [@jamesgeorge007](https://github.com/jamesgeorge007) **Base:** `next` ← **Head:** `feat/digest-auth` --- ### 📝 Commits (10+) - [`6efa54a`](https://github.com/hoppscotch/hoppscotch/commit/6efa54aa80b68b496a7c92e8959fdbbfd6dbc1c9) feat: digest auth added to new schema - [`96bbc7f`](https://github.com/hoppscotch/hoppscotch/commit/96bbc7f5ea32defd68504270374e82913cbc0887) chore: schema update - [`59a65be`](https://github.com/hoppscotch/hoppscotch/commit/59a65beec6b03552c701fee448470b7d23bb7479) feat: digest auth added - [`0ec64e7`](https://github.com/hoppscotch/hoppscotch/commit/0ec64e7c1f9c2e552a86e832e782f53b08cecc16) feat: digest auth advanced options - [`a9de371`](https://github.com/hoppscotch/hoppscotch/commit/a9de371689dba205157a61bca50e77e733e2f888) chore: clean ui - [`835e0b5`](https://github.com/hoppscotch/hoppscotch/commit/835e0b56e9404a016fd58379c25bf258f312fc98) chore: digest auth added - [`bfe209c`](https://github.com/hoppscotch/hoppscotch/commit/bfe209c411f122e27a838adba1c2c6919fcceb9b) feat: digest auth method testing - [`5db4e37`](https://github.com/hoppscotch/hoppscotch/commit/5db4e372c42f1ad69551425b077ca7399640a553) feat: digest md5 response - [`e342dbb`](https://github.com/hoppscotch/hoppscotch/commit/e342dbb3193ce30ef426e52c05c822cd5f1a6c4b) chore: clean up - [`3c5ad34`](https://github.com/hoppscotch/hoppscotch/commit/3c5ad34aa97b0027d6a3ad3e0bc9e721797c26a5) chore: clean up ### 📊 Changes **29 files changed** (+964 additions, -49 deletions) <details> <summary>View changed files</summary> 📝 `packages/hoppscotch-cli/package.json` (+1 -0) 📝 `packages/hoppscotch-cli/src/__tests__/e2e/commands/test.spec.ts` (+19 -13) ➕ `packages/hoppscotch-cli/src/__tests__/e2e/fixtures/collections/digest-auth-coll.json` (+43 -0) ➕ `packages/hoppscotch-cli/src/__tests__/e2e/fixtures/collections/digest-auth-failure-coll.json` (+43 -0) ➕ `packages/hoppscotch-cli/src/__tests__/e2e/fixtures/collections/digest-auth-success-coll.json` (+43 -0) ➕ `packages/hoppscotch-cli/src/__tests__/e2e/fixtures/environments/digest-auth-envs.json` (+21 -0) ➕ `packages/hoppscotch-cli/src/utils/auth/digest.ts` (+139 -0) 📝 `packages/hoppscotch-cli/src/utils/pre-request.ts` (+45 -0) 📝 `packages/hoppscotch-cli/src/utils/request.ts` (+1 -0) 📝 `packages/hoppscotch-common/locales/en.json` (+14 -3) 📝 `packages/hoppscotch-common/package.json` (+1 -0) 📝 `packages/hoppscotch-common/src/components.d.ts` (+1 -0) 📝 `packages/hoppscotch-common/src/components/app/spotlight/Entry.vue` (+5 -4) 📝 `packages/hoppscotch-common/src/components/graphql/Authorization.vue` (+24 -9) 📝 `packages/hoppscotch-common/src/components/graphql/Headers.vue` (+2 -1) 📝 `packages/hoppscotch-common/src/components/http/Authorization.vue` (+48 -7) 📝 `packages/hoppscotch-common/src/components/http/authorization/AWSSign.vue` (+3 -3) ➕ `packages/hoppscotch-common/src/components/http/authorization/Digest.vue` (+172 -0) 📝 `packages/hoppscotch-common/src/composables/codemirror.ts` (+2 -2) ➕ `packages/hoppscotch-common/src/helpers/auth/digest.ts` (+147 -0) _...and 9 more files_ </details> ### 📄 Description Closes HFE-570 ### What's changed This PR introduces Digest authentication as new request auth types. <!-- You can also choose to add a list of changes and if they have been completed or not by using the markdown to-do list syntax - [ ] Not Completed - [x] Completed --> ### Note for reviewers Digest auth works in two stages. First, it requests for an initial response, where we get necessary information like realm, nonce, algorithm, etc., from the server in the header WWW-Authenticate. Then, we have to parse information from that header. Finally, we have to generate an authorization header and request with that auth header in the Authorization header property. #### To test digest auth in CLI `hopp test src/__tests__/e2e/fixtures/collections/digest-auth-coll.json -e src/__tests__/e2e/fixtures/environments/digest-auth-envs.json` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-17 02:15:57 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/hoppscotch#4759
No description provided.