TsgcWebSocketClientProperties › Authentication

Authentication Property

Configures the credentials and scheme used to authenticate the WebSocket handshake.

Syntax

public TsgcWSAuthenticationClient_Options Authentication { get; set; }

Default Value

Enabled=False

Remarks

Set Authentication.Enabled to True and choose one of four schemes: Basic (HTTP Basic header), Token (bearer token header, optionally populated by an attached OAuth2 component), Session (HTTP login that returns a session id included in the handshake GET) and URL (user and password appended to the handshake GET). Assign User/Password or Token.AuthToken and enable exactly one of the four schemes.

Example


oClient = new TsgcWebSocketClient();
oClient.Authentication.Enabled = true;
oClient.Authentication.Basic.Enabled = true;
oClient.Authentication.User = "your user";
oClient.Authentication.Password = "your password";
oClient.Active = true;

Back to Properties