Explorar o código

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

rich2014 hai 2 meses
pai
achega
91f98d59f0
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  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 );