Skip to content

Implement client_secret_basic (HTTP Basic Auth) for client authentication#53

Merged
eswan18 merged 1 commit into
mainfrom
fix/client-secret-basic
Mar 30, 2026
Merged

Implement client_secret_basic (HTTP Basic Auth) for client authentication#53
eswan18 merged 1 commit into
mainfrom
fix/client-secret-basic

Conversation

@eswan18
Copy link
Copy Markdown
Owner

@eswan18 eswan18 commented Mar 30, 2026

Summary

  • authenticateClient now supports both client_secret_post (form values) and client_secret_basic (HTTP Basic Auth) for client authentication, matching what the OIDC discovery document advertises
  • Basic auth takes precedence when both are present
  • Uses Go's built-in r.BasicAuth() for parsing per RFC 7617

Closes #51

Test plan

  • go build ./... and go vet ./... pass
  • Unit tests for parseClientCredentials: Basic auth, form values, and precedence
  • Integration tests: successful token exchange via Basic auth, rejected wrong secret via Basic auth (require Docker)

🤖 Generated with Claude Code

…tion

The OIDC discovery document advertised client_secret_basic support but
only client_secret_post (form values) was implemented. Any client using
HTTP Basic Auth for client authentication would fail.

authenticateClient now checks for an Authorization: Basic header first,
falling back to form values. This uses Go's built-in r.BasicAuth() which
handles the base64 decoding and credential splitting per RFC 7617.

Closes #51

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@eswan18 eswan18 merged commit 07219bf into main Mar 30, 2026
1 check passed
@eswan18 eswan18 deleted the fix/client-secret-basic branch March 30, 2026 03:27
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.

Discovery advertises client_secret_basic but only client_secret_post is implemented

1 participant