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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c1d85a9e186e6f61fe473527aac3465589b12f415d30b22d05f99731c4d604bf
4
- data.tar.gz: 71a5e80bebadaa224e51f39ef59ccdb3bf263bfc375f3d9624d5c888b79c1094
3
+ metadata.gz: b1bef252c395d0a9dfbd30cb9b4e60be278d01ae09b496d97d7f8665ff273ba5
4
+ data.tar.gz: 0bfd4b2af11ca2261e399bf2c73e4710ba49de67fed16766e22ac110cac19ad9
5
5
  SHA512:
6
- metadata.gz: 1d12f9f7255e3e7728bbcbccf89593d3e3e13edc7547b9b420a985442903d91c29f708d79593b536e02619332060a18c74198ff530dac264d1048d923412bf08
7
- data.tar.gz: 35e4042dccf44ff0e1dd36fd1ef639759648d226e09fe175c7fbe477d75ac601b9fc74c2c8e6a3665a1cb9ea4288c532c48f98e53b5018714f33a13113643ae4
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
@@ -14,6 +14,6 @@
14
14
  # Cloud Foundry namespace
15
15
  module CF
16
16
  module UAA
17
- VERSION = '4.0.8'
17
+ VERSION = '4.0.9'
18
18
  end
19
19
  end
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.8
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-01-21 00:00:00.000000000 Z
14
+ date: 2025-02-19 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: json