crowd-auth 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/crowd-auth.rb +2 -2
- data/lib/crowd-auth/version.rb +1 -1
- metadata +1 -1
data/lib/crowd-auth.rb
CHANGED
@@ -11,9 +11,9 @@ module Crowd
|
|
11
11
|
end
|
12
12
|
|
13
13
|
def authenticate(username, password)
|
14
|
-
rest_client = RestClient::Resource.new "#{@crowd_url}
|
14
|
+
rest_client = RestClient::Resource.new "#{@crowd_url}", :user => @crowd_app_name, :password => @crowd_app_pass
|
15
15
|
|
16
|
-
resp = rest_client[@crowd_auth_uri].post "{\"value\":\"#{password}\"}", :accept => "application/json", :content_type => "application/json"
|
16
|
+
resp = rest_client["#{@crowd_auth_uri}?username=#{username}"].post "{\"value\":\"#{password}\"}", :accept => "application/json", :content_type => "application/json"
|
17
17
|
|
18
18
|
return resp
|
19
19
|
end
|
data/lib/crowd-auth/version.rb
CHANGED