Skip to content
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

Send Basic Auth credentials in an Authorization header #208

Merged
merged 4 commits into from
Jul 24, 2019

Conversation

RudraniW
Copy link
Contributor

The username and password are currently sent as a part of the url. This can be a challenge
if the url need to be percent encoded. The username and password also need to be percent
encoded then. It is easier to send username and password in the Authorization header. Note that
this will change the behaviour of ClientRequent.url.

This is for #178 . It is a breaking change.

Rudrani added 2 commits June 14, 2019 15:28
The username and password are currently sent as a part of the url. This can be a challenge
if the url need to be percent encoded. The username and password also need to be percent
encoded then. It is easier to send username and password in the Authorization header. Note that
this will change the behaviour of `ClientRequent.url`.
@@ -269,12 +269,12 @@ public class ClientRequest {
}
self.path = fullPath

if let username = url.user {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We must retain this code. The username and password will continue to be accessible using the userName and password properties. They only won't be included in the url property.

@pushkarnk pushkarnk merged commit ee75eeb into Kitura:master Jul 24, 2019
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.

3 participants