首页 > 解决方案 > Delphi OAuth 1.0a “单腿”身份验证

问题描述

我想知道是否有人知道如何在delphi中提出这种类型的请求,我已经在互联网上查看了很多关于如何做到这一点的信息,但我找不到任何东西,托运人的本机组件无法使用这种要求!

有人来帮忙!!!!!!

OAuth1Authenticator1.ConsumerKey := ConsumerKey;
OAuth1Authenticator1.ConsumerSecret := ConsumerSecret;
OAuth1Authenticator1.SigningClassName := 'TOAuth1SignatureMethod_HMAC_SHA1';
RESTClient1.Authenticator := OAuth1Authenticator1;
RESTClient1.BaseURL := 'http://myUrl/wp-json/wc/v3';
RESTRequest1.Resource := 'orders';
RESTRequest1.Method := TRESTRequestMethod.rmGET;
RESTRequest1.Execute;

if assigned(RESTResponse1.JSONValue) then
 begin
   Memo1.Lines.Text := TJson.Format(RESTResponse1.JSONValue)
 end
 else
 begin
  Memo1.Lines.Add(RESTResponse1.Content);
  end;

标签: restdelphioauth

解决方案


推荐阅读