Sfoglia il codice sorgente

when you set site= in ActiveResource::Base, it parses out the password and username out of that and sets it internally. so when we clear the session here, we should also clear those flags, otherwise you end up with unexpected authentication headers down the line

Oren Mazor 8 anni fa
parent
commit
e7b51cc625
1 ha cambiato i file con 2 aggiunte e 0 eliminazioni
  1. 2 0
      lib/shopify_api/resources/base.rb

+ 2 - 0
lib/shopify_api/resources/base.rb

@@ -58,6 +58,8 @@ module ShopifyAPI
 
       def clear_session
         self.site = nil
+        self.password = nil
+        self.user = nil
         self.headers.delete('X-Shopify-Access-Token')
       end