Skip to content

feat: add auth.format for formatting credentials#65

Merged
blakeembrey merged 6 commits intojshttp:masterfrom
Phillip9587:format
Apr 27, 2026
Merged

feat: add auth.format for formatting credentials#65
blakeembrey merged 6 commits intojshttp:masterfrom
Phillip9587:format

Conversation

@Phillip9587
Copy link
Copy Markdown
Contributor

This pull request introduces a new feature to the basic-auth library, adding a method to format credentials into a basic auth header string.

Comment thread index.js Outdated
@Phillip9587
Copy link
Copy Markdown
Contributor Author

@blakeembrey I rebased and added your suggestions to disallow colons in username and control characters in both username and password.

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 23, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (08b56ca) to head (af1d90b).

Additional details and impacted files
@@            Coverage Diff            @@
##            master       #65   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            1         1           
  Lines           21        55   +34     
  Branches         6        20   +14     
=========================================
+ Hits            21        55   +34     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Phillip9587
Copy link
Copy Markdown
Contributor Author

Maybe we should merge this before #95 so that i can also add a cross-environment encodeBase64() in #95.

* master:
  Update docs to use `parse` method (jshttp#97)
* master:
  Improve parse perf with benchmarks (jshttp#96)
Comment thread src/index.ts Outdated
Comment thread README.md Outdated
Comment thread README.md Outdated
Comment thread src/index.ts
@blakeembrey blakeembrey merged commit 1ba386f into jshttp:master Apr 27, 2026
6 checks passed
@Phillip9587 Phillip9587 deleted the format branch April 27, 2026 20:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants