Răsfoiți Sursa

FIX: MacCloud: the issue that when revoke token, it may need to get token first

rich2014 2 luni în urmă
părinte
comite
91f98d59f0
1 a modificat fișierele cu 2 adăugiri și 0 ștergeri
  1. 2 0
      plugins/wfx/MacCloud/src/drivers/oauth2/uoauth2auth.pas

+ 2 - 0
plugins/wfx/MacCloud/src/drivers/oauth2/uoauth2auth.pas

@@ -187,6 +187,8 @@ var
   http: TMiniHttpClient = nil;
 begin
   try
+    if NOT _token.isValidAccessToken then
+      Exit;
     http:= TMiniHttpClient.Create( _params.REVOKE_TOKEN_URI, HttpConst.Method.POST );
     self.onRevokeToken( http );
     self.setAuthHeader( http );