Azure / azure-relay-aspnetserver

ASP.NET Core Hosting for Azure Relay
Other
15 stars 30 forks source link

How can I authenticate as client to a azure relay listener via http(s) from a browser #24

Open TFTomSun opened 4 years ago

TFTomSun commented 4 years ago

I try to to host an asp.net core application on premise, make it available via an azure relay and would like to to enforce client authentication. I tried to generate a client token and append it as query parameter with the name 'sb-hc-token' in the browser, but without success.

I responses like:

{"error":{"code":"TokenMissingOrInvalid","message":"MalformedToken: The provided token does not specify the 'ExpiresOn' value. TrackingId:8a9d96d4-455d-4d79-8cb8-deea68f88bbb_G14, SystemTracker:appgates.servicebus.windows.net:testapp, Timestamp:2020-06-20T21:43:12"}}

Is it somehow possible to authenticate directly from the browser (e.g. via oauth or via token) and what needs to be done to achieve that?