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

Namespace Authorization #1887

Closed
jamlfy opened this issue Nov 24, 2014 · 5 comments
Closed

Namespace Authorization #1887

jamlfy opened this issue Nov 24, 2014 · 5 comments
Labels
documentation Improvements or additions to documentation

Comments

@jamlfy
Copy link

jamlfy commented Nov 24, 2014

Doc, say

var nsp = io.of('/my-namespace');
nsp.authorization(function(data){

});
nsp.on('conection', function(socket){
...
});

But .... does not work and documentation are bad, and the function does not exist!

@rase-
Copy link
Contributor

rase- commented Nov 24, 2014

With the latest version of socket.io? The wiki is not the source of up to date information, as it says on the front page of the wiki. Check out this piece of documentation.

@jamlfy
Copy link
Author

jamlfy commented Nov 24, 2014

say this

var nsp =  io.of('/my-namespace');
nsp.use(function(socket, next){
...
});

Well ... does not work

@peteruithoven
Copy link

It does, how do you know it doesn't work?

There is one related issue, maybe that has got you confused? #1888

@jamlfy
Copy link
Author

jamlfy commented Nov 24, 2014

Well ... I tried and testing....

@peteruithoven
Copy link

But just saying that it doesn't work isn't very productive, nobody can guess what goes wrong that way. So please elaborate. Wasn't your middleware function called? Was the client allowed in the namespace anyway? How could you tell? Didn't you get an error where you expected it?

@nkzawa nkzawa closed this as completed Dec 25, 2014
@nkzawa nkzawa added documentation Improvements or additions to documentation Namespaces labels Dec 25, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

5 participants
@peteruithoven @nkzawa @rase- @jamlfy and others