pusher icon indicating copy to clipboard operation
pusher copied to clipboard

add support for authenticating users

Open agerlic opened this issue 11 years ago • 3 comments
trafficstars

Proposition to add user authentication based on http://pusher.com/docs/auth_signatures for issue #2

Maybe AuthenticateUser method could be added to Channel instead of Client like the pusher ruby gem (https://github.com/pusher/pusher-gem/blob/master/lib/pusher/channel.rb#L139).

agerlic avatar Jan 05 '14 00:01 agerlic

I would rename AuthenticateUser to Authenticate and add it to channel. Since it requires channel name as the first arg, it makes more sense on channel to me. I also would like to see this library line up closely with the pusher ruby gem as I have found it to be pleasant to work with in the past.

jnunemaker avatar Jan 05 '14 14:01 jnunemaker

We will probably have to pass an instance of the client to the channel then, so we have the key/secret and a way to make other client requests, but that seems fine.

jnunemaker avatar Jan 05 '14 14:01 jnunemaker

I've renamed and added the Authenticate method to Channel.

I've created a new example file channelAuthenticate, which loads pusher package locally instead of git repo, I guess it could help to fix examples.

agerlic avatar Jan 05 '14 17:01 agerlic