Which client authentication scheme must an authorization server support for client passwords?
HTTP Basic supported for clients issued a client passwordRFC 6749 §2.3.1MUSTRoles: authorization_server
Requirement as recorded in the ProtocolSoup registry
The authorization server MUST support the HTTP Basic authentication scheme for authenticating clients that were issued a client password.
Read §2.3.1 in RFC 6749Self-test verdict
PassCommit 00bac3fEvaluated
This is ProtocolSoup's result against its own implementation at the commit shown. It is not a certification of ProtocolSoup or of any other product.
Captured from production
Captured Commit 00bac3f
Captured from the deployed ProtocolSoup at the commit shown. Every request and response is shown exactly as sent and received.
Passing exchange
Accepted, as requiredConformance client
The conformance client requests a client_credentials token as machine-client over HTTP Basic. Section 2.3.1 makes the Basic username and password the application/x-www-form-urlencoded encoding of the client identifier and client password. The seeded identifier needs no escaping, so to put the encoding on the wire the client escapes its hyphen anyway: the username it sends is machine%2Dclient, a valid encoding of machine-client. The token endpoint decodes it and authenticates the client.
Requests from ProtocolSoup’s conformance client, which sends malformed messages on purpose. The hosted wallet never sends these.
1.POST https://protocolsoup.com/oauth2/token200 OK
TLS: TLS 1.3 · TLS_AES_128_GCM_SHA256 · h2
Request
POST /oauth2/token HTTP/2.0 Authorization: Basic bWFjaGluZSUyRGNsaWVudDpNN0JrQkpfaUs4R3A0UmVGMVN2R0NxbHV4TW4yeVNydQ== Content-Length: 29 Content-Type: application/x-www-form-urlencoded Host: protocolsoup.com User-Agent: ProtocolSoup-Conformance-Client/1 grant_type=client_credentials
Response
HTTP/2.0 200 OK Cache-Control: no-store Cf-Cache-Status: DYNAMIC Cf-Ray: a65bafdb9d1f3cdb-MSP Content-Type: application/json Date: Sun, 06 Dec 2026 13:37:44 GMT Fly-Request-Id: 01M95S69BJPS9QARV44FCARVBJ-ord Nel: {"report_to":"cf-nel","success_fraction":0.0,"max_age":604800} Pragma: no-cache Referrer-Policy: strict-origin-when-cross-origin Report-To: {"group":"cf-nel","max_age":604800,"endpoints":[{"url":"https://a.nel.cloudflare.com/report/v4?s=dq0WTTE%2F6OT11xnuwHDIXk9btKarco9ecsNe8tOird%2Ft8AkcmViXgN3%2FEkQ27%2BcgzX09diWFvRwcO1Zm2hIJDyJ5gLABV57gJXFiQXTIDjeepUUW4QikyxVAyufGb7vF2zQ%3D"}]} Server: cloudflare Server-Timing: cfCacheStatus;desc="DYNAMIC" Server-Timing: cfEdge;dur=3,cfOrigin;dur=239 Vary: Origin Vary: accept-encoding Via: 1.1 fly.io, 1.1 fly.io X-Content-Type-Options: nosniff X-Frame-Options: DENY X-Xss-Protection: 1; mode=block {"access_token":"eyJhbGciOiJSUzI1NiIsImtpZCI6InJzYS05YTJlNThlYzVjNjk3NGJmIiwidHlwIjoiYXQrand0In0.eyJhdWQiOiJodHRwczovL3Byb3RvY29sc291cC5jb20vb2F1dGgyL3Jlc291cmNlIiwiY2xpZW50X2lkIjoibWFjaGluZS1jbGllbnQiLCJjbGllbnRfbmFtZSI6Ik1hY2hpbmUtdG8tTWFjaGluZSBDbGllbnQiLCJleHAiOjE3OTY1Njc4NjQsImlhdCI6MTc5NjU2NDI2NCwiaXNzIjoiaHR0cHM6Ly9wcm90b2NvbHNvdXAuY29tL29hdXRoMiIsImp0aSI6Imp0aS1kZjkwZDZjODgzODZhYjJhIiwibmJmIjoxNzk2NTY0MjY0LCJzY29wZSI6ImFwaTpyZWFkIGFwaTp3cml0ZSIsInN1YiI6Im1hY2hpbmUtY2xpZW50In0.ctsuceIkascJvwWn03mcY8ltxNocS_7KHZWAljgLjwzDrFp4awNcE3kIkZ-lbNL_OdOlZ1jZ9fXxwkBuPy3QjXfooxOhFH-izVJtOZcREDlCviiuweHQKDtq3fkQwwpL6z0G4SAsWI4oCBJ9N3649dc2S0wGC9SZ9hPEwN498iMnEa4a93tVKcZ5YmhRhUuLP5L-YWfam2_g2ETDMB8yoKR-hV_2HnpGDaqYIDVbnhqPn5j1iVlibE38SPyQTbmn5M8PY-w30KALjuJ5TcgyyIBy1g_7bGt9bDptp6GQ5mp8Pluz05xdC5uTzoaorIqP9-8aBGOvd1hvrlvEVDBhGw","token_type":"Bearer","expires_in":3600,"scope":"api:read api:write"}
Failing exchange
Rejected, as requiredConformance client
The conformance client requests a client_credentials token as machine-client over HTTP Basic with a password that is the client's real password followed by a percent sign. A percent sign that starts no escape is not valid application/x-www-form-urlencoded data, so the credentials cannot be decoded, and the token endpoint answers 401 invalid_client with a Basic challenge.
Requests from ProtocolSoup’s conformance client, which sends malformed messages on purpose. The hosted wallet never sends these.
1.POST https://protocolsoup.com/oauth2/token401 Unauthorized
TLS: TLS 1.3 · TLS_AES_128_GCM_SHA256 · h2
Request
POST /oauth2/token HTTP/2.0 Authorization: Basic bWFjaGluZS1jbGllbnQ6TTdCa0JKX2lLOEdwNFJlRjFTdkdDcWx1eE1uMnlTcnUl Content-Length: 29 Content-Type: application/x-www-form-urlencoded Host: protocolsoup.com User-Agent: ProtocolSoup-Conformance-Client/1 grant_type=client_credentials
Response
HTTP/2.0 401 Unauthorized Cache-Control: no-store Cf-Cache-Status: DYNAMIC Cf-Ray: a65bafee5f4e3cdb-MSP Content-Type: application/json Date: Sun, 06 Dec 2026 13:37:47 GMT Fly-Request-Id: 01M95S6C8BYZ2ZBY6VZDE8K1C3-ord Nel: {"report_to":"cf-nel","success_fraction":0.0,"max_age":604800} Pragma: no-cache Referrer-Policy: strict-origin-when-cross-origin Report-To: {"group":"cf-nel","max_age":604800,"endpoints":[{"url":"https://a.nel.cloudflare.com/report/v4?s=e%2BGOP5nN4EwY6sq7ai%2BwtqHBkshqm9cVPwR2lMDqjOpjlVShlyzUGUVuecueRkOwBaZCBqYJqLZZH2gippXRDcJ8V3Cz4f8rnEQujybtmSC5%2BUDNlpvW%2Be14saMkECS8iyY%3D"}]} Server: cloudflare Server-Timing: cfCacheStatus;desc="DYNAMIC" Server-Timing: cfEdge;dur=7,cfOrigin;dur=210 Vary: Origin Vary: accept-encoding Via: 1.1 fly.io, 1.1 fly.io Www-Authenticate: Basic realm="oauth2" X-Content-Type-Options: nosniff X-Frame-Options: DENY X-Xss-Protection: 1; mode=block {"error":"invalid_client","error_description":"Client authentication failed","error_uri":"https://datatracker.ietf.org/doc/html/rfc6749#section-5.2"}
Run it live
Looking Glass runs the flow that sends the message this requirement governs, against the same server, and decodes each exchange as it happens.
Open the flow in Looking GlassTests
- TestHTTPBasicClientAuthenticationUsesFormEncodedCredentials
./internal/protocols/oauth2
Pass - TestClientBasicAuthFormEncodesBothCredentials
./internal/crypto
Pass
Implementation
Explainer
What this requires
An authorization server must support HTTP Basic authentication for clients that were issued a client password. Any such client must be able to authenticate with an Authorization: Basic header, whatever other methods the server also offers. Sending the password in the body is the alternative Section 2.3.1 permits and discourages.
The credentials are not the raw identifier and password. The sentence before the requirement defines them: "The client identifier is encoded using the "application/x-www-form-urlencoded" encoding algorithm per Appendix B, and the encoded value is used as the username; the client password is encoded using the same algorithm and used as the password." Supporting the scheme therefore means decoding both parts before comparing them. Appendix B adds that values are encoded as UTF-8 first.
Why it exists
A common method lets a client library work against any authorization server without negotiation. The encoding exists because HTTP Basic joins username and password with a colon and has no way to escape one. An identifier that contains a colon, or a password with characters outside ASCII, cannot be carried unambiguously unless both are encoded first.
What non-compliance looks like
Most servers compare the header's values as they arrive. That works until a credential contains a character the encoding changes. A compliant client sends p%2Bw for the password p+w, the server compares the literal string, and authentication fails for a correct password. Client libraries then add per-provider switches for whether to encode.
At /oauth2/token credentials that are not validly encoded, such as a password with a stray percent sign, are answered 401 with error invalid_client and WWW-Authenticate: Basic realm="oauth2".
How ProtocolSoup tests it
TestHTTPBasicClientAuthenticationUsesFormEncodedCredentials registers a client whose identifier and password contain a space, a colon, +, %, &, = and non-ASCII characters. With the credentials form-encoded it obtains tokens with the client_credentials, authorization_code and refresh_token grants and calls /oauth2/introspect and /oauth2/revoke. With the same credentials sent as they are, all three endpoints answer 401. TestClientBasicAuthFormEncodesBothCredentials checks the encoder against the example value in Appendix B.
The seeded clients' credentials contain nothing the encoding changes, so the captured passing exchange, form-encoded-basic-credentials, escapes the hyphen anyway and sends the username machine%2Dclient; the server decodes it and issues a token. The failing one, basic-credentials-not-form-encoded, appends a percent sign to the real password.