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

Authentication #16

Closed
bpolaszek opened this issue Sep 17, 2020 · 1 comment
Closed

Authentication #16

bpolaszek opened this issue Sep 17, 2020 · 1 comment
Labels
question Further information is requested

Comments

@bpolaszek
Copy link

Hello there! I didn't figure out how I could set an Authorization header, when connecting to a restricted event source.

Is it something possible?

Thank you!
Ben

@clue clue added the question Further information is requested label Sep 18, 2020
@clue
Copy link
Owner

clue commented Sep 18, 2020

@bpolaszek Thanks for this excellent question!

This project supports HTTP basic authentication when you include your login credentials in the EventSource URL like this:

$stream = new Clue\React\EventSource\EventSource('https://user:pass@example.com/', $loop);

Additionally, there are plans to support setting arbitrary request headers as per #10. Join in the conversation if you feel this helps with your use case 👍

I believe this has been answered, so I'm closing this for now. Please come back with more details if this problem persists and we can reopen this 👍

@clue clue closed this as completed Sep 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants