Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Shared Authorization header parsing library

Open
#94 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
48/100
Issue type
Refactor
Clarity
Clearly specified
Activity status
Active
Tech stack
rust

Research direction

Start with http/handler_auth/token/request.rs and http/handler_auth/userinfo/request.rs to compare the existing Authorization header parsing, then inspect the libs/ conventions for a shared Rust library. Add unit tests for the listed parsing edge cases and run bnv-manager-v2's OIDC tests. Done means both callers use the library and those OIDC tests pass unchanged.

Written by the indexing model from the issue text.

Description

needs-triage

Follow-up from the review of #92.

bnv-manager-v2 parses the Authorization header twice, with the same steps:

  • http/handler_auth/token/request.rs (ClientCredentials::from_request / from_basic): HTTP Basic for client_secret_basic
  • http/handler_auth/userinfo/request.rs (bearer_token): Bearer for RFC 6750

Both reject a repeated header, split scheme and credentials at the first space and compare the scheme case-insensitively (RFC 7235 §2.1). Other services will likely need the same (Bearer for APIs, Basic for clients).

What to do

  • A library in libs/ that parses an Authorization header into its scheme and credentials, with typed helpers for:
    • Basic, including the RFC 6749 §2.3.1 form decoding of user and password
    • Bearer, validating the RFC 6750 §2.1 b64token
  • Errors distinguish missing, repeated, other scheme and malformed, so each caller can map them to its own error (invalid_client, invalid_request, no error code).
  • bnv-manager-v2 switches both call sites to it.

Acceptance criteria

  • One implementation of the header parsing, with unit tests for the edge cases (repeated header, case of the scheme, multiple spaces, padding, invalid base64, non-UTF-8).
  • bnv-manager-v2's OIDC tests pass unchanged.
Dominant language
TypeScript
Stars
0
Forks
1
Avg merge
4h 25m
Merged PRs (30d)
90

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from myOmikron/code

All issues in myOmikron/code

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.