lib/softwear/auth/standard_model.rb in softwear-lib-1.9.4 vs lib/softwear/auth/standard_model.rb in softwear-lib-1.10.1

- old
+ new

@@ -392,11 +392,11 @@ # Given a valid signin token: # Returns the authenticated user for the given token # Given an invalid signin token: # Returns false # ==================== - def auth(token) - response = validate_response query "auth #{Figaro.env.hub_app_name} #{token}" + def auth(token, app_name = nil) + response = validate_response query "auth #{app_name || Figaro.env.hub_app_name} #{token}" return false unless response =~ /^yes .+$/ _yes, json = response.split(' ', 2) object = new(JSON.parse(json))