TsgcWebSocketClient › Properties › Authentication
Configures the credentials and scheme used to authenticate the WebSocket handshake.
property Authentication: TsgcWSAuthenticationClient_Options read FAuthentication write SetAuthentication;
Enabled=False
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.
oClient := TsgcWebSocketClient.Create(nil);
oClient.Authentication.Enabled := true;
oClient.Authentication.Basic.Enabled := true;
oClient.Authentication.User := 'your user';
oClient.Authentication.Password := 'your password';
oClient.Active := True;