OAuth2 授权
sgcWebSockets 中的 OAuth 2.0 授权框架支持,为 Web、桌面和移动应用程序提供安全的委托访问。
sgcWebSockets 中的 OAuth 2.0 授权框架支持,为 Web、桌面和移动应用程序提供安全的委托访问。
uses
sgcHTTP_OAuth2_Client;
var
OAuth: TsgcHTTPOAuth2Client;
begin
OAuth := TsgcHTTPOAuth2Client.Create(nil);
OAuth.OAuth2Options.ClientId := 'your-client-id';
OAuth.OAuth2Options.ClientSecret := 'your-secret';
OAuth.OAuth2Options.AuthorizationEndpoint :=
'https://auth.example.com/authorize';
OAuth.OAuth2Options.TokenEndpoint :=
'https://auth.example.com/token';
OAuth.Start;
end;