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

Basic authentication for web socket #77

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

biohazardious
Copy link

I added basic authentication for web socket.

Copy link

@sandeepmistry sandeepmistry left a comment

Choose a reason for hiding this comment

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

Hi @biohazardious,

First of all, many thanks for submitting this pull request!

What do you think about adding a void sendBasicAuth(const char* aUser, const char* aPassword); method like in HttpClient instead of adding a new begin(...) signatures?

It also appears some of the whitespace in your changes is not consistent with the existing code base.

@biohazardious
Copy link
Author

Hi @sandeepmistry ,

I added new begin signatures because unlike HttpClient REST methods, you should send authentication data while creating socket. That's why i modified begin function.

PS: sorry for whitespaces, it was a quick fix those was my mistake.

@sandeepmistry
Copy link

Hi @biohazardious,

Ok, got it so sendBasicAuth is not the best name. An alternative is what we have in the MQTT Cient library: https://github.com/arduino-libraries/ArduinoMqttClient/blob/master/src/MqttClient.h#L85

setUsernamePassword or setBasicAuth - this is something you would call before begin.

@CLAassistant
Copy link

CLAassistant commented Apr 9, 2021

CLA assistant check
All committers have signed the CLA.

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