Skip to content

[Client] Support token_endpoint_auth_method: client_secret_basic, client_secret_post, none #321

@soyuka

Description

@soyuka

Context

Per RFC 6749 §2.3 (and AS metadata token_endpoint_auth_methods_supported), the client must send its credentials to the token endpoint using whichever method the AS advertises:

  • client_secret_basic → HTTP Basic Authorization: Basic base64(client_id:client_secret)
  • client_secret_post → form-encoded client_id + client_secret body params
  • none → public client; only client_id in body, no secret

Scope

  • Strategy interface TokenEndpointAuthInterface + three implementations.
  • Auto-select implementation based on AS metadata's preferred method (intersect with what the client supports/has).

Conformance scenarios unblocked

auth/token-endpoint-auth-basic, auth/token-endpoint-auth-post, auth/token-endpoint-auth-none.

Dependencies

Blocked by: #318, #319.

Acceptance

  • Unit tests per strategy.
  • Conformance: 3 baseline scenarios pass.

cc @soyuka

Metadata

Metadata

Assignees

No one assigned

    Labels

    ClientIssues & PRs related to the Client componentP1Significant bug affecting many users, highly requested featureauthIssues and PRs related to Authentication / OAuthenhancementRequest for a new feature that's not currently supportedimproves spec complianceImproves consistency with other SDKs such as TyepScript

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions