cf-uaa-lib 3.5.0 → 3.6.0

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: dbe6ea6062d205c929b98f06cf3cd02356b6d9b8
4
- data.tar.gz: 5f57643c8e7dc8993de4d08603674b758bd54118
3
+ metadata.gz: cbf0e4c510eb02fb7e828ffbe7f227c10fdc9e45
4
+ data.tar.gz: e5718846645aabe80e2ab0e4bb581e2146110ed4
5
5
  SHA512:
6
- metadata.gz: c4bc0c8fc0767ea6aa5ae255f3a51e2ed0b0d5aad5e5a2fb4f7fef71a9f53ae2b08688e0042221a68168337ebceb4a5b751d0c407a335162d67ade14a03644d8
7
- data.tar.gz: ce106ed5356cc816412ca39fa06693d71c6a29cc21c52e307f66992145b656b8fcb94cef97ffb3a1551cda97dc669041e38338957ac7484a6a8389a21e8e774e
6
+ metadata.gz: 08568f7f4c4763e269e39e52768c3d738a1c3df347b7d911e63fa48158ccfdc81c53d8c69cdc2b78f19a3fab3c82b5f7f12f42ab8a5f84c3c013e3e3270d5d10
7
+ data.tar.gz: 72cc5995de5569c12f5e8a0b3a88890bef8df65b424fbccd038ec0d9c673ffaa62291f0ba39cc064b7a43f52f2c21588fd74c2a5784640b7d7514529cbcfe81a
@@ -315,6 +315,12 @@ class Scim
315
315
  "#{type_info(:client, :path)}/#{URI.encode(client_id)}/secret", req, headers))
316
316
  end
317
317
 
318
+ def unlock_user(user_id)
319
+ req = {"locked" => false}
320
+ json_parse_reply(@key_style, *json_patch(@target,
321
+ "#{type_info(:user, :path)}/#{URI.encode(user_id)}/status", req, headers))
322
+ end
323
+
318
324
  def map_group(group, is_id, external_group, origin = "ldap")
319
325
  key_name = is_id ? :groupId : :displayName
320
326
  request = {key_name => group, :externalGroup => external_group, :schemas => ["urn:scim:schemas:core:1.0"], :origin => origin }
@@ -1,6 +1,6 @@
1
1
  #--
2
2
  # Cloud Foundry
3
- # Copyright (c) [2009-2014] Pivotal Software, Inc. All Rights Reserved.
3
+ # Copyright (c) [2009-2016] Pivotal Software, Inc. All Rights Reserved.
4
4
  #
5
5
  # This product is licensed to you under the Apache License, Version 2.0 (the "License").
6
6
  # You may not use this product except in compliance with the License.
@@ -14,6 +14,6 @@
14
14
  # Cloud Foundry namespace
15
15
  module CF
16
16
  module UAA
17
- VERSION = "3.5.0"
17
+ VERSION = "3.6.0"
18
18
  end
19
19
  end
@@ -152,6 +152,18 @@ describe Scim do
152
152
  result['id'].should == "id12345"
153
153
  end
154
154
 
155
+ it "unlocks a user" do
156
+ subject.set_request_handler do |url, method, body, headers|
157
+ url.should == "#{@target}/Users/id12345/status"
158
+ method.should == :patch
159
+ check_headers(headers, :json, :json, nil)
160
+ body.should include('"locked":false')
161
+ [200, '{"locked":false}', {"content-type" => "application/json"}]
162
+ end
163
+ result = subject.unlock_user("id12345")
164
+ result['locked'].should == false
165
+ end
166
+
155
167
  it "adds a mapping from uaa groups to external group" do
156
168
  subject.set_request_handler do |url, method, body, headers|
157
169
  url.should == "#{@target}/Groups/External"
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.5.0
4
+ version: 3.6.0
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: 2016-06-22 00:00:00.000000000 Z
15
+ date: 2016-08-11 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: multi_json
@@ -187,7 +187,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
187
187
  version: '0'
188
188
  requirements: []
189
189
  rubyforge_project: cf-uaa-lib
190
- rubygems_version: 2.4.6
190
+ rubygems_version: 2.5.1
191
191
  signing_key:
192
192
  specification_version: 4
193
193
  summary: Client library for CloudFoundry UAA