-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use UTF-8 encoding for client basic auth if requested #5845
Comments
sbordet
added a commit
that referenced
this issue
Dec 29, 2020
* Introduced get/setCharset in BasicAuthenticator on server-side. * Looking for the "charset" parameter on the client-side, and if there, use it. * Added test case. * Code cleanups. Signed-off-by: Simone Bordet <[email protected]>
@mperktold can you try branch |
@sbordet works fine, thanks! 👍 |
sbordet
added a commit
that referenced
this issue
Dec 30, 2020
Don't use unicode sequences to please CheckStyle. Signed-off-by: Simone Bordet <[email protected]>
sbordet
added a commit
that referenced
this issue
Dec 30, 2020
Disable CheckStyle check so that the unicode sequence in the test matches that in realm.properties. Signed-off-by: Simone Bordet <[email protected]>
This was referenced Mar 10, 2021
Closed
This was referenced Mar 10, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Jetty version: 9.4.35.v20201120
Java version: AdoptOpenJDK 11.0.9
OS type/version: Windows 10 64 bit
Description
When using the
HttpClient
with basic authentication, Jetty always encodes the credentials using ISO 8859:https://github.com/eclipse/jetty.project/blob/cbdfaaa335904a7ecc2a7b20208de00f798a5e04/jetty-client/src/main/java/org/eclipse/jetty/client/util/BasicAuthentication.java#L89
While this is fine for a default charset, servers can use a special
charset
parameter of theWWW-Authenticate
header to tell the client to encode the credentials using UTF-8, as specified here: https://tools.ietf.org/html/rfc7617#section-2.1For being able to connect to servers that expect UTF-8, Jetty should honor the
charset
parameter.Additionally, it should be possible to specify UTF-8 encoding when authenticating preemptively, e.g. by passing a
Charset
to the constructor ofBasicResult
.The text was updated successfully, but these errors were encountered: