cf-uaa-lib 3.2.2 → 3.2.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7b3ea05370cef75d64d56289aa9982940163b3f1
4
- data.tar.gz: 8d1dcc1c49e158cd81dba4d7fee1945ddad2d225
3
+ metadata.gz: 35d3170905100aa7d8173c6872eda69152cfa2f2
4
+ data.tar.gz: c17587b9299da1daf876632e70f0b41cba3ff257
5
5
  SHA512:
6
- metadata.gz: 7d024dff0e8e69b58496114f123ae34b6b2e98c5e7b87271649845fd53882b8c5a60d08594606f346f14138e1210d3d728aeef86f326ba8dd4f33863ad58de63
7
- data.tar.gz: 0a82cd85f27a2546052c914d9e4c70748b55600b48a1880de840a5a483ce7a2b57c03b52c65db8a4a950c558965441c65dfaa3e77ced383c68a31d578d77d2aa
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
@@ -14,6 +14,6 @@
14
14
  # Cloud Foundry namespace
15
15
  module CF
16
16
  module UAA
17
- VERSION = "3.2.2"
17
+ VERSION = "3.2.3"
18
18
  end
19
19
  end
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.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-07-02 00:00:00.000000000 Z
15
+ date: 2015-08-28 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: multi_json