瀏覽代碼

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 年之前
父節點
當前提交
e7b51cc625
共有 1 個文件被更改,包括 2 次插入0 次删除
  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