cf-uaa-lib 3.5.0 → 3.6.0
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/scim.rb +6 -0
- data/lib/uaa/version.rb +2 -2
- data/spec/scim_spec.rb +12 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cbf0e4c510eb02fb7e828ffbe7f227c10fdc9e45
|
4
|
+
data.tar.gz: e5718846645aabe80e2ab0e4bb581e2146110ed4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 08568f7f4c4763e269e39e52768c3d738a1c3df347b7d911e63fa48158ccfdc81c53d8c69cdc2b78f19a3fab3c82b5f7f12f42ab8a5f84c3c013e3e3270d5d10
|
7
|
+
data.tar.gz: 72cc5995de5569c12f5e8a0b3a88890bef8df65b424fbccd038ec0d9c673ffaa62291f0ba39cc064b7a43f52f2c21588fd74c2a5784640b7d7514529cbcfe81a
|
data/lib/uaa/scim.rb
CHANGED
@@ -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 }
|
data/lib/uaa/version.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
#--
|
2
2
|
# Cloud Foundry
|
3
|
-
# Copyright (c) [2009-
|
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.
|
17
|
+
VERSION = "3.6.0"
|
18
18
|
end
|
19
19
|
end
|
data/spec/scim_spec.rb
CHANGED
@@ -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.
|
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-
|
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.
|
190
|
+
rubygems_version: 2.5.1
|
191
191
|
signing_key:
|
192
192
|
specification_version: 4
|
193
193
|
summary: Client library for CloudFoundry UAA
|