cf-uaa-lib 4.0.8 → 4.0.9
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 +7 -1
- data/lib/uaa/version.rb +1 -1
- data/spec/scim_spec.rb +12 -0
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b1bef252c395d0a9dfbd30cb9b4e60be278d01ae09b496d97d7f8665ff273ba5
|
|
4
|
+
data.tar.gz: 0bfd4b2af11ca2261e399bf2c73e4710ba49de67fed16766e22ac110cac19ad9
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c7ebce508854b456f17ca0980cbaa10326cc472c81008d0956d5c70401bd671a17a959ab41e6e3d1a4829819985daa9076f4a627c399726249fad9104aa9c787
|
|
7
|
+
data.tar.gz: 0d2a4528589995a7e5b9cf4badef1e8612232fdc07fa1af02bc5ee8d7211ad2e94489af2332f2a4e7271ea0d2bb0e8000361d6f8a446596c070618cc7e8974c9
|
data/lib/uaa/scim.rb
CHANGED
|
@@ -380,13 +380,19 @@ class Scim
|
|
|
380
380
|
# @param [String] jwks the JSON Web Key Set
|
|
381
381
|
# @param [String] kid If changeMode is DELETE provide the id of key
|
|
382
382
|
# @param [String] changeMode Change mode, possible is ADD, UPDATE, DELETE
|
|
383
|
+
# @param [String] iss Issuer in case of federation JWT trust
|
|
384
|
+
# @param [String] sub Subject in case of federation JWT trust
|
|
385
|
+
# @param [String] aud Audience in case of federation JWT trust
|
|
383
386
|
# @return [Hash] success message from server
|
|
384
|
-
def change_clientjwt(client_id, jwks_uri = nil, jwks = nil, kid = nil, changeMode = nil)
|
|
387
|
+
def change_clientjwt(client_id, jwks_uri = nil, jwks = nil, kid = nil, changeMode = nil, iss = nil, sub = nil, aud = nil)
|
|
385
388
|
req = {"client_id" => client_id }
|
|
386
389
|
req["jwks_uri"] = jwks_uri if jwks_uri
|
|
387
390
|
req["jwks"] = jwks if jwks
|
|
388
391
|
req["kid"] = kid if kid
|
|
389
392
|
req["changeMode"] = changeMode if changeMode
|
|
393
|
+
req["iss"] = iss if iss
|
|
394
|
+
req["sub"] = sub if sub
|
|
395
|
+
req["aud"] = aud if aud
|
|
390
396
|
json_parse_reply(@key_style, *json_put(@target,
|
|
391
397
|
"#{type_info(:client, :path)}/#{Addressable::URI.encode(client_id)}/clientjwt", req, headers))
|
|
392
398
|
end
|
data/lib/uaa/version.rb
CHANGED
data/spec/scim_spec.rb
CHANGED
|
@@ -184,6 +184,18 @@ describe Scim do
|
|
|
184
184
|
result['id'].should == 'id12345'
|
|
185
185
|
end
|
|
186
186
|
|
|
187
|
+
it "add federated client's jwt trust using issuer, subject and audience" do
|
|
188
|
+
subject.set_request_handler do |url, method, body, headers|
|
|
189
|
+
url.should == "#{@target}/oauth/clients/id12345/clientjwt"
|
|
190
|
+
method.should == :put
|
|
191
|
+
check_headers(headers, :json, :json, nil)
|
|
192
|
+
body.should include('"iss":"issuer"', '"sub":"subject"', '"aud":"audience"')
|
|
193
|
+
[200, '{"id":"id12345"}', {'content-type' => 'application/json'}]
|
|
194
|
+
end
|
|
195
|
+
result = subject.change_clientjwt('id12345', jwks_uri=nil, jwks=nil, kid=nil, changemod='ADD', iss='issuer', sub='subject', aud='audience')
|
|
196
|
+
result['id'].should == 'id12345'
|
|
197
|
+
end
|
|
198
|
+
|
|
187
199
|
it 'unlocks a user' do
|
|
188
200
|
subject.set_request_handler do |url, method, body, headers|
|
|
189
201
|
url.should == "#{@target}/Users/id12345/status"
|
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: 4.0.
|
|
4
|
+
version: 4.0.9
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Dave Syer
|
|
@@ -11,7 +11,7 @@ authors:
|
|
|
11
11
|
- Luke Taylor
|
|
12
12
|
bindir: bin
|
|
13
13
|
cert_chain: []
|
|
14
|
-
date: 2025-
|
|
14
|
+
date: 2025-02-19 00:00:00.000000000 Z
|
|
15
15
|
dependencies:
|
|
16
16
|
- !ruby/object:Gem::Dependency
|
|
17
17
|
name: json
|