Commit 3658fdc
fix: client_auth: unquote clientID and secret with Basic auth
With Basic auth, clientID and secret should be URI-encoded before used
as username and password to form the Basic auth header:
https://datatracker.ietf.org/doc/html/rfc6749#section-2.3.1
Existing OpenIDConnect implementations follow the standard and encode
the clientID and secret ... and the client authentication
for the token endpoint then fails with either
`pyop.exceptions.InvalidClientAuthentication: Incorrect client_secret`
or
`pyop.exceptions.InvalidClientAuthentication: client_id '1621892763.....%2B%2F' unknown`
- when characters like '+' or '/' are used in either the clientID or secret.
This happens only for `client_secret_basic` - but not for `client_secret_post`.
Fix this by explicitly URI-decoding the clientID and secret extracted
from the Basic auth header (but only in this flow).1 parent 63b55fd commit 3658fdc
1 file changed
+2
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
3 | 4 | | |
4 | 5 | | |
5 | 6 | | |
| |||
35 | 36 | | |
36 | 37 | | |
37 | 38 | | |
38 | | - | |
| 39 | + | |
39 | 40 | | |
40 | 41 | | |
41 | 42 | | |
| |||
0 commit comments