pusher / pusher-websocket-dotnet

Pusher Channels Client Library for .NET
MIT License
112 stars 113 forks source link

feature:(auth) support authorisation header with HttpAuthorizer #102

Closed nros closed 3 years ago

nros commented 4 years ago

This is an improved version, based on suggestions from PR 90.

Using the HTTP authoriser to check access for private channels requires user access checks. So the HTTP endpoint needs to know which user is authorised.

HTTP provides "Authorization" header for the task to link an HTTP request to a user. Unfortunately the HTTP authoriser has not supported using such an HTTP header - until now.

The new constructor parameter allows to set an optional authorisation header to the HTTP request.

nros commented 4 years ago

Would it be acceptable if a reference to System.Net.Http would be included into project ExampleApplication? System.Net.Http is a default package. see AuthenticationHeaderValue reference

It seems as if the tests fail because the unit tests do not contain valid Pusher.com configuration data. The error message is:

The application key cannot be null or whitespace Parameter name: applicationKey

BTW - Visual Studio 2019 CE failed loading the solution. Visual Studio 2017 CE worked, though.

stale[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you'd like this issue to stay open please leave a comment indicating how this issue is affecting you. Thank you.

rh78 commented 3 years ago

Has this been fixed already / is our PR still relevant?

elverkilde commented 3 years ago

This was incorporated in #112 and released as version 2.1.0