Permalink
Browse files

login function now uses POST instead of GET

  • Loading branch information...
theganyo committed Feb 22, 2013
1 parent f9b3d11 commit 6bf1f3b5418dffa7753e3ecc4a17a6fef7ca73af
Showing with 6 additions and 3 deletions.
  1. +4 −0 README.md
  2. +1 −2 lib/usergrid/core/resource.rb
  3. +1 −1 lib/usergrid/version.rb
View
@@ -181,6 +181,10 @@ usergrid_iron/spec/spec_settings.yaml to match.)
## Release notes
+### 0.0.10
+* Backend changes
+ 1. login function now uses POST instead of GET
+
### 0.0.9
* Backend changes
1. made Resource::response accessor public to support ugc
@@ -19,8 +19,7 @@ def initialize(resource_url=DEFAULT_API_URL, api_url=nil, options={}, response=n
# gets user token and automatically set auth header for future requests
# precondition: resource must already be set to the correct context (application or management)
def login(username, password)
- params = { grant_type: "password", username: username, password: password }
- response = self['token'].get({ params: params })
+ response = self['token'].post grant_type: 'password', username: username, password: password
self.auth_token = response.data['access_token']
user_uuid = response.data['user']['uuid']
@current_user = self["/users/#{user_uuid}"].get.entity
View
@@ -1,3 +1,3 @@
module Usergrid
- VERSION = '0.0.9'
+ VERSION = '0.0.10'
end

0 comments on commit 6bf1f3b

Please sign in to comment.