Skip to content

refactor(https): change token extraction functions to accept a Map of headers instead of a Request object#107

Merged
kevmoo merged 1 commit intomainfrom
header_change_crazy_fix
Apr 1, 2026
Merged

refactor(https): change token extraction functions to accept a Map of headers instead of a Request object#107
kevmoo merged 1 commit intomainfrom
header_change_crazy_fix

Conversation

@kevmoo
Copy link
Copy Markdown
Collaborator

@kevmoo kevmoo commented Apr 1, 2026

Decouples the authentication logic from package:shelf by passing the headers map directly. This simplifies the API and makes testing easier without needing to construct full shelf Request objects.

  • Update extractAuthToken, extractAppCheckToken, and checkTokens to take Map<String, String>.
  • Update HttpsNamespace usage to pass request.headers.
  • Update unit tests to use raw Map literals for headers.

… headers instead of a Request object

Decouples the authentication logic from `package:shelf` by passing the headers map directly. This simplifies the API and makes testing easier without needing to construct full shelf Request objects.

- Update `extractAuthToken`, `extractAppCheckToken`, and `checkTokens` to take `Map<String, String>`.
- Update `HttpsNamespace` usage to pass `request.headers`.
- Update unit tests to use raw Map literals for headers.
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@kevmoo kevmoo requested a review from natebosch April 1, 2026 03:59
@kevmoo
Copy link
Copy Markdown
Collaborator Author

kevmoo commented Apr 1, 2026

/gemini review

@gemini-code-assist
Copy link
Copy Markdown
Contributor

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@kevmoo kevmoo requested a review from brianquinlan April 1, 2026 16:19
@kevmoo kevmoo merged commit dfa8d02 into main Apr 1, 2026
9 checks passed
@kevmoo kevmoo deleted the header_change_crazy_fix branch April 1, 2026 20:42
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