Hi All,
When using the TscHubConnection, how can i pass the required access token (jwt) used for authentication?
Tia, Rj
signalr bearer token authentication
Re: signalr bearer token authentication
For authorization using Bearer Token, we do not have a separate property, therefore, to use it, you should also use the ScHubConnection.HttpConnectionOptions.Headers property. You can use the ScHubConnection1.HttpConnectionOptions.Headers.Add method to set the required values.
For example:
For example:
Code: Select all
ScHubConnection.HttpConnectionOptions.Headers.Add('Authorization', 'Bearer AbCdEf123456'); //The string "AbCdEf123456" in the example above is the bearer authorization token.