authlete 1.2.0 → 1.3.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/authlete/model/client.rb +7 -2
- data/lib/authlete/model/service.rb +7 -2
- data/lib/authlete/version.rb +1 -1
- data/test/authlete/model/test_client-extension.rb +0 -2
- data/test/authlete/model/test_client.rb +10 -2
- data/test/authlete/model/test_named-uri.rb +0 -2
- data/test/authlete/model/test_pair.rb +0 -2
- data/test/authlete/model/test_property.rb +0 -2
- data/test/authlete/model/test_scope.rb +1 -3
- data/test/authlete/model/test_service.rb +10 -4
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e0b0558488bf3a4a4265e05d2d1d015de18a1476
|
4
|
+
data.tar.gz: c6493cf2652ebaf784c3251940fc6ec8ed5812f5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2c7efb96bedc54703dffda85a82ac39898a11c99d36adf0d4c62e008bd8d5f2c0c5bedcba65273c9aef9aafb524ca39d9d26d759c1e20043053fdad63327bd5c
|
7
|
+
data.tar.gz: a475cbdfd0f88572cd7b26d27c0728f2fc9e757930318151da7523974b3eb08959975b06857b209e64c29c909e443ca15452c731dc1d3639f175a8bc328695e0
|
@@ -287,6 +287,8 @@ module Authlete
|
|
287
287
|
alias_method :request_object_required, :requestObjectRequired
|
288
288
|
alias_method :request_object_required=, :requestObjectRequired=
|
289
289
|
|
290
|
+
attr_accessor :attributes
|
291
|
+
|
290
292
|
private
|
291
293
|
|
292
294
|
def defaults
|
@@ -360,7 +362,8 @@ module Authlete
|
|
360
362
|
registrationAccessTokenHash: nil,
|
361
363
|
authorizationDataTypes: nil,
|
362
364
|
parRequired: false,
|
363
|
-
requestObjectRequired: false
|
365
|
+
requestObjectRequired: false,
|
366
|
+
attributes: nil
|
364
367
|
}
|
365
368
|
end
|
366
369
|
|
@@ -435,13 +438,15 @@ module Authlete
|
|
435
438
|
@authorizationDataTypes = hash[:authorizationDataTypes]
|
436
439
|
@parRequired = hash[:parRequired]
|
437
440
|
@requestObjectRequired = hash[:requestObjectRequired]
|
441
|
+
@attributes = get_parsed_array(hash[:attributes]) { |e| Authlete::Model::Pair.parse(e) }
|
438
442
|
end
|
439
443
|
|
440
444
|
def to_hash_value(key, var)
|
441
445
|
raw_val = instance_variable_get(var)
|
442
446
|
|
443
447
|
case key
|
444
|
-
when :clientNames, :logoUris, :clientUris, :policyUris, :tosUris,
|
448
|
+
when :clientNames, :logoUris, :clientUris, :policyUris, :tosUris,
|
449
|
+
:descriptions, :attributes
|
445
450
|
raw_val&.map { |e| e.to_hash }
|
446
451
|
when :extension
|
447
452
|
raw_val&.to_hash
|
@@ -435,6 +435,8 @@ module Authlete
|
|
435
435
|
alias_method :iss_suppressed, :issSuppressed
|
436
436
|
alias_method :iss_suppressed=, :issSuppressed=
|
437
437
|
|
438
|
+
attr_accessor :attributes
|
439
|
+
|
438
440
|
private
|
439
441
|
|
440
442
|
def defaults
|
@@ -544,7 +546,8 @@ module Authlete
|
|
544
546
|
claimShortcutRestrictive: false,
|
545
547
|
scopeRequired: false,
|
546
548
|
nbfOptional: false,
|
547
|
-
issSuppressed: false
|
549
|
+
issSuppressed: false,
|
550
|
+
attributes: nil
|
548
551
|
}
|
549
552
|
end
|
550
553
|
|
@@ -655,13 +658,15 @@ module Authlete
|
|
655
658
|
@scopeRequired = hash[:scopeRequired]
|
656
659
|
@nbfOptional = hash[:nbfOptional]
|
657
660
|
@issSuppressed = hash[:issSuppressed]
|
661
|
+
@attributes = get_parsed_array(hash[:attributes]) { |e| Authlete::Model::Pair.parse(e) }
|
658
662
|
end
|
659
663
|
|
660
664
|
def to_hash_value(key, var)
|
661
665
|
raw_val = instance_variable_get(var)
|
662
666
|
|
663
667
|
case key
|
664
|
-
when :snsCredentials, :developerSnsCredentials, :supportedScopes,
|
668
|
+
when :snsCredentials, :developerSnsCredentials, :supportedScopes,
|
669
|
+
:metadata, :mtlsEndpointAliases, :attributes
|
665
670
|
raw_val&.map { |e| e.to_hash }
|
666
671
|
else
|
667
672
|
raw_val
|
data/lib/authlete/version.rb
CHANGED
@@ -112,6 +112,9 @@ class ClientTest < Minitest::Test
|
|
112
112
|
AUTHORIZATION_DATA_TYPES = [ '<authorization-data-type0>', '<authorization-data-type1>' ]
|
113
113
|
PAR_REQUIRED = false
|
114
114
|
REQUEST_OBJECT_REQUIRED = true
|
115
|
+
ATTRIBUTE_KEY = '<attribute0-key>'
|
116
|
+
ATTRIBUTE_VALUE = '<attribute0-value>'
|
117
|
+
ATTRIBUTES = [ Authlete::Model::Pair.new(key: ATTRIBUTE_KEY, value: ATTRIBUTE_VALUE) ]
|
115
118
|
|
116
119
|
|
117
120
|
def generate_json
|
@@ -191,7 +194,8 @@ class ClientTest < Minitest::Test
|
|
191
194
|
"registrationAccessTokenHash": "<registration-access-token-hash>",
|
192
195
|
"authorizationDataTypes": [ "<authorization-data-type0>", "<authorization-data-type1>" ],
|
193
196
|
"parRequired": false,
|
194
|
-
"requestObjectRequired": true
|
197
|
+
"requestObjectRequired": true,
|
198
|
+
"attributes": [{ "key": "<attribute0-key>", "value": "<attribute0-value>" }]
|
195
199
|
}
|
196
200
|
JSON
|
197
201
|
end
|
@@ -273,7 +277,8 @@ class ClientTest < Minitest::Test
|
|
273
277
|
registrationAccessTokenHash: '<registration-access-token-hash>',
|
274
278
|
authorizationDataTypes: [ '<authorization-data-type0>', '<authorization-data-type1>' ],
|
275
279
|
parRequired: false,
|
276
|
-
requestObjectRequired: true
|
280
|
+
requestObjectRequired: true,
|
281
|
+
attributes: [{ key: '<attribute0-key>', value: '<attribute0-value>' }]
|
277
282
|
}
|
278
283
|
end
|
279
284
|
|
@@ -349,6 +354,7 @@ class ClientTest < Minitest::Test
|
|
349
354
|
obj.authorization_data_types = AUTHORIZATION_DATA_TYPES
|
350
355
|
obj.par_required = PAR_REQUIRED
|
351
356
|
obj.request_object_required = REQUEST_OBJECT_REQUIRED
|
357
|
+
obj.attributes = ATTRIBUTES
|
352
358
|
end
|
353
359
|
|
354
360
|
|
@@ -430,6 +436,8 @@ class ClientTest < Minitest::Test
|
|
430
436
|
assert_equal AUTHORIZATION_DATA_TYPES, obj.authorizationDataTypes
|
431
437
|
assert_equal PAR_REQUIRED, obj.parRequired
|
432
438
|
assert_equal REQUEST_OBJECT_REQUIRED, obj.requestObjectRequired
|
439
|
+
assert_equal ATTRIBUTE_KEY, obj.attributes[0].key
|
440
|
+
assert_equal ATTRIBUTE_VALUE, obj.attributes[0].value
|
433
441
|
end
|
434
442
|
|
435
443
|
|
@@ -62,8 +62,6 @@ class ScopeTest < Minitest::Test
|
|
62
62
|
obj.description = DESCRIPTION
|
63
63
|
obj.descriptions = DESCRIPTIONS
|
64
64
|
obj.attributes = ATTRIBUTES
|
65
|
-
|
66
|
-
obj
|
67
65
|
end
|
68
66
|
|
69
67
|
|
@@ -97,7 +95,7 @@ class ScopeTest < Minitest::Test
|
|
97
95
|
|
98
96
|
def test_to_hash
|
99
97
|
obj = Authlete::Model::Scope.new
|
100
|
-
|
98
|
+
set_params(obj)
|
101
99
|
actual = obj.to_hash
|
102
100
|
expected = generate_hash
|
103
101
|
|
@@ -139,6 +139,9 @@ class ServiceTest < Minitest::Test
|
|
139
139
|
SCOPE_REQUIRED = true
|
140
140
|
NBF_OPTIONAL = true
|
141
141
|
ISS_SUPPRESSED = false
|
142
|
+
ATTRIBUTE_KEY = '<attribute0-key>'
|
143
|
+
ATTRIBUTE_VALUE = '<attribute0-value>'
|
144
|
+
ATTRIBUTES = [ Authlete::Model::Pair.new(key: ATTRIBUTE_KEY, value: ATTRIBUTE_VALUE) ]
|
142
145
|
|
143
146
|
|
144
147
|
def generate_json
|
@@ -249,7 +252,8 @@ class ServiceTest < Minitest::Test
|
|
249
252
|
"claimShortcutRestrictive": false,
|
250
253
|
"scopeRequired": true,
|
251
254
|
"nbfOptional": true,
|
252
|
-
"issSuppressed": false
|
255
|
+
"issSuppressed": false,
|
256
|
+
"attributes": [{ "key": "<attribute0-key>", "value": "<attribute0-value>" }]
|
253
257
|
}
|
254
258
|
JSON
|
255
259
|
end
|
@@ -362,7 +366,8 @@ class ServiceTest < Minitest::Test
|
|
362
366
|
claimShortcutRestrictive: false,
|
363
367
|
scopeRequired: true,
|
364
368
|
nbfOptional: true,
|
365
|
-
issSuppressed: false
|
369
|
+
issSuppressed: false,
|
370
|
+
attributes: [{ key: '<attribute0-key>', value: '<attribute0-value>' }]
|
366
371
|
}
|
367
372
|
end
|
368
373
|
|
@@ -474,8 +479,7 @@ class ServiceTest < Minitest::Test
|
|
474
479
|
obj.scope_required = SCOPE_REQUIRED
|
475
480
|
obj.nbf_optional = NBF_OPTIONAL
|
476
481
|
obj.iss_suppressed = ISS_SUPPRESSED
|
477
|
-
|
478
|
-
obj
|
482
|
+
obj.attributes = ATTRIBUTES
|
479
483
|
end
|
480
484
|
|
481
485
|
|
@@ -593,6 +597,8 @@ class ServiceTest < Minitest::Test
|
|
593
597
|
assert_equal SCOPE_REQUIRED, obj.scopeRequired
|
594
598
|
assert_equal NBF_OPTIONAL, obj.nbfOptional
|
595
599
|
assert_equal ISS_SUPPRESSED, obj.issSuppressed
|
600
|
+
assert_equal ATTRIBUTE_KEY, obj.attributes[0].key
|
601
|
+
assert_equal ATTRIBUTE_VALUE, obj.attributes[0].value
|
596
602
|
end
|
597
603
|
|
598
604
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: authlete
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Takahiko Kawasaki
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2021-
|
12
|
+
date: 2021-02-24 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rest-client
|