cf-uaa-lib 3.2.2 → 3.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/uaa/http.rb +1 -1
- data/lib/uaa/version.rb +1 -1
- data/spec/scim_spec.rb +10 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 35d3170905100aa7d8173c6872eda69152cfa2f2
|
4
|
+
data.tar.gz: c17587b9299da1daf876632e70f0b41cba3ff257
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5713ce58de47d5132a6d6c3698f236891b8822d492d4752a5e5ad7fcf5fe2e20e03361cceb669cc9a467eb37105c6a8a028398276fb663233879dfbc5c64de11
|
7
|
+
data.tar.gz: 82cf478b0291782c8650988cbc49dc392a17e697b96817ca1cedab4728b10107d2c915c176d6d0d278bad8f18a84208f70da8646324d780553bc52a737ae9f06
|
data/lib/uaa/http.rb
CHANGED
@@ -106,7 +106,7 @@ module Http
|
|
106
106
|
|
107
107
|
def json_parse_reply(style, status, body, headers)
|
108
108
|
raise ArgumentError unless style.nil? || style.is_a?(Symbol)
|
109
|
-
unless [200, 201, 204, 400, 401, 403, 409].include? status
|
109
|
+
unless [200, 201, 204, 400, 401, 403, 409, 422].include? status
|
110
110
|
raise (status == 404 ? NotFound : BadResponse), "invalid status response: #{status}"
|
111
111
|
end
|
112
112
|
if body && !body.empty? && (status == 204 || headers.nil? ||
|
data/lib/uaa/version.rb
CHANGED
data/spec/scim_spec.rb
CHANGED
@@ -129,6 +129,16 @@ describe Scim do
|
|
129
129
|
result['id'].should == "id12345"
|
130
130
|
end
|
131
131
|
|
132
|
+
it "tries to change the user's password to be the same as the old one" do
|
133
|
+
subject.set_request_handler do |url, method, body, headers|
|
134
|
+
url.should == "#{@target}/Users/id12345/password"
|
135
|
+
method.should == :put
|
136
|
+
check_headers(headers, :json, :json)
|
137
|
+
[400, '{"error":"invalid_password","message":"Your new password cannot be the same as the old password."}', {"content-type" => "application/json"}]
|
138
|
+
end
|
139
|
+
expect {subject.change_password("id12345", "oldpwd", "oldpwd")}.to raise_error(error=TargetError)
|
140
|
+
end
|
141
|
+
|
132
142
|
it "changes a client's secret" do
|
133
143
|
subject.set_request_handler do |url, method, body, headers|
|
134
144
|
url.should == "#{@target}/oauth/clients/id12345/secret"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cf-uaa-lib
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.2.
|
4
|
+
version: 3.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dave Syer
|
@@ -12,7 +12,7 @@ authors:
|
|
12
12
|
autorequire:
|
13
13
|
bindir: bin
|
14
14
|
cert_chain: []
|
15
|
-
date: 2015-
|
15
|
+
date: 2015-08-28 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
name: multi_json
|