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

Checking hook.params.headers.authorization #552

Closed
ramosquito5 opened this Issue Aug 4, 2017 · 1 comment

Comments

Projects
None yet
3 participants
@ramosquito5
Copy link

ramosquito5 commented Aug 4, 2017

Steps to reproduce

When authenticating with rest I check if the client is sending his jwt, and as such I check
hook.params.headers.authorization

When authenticating with socket.io I tried to do the same.

Expected behavior

checking hook.params.headers.authorization would have the jwt.

Actual behavior

hook.params.headers.authorization is undefined, the jwt is under hook.params.headers.Authorization note the A of authorization.
I modified my code to make it work but i think it should be the same for all cases that have the authentication

System configuration

feathers --version
2.1.1

@marshallswain

This comment has been minimized.

Copy link
Member

marshallswain commented Aug 5, 2017

This is the correct behavior. Authentication over socket.io and primus doesn't happen with headers. It works by sending messages to authenticate. You can see the code here: https://github.com/feathersjs/feathers-authentication/blob/master/src/socket/handler.js#L150.

Let me know if you're interested in making header support work.

@daffl daffl closed this Aug 8, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.