Skip to content

fix: bearer token endpoint#34

Merged
GorshkovIvan merged 1 commit into
mainfrom
ivan/fix/bearer-token-case-sensitivity-issue
Aug 29, 2025
Merged

fix: bearer token endpoint#34
GorshkovIvan merged 1 commit into
mainfrom
ivan/fix/bearer-token-case-sensitivity-issue

Conversation

@GorshkovIvan

@GorshkovIvan GorshkovIvan commented Aug 27, 2025

Copy link
Copy Markdown

Summary

Fix bearer token case sensitivity issue by making token type configurable.

The change was implemented to test a solution for the following ticket: https://linear.app/speakeasy/issue/GEN-1753/bug-fix-bearer-token-case-sensitivity-issue

Changes

  • Add support for configurable token type via token_type query parameter in /oauth/token endpoint
  • Default to "Bearer" when no token type is specified to maintain backward compatibility
  • Replace hardcoded "Bearer" token type with configurable value in token response

Technical Details

The changes are in internal/clientcredentials/service.go:90-94 and internal/clientcredentials/service.go:114 where we now:

  1. Extract token_type from query parameters
  2. Use "Bearer" as default if not provided
  3. Return the specified token type in the OAuth response

This allows clients to specify different token type cases (e.g., "bearer", "Bearer", "BEARER") while maintaining the current behavior as default.

@GorshkovIvan GorshkovIvan self-assigned this Aug 28, 2025
@GorshkovIvan
GorshkovIvan merged commit 3e2e084 into main Aug 29, 2025
4 checks passed
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