authlete 1.6.0 → 1.10.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/authlete.gemspec +2 -2
- data/lib/authlete/model/client.rb +163 -145
- data/lib/authlete/model/hsk.rb +67 -0
- data/lib/authlete/model/service.rb +264 -219
- data/lib/authlete/version.rb +1 -1
- data/lib/authlete.rb +1 -0
- data/test/authlete/model/test_client.rb +416 -401
- data/test/authlete/model/test_hsk.rb +108 -0
- data/test/authlete/model/test_service.rb +511 -459
- metadata +14 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: f49201aa56f63fd8b3061917ba4f6bb5b9d4ff12dff4651ef1f124076ae41a9c
|
4
|
+
data.tar.gz: b05fafd6b3b9c50274b7571a92824d200eb255330eacadefdee4089a18327c16
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 580c8997cc0d8cfad9925f5adcb27b8d22a520d5e10956cce6bb2bfa7ec574d2c4d1fecfc88a112aa4bf93f77cb2fc63a28ca742ad472919ae7627049b727ab6
|
7
|
+
data.tar.gz: 3ef6fc77cb49700340a1b9ed7b5bb112ea578d0b28f6d8fe491a9dc5059845d73abee73fb7ff1a7a4344f9c09647b6a7d82c46b888314af8814b6bce592fc7b6
|
data/authlete.gemspec
CHANGED
@@ -20,6 +20,6 @@ Gem::Specification.new do |spec|
|
|
20
20
|
|
21
21
|
spec.add_runtime_dependency "rest-client", ">= 1.7.2"
|
22
22
|
|
23
|
-
spec.add_development_dependency "bundler", "
|
24
|
-
spec.add_development_dependency "rake", "
|
23
|
+
spec.add_development_dependency "bundler", ">= 2.2.10"
|
24
|
+
spec.add_development_dependency "rake", ">= 12.3.3"
|
25
25
|
end
|
@@ -288,163 +288,181 @@ module Authlete
|
|
288
288
|
alias_method :request_object_required=, :requestObjectRequired=
|
289
289
|
|
290
290
|
attr_accessor :attributes
|
291
|
-
|
291
|
+
|
292
292
|
attr_accessor :customMetadata
|
293
293
|
alias_method :custom_metadata, :customMetadata
|
294
294
|
alias_method :custom_metadata=, :customMetadata=
|
295
295
|
|
296
|
+
attr_accessor :frontChannelRequestObjectEncryptionRequired
|
297
|
+
alias_method :front_channel_request_object_encryption_required, :frontChannelRequestObjectEncryptionRequired
|
298
|
+
alias_method :front_channel_request_object_encryption_required=, :frontChannelRequestObjectEncryptionRequired=
|
299
|
+
|
300
|
+
attr_accessor :requestObjectEncryptionAlgMatchRequired
|
301
|
+
alias_method :request_object_encryption_alg_match_required, :requestObjectEncryptionAlgMatchRequired
|
302
|
+
alias_method :request_object_encryption_alg_match_required=, :requestObjectEncryptionAlgMatchRequired=
|
303
|
+
|
304
|
+
attr_accessor :requestObjectEncryptionEncMatchRequired
|
305
|
+
alias_method :request_object_encryption_enc_match_required, :requestObjectEncryptionEncMatchRequired
|
306
|
+
alias_method :request_object_encryption_enc_match_required=, :requestObjectEncryptionEncMatchRequired=
|
307
|
+
|
296
308
|
private
|
297
309
|
|
298
310
|
def defaults
|
299
311
|
{
|
300
|
-
number:
|
301
|
-
serviceNumber:
|
302
|
-
developer:
|
303
|
-
clientId:
|
304
|
-
clientIdAlias:
|
305
|
-
clientIdAliasEnabled:
|
306
|
-
clientSecret:
|
307
|
-
clientType:
|
308
|
-
redirectUris:
|
309
|
-
responseTypes:
|
310
|
-
grantTypes:
|
311
|
-
applicationType:
|
312
|
-
contacts:
|
313
|
-
clientName:
|
314
|
-
clientNames:
|
315
|
-
logoUri:
|
316
|
-
logoUris:
|
317
|
-
clientUri:
|
318
|
-
clientUris:
|
319
|
-
policyUri:
|
320
|
-
policyUris:
|
321
|
-
tosUri:
|
322
|
-
tosUris:
|
323
|
-
jwksUri:
|
324
|
-
jwks:
|
325
|
-
derivedSectorIdentifier:
|
326
|
-
sectorIdentifierUri:
|
327
|
-
subjectType:
|
328
|
-
idTokenSignAlg:
|
329
|
-
idTokenEncryptionAlg:
|
330
|
-
idTokenEncryptionEnc:
|
331
|
-
userInfoSignAlg:
|
332
|
-
userInfoEncryptionAlg:
|
333
|
-
userInfoEncryptionEnc:
|
334
|
-
requestSignAlg:
|
335
|
-
requestEncryptionAlg:
|
336
|
-
requestEncryptionEnc:
|
337
|
-
tokenAuthMethod:
|
338
|
-
tokenAuthSignAlg:
|
339
|
-
defaultMaxAge:
|
340
|
-
defaultAcrs:
|
341
|
-
authTimeRequired:
|
342
|
-
loginUri:
|
343
|
-
requestUris:
|
344
|
-
description:
|
345
|
-
descriptions:
|
346
|
-
createdAt:
|
347
|
-
modifiedAt:
|
348
|
-
extension:
|
349
|
-
tlsClientAuthSubjectDn:
|
350
|
-
tlsClientAuthSanDns:
|
351
|
-
tlsClientAuthSanUri:
|
352
|
-
tlsClientAuthSanIp:
|
353
|
-
tlsClientAuthSanEmail:
|
354
|
-
tlsClientCertificateBoundAccessTokens:
|
355
|
-
selfSignedCertificateKeyId:
|
356
|
-
softwareId:
|
357
|
-
softwareVersion:
|
358
|
-
authorizationSignAlg:
|
359
|
-
authorizationEncryptionAlg:
|
360
|
-
authorizationEncryptionEnc:
|
361
|
-
bcDeliveryMode:
|
362
|
-
bcNotificationEndpoint:
|
363
|
-
bcRequestSignAlg:
|
364
|
-
bcUserCodeRequired:
|
365
|
-
dynamicallyRegistered:
|
366
|
-
registrationAccessTokenHash:
|
367
|
-
authorizationDetailsTypes:
|
368
|
-
parRequired:
|
369
|
-
requestObjectRequired:
|
370
|
-
attributes:
|
371
|
-
customMetadata:
|
312
|
+
number: 0,
|
313
|
+
serviceNumber: 0,
|
314
|
+
developer: nil,
|
315
|
+
clientId: 0,
|
316
|
+
clientIdAlias: nil,
|
317
|
+
clientIdAliasEnabled: false,
|
318
|
+
clientSecret: nil,
|
319
|
+
clientType: nil,
|
320
|
+
redirectUris: nil,
|
321
|
+
responseTypes: nil,
|
322
|
+
grantTypes: nil,
|
323
|
+
applicationType: nil,
|
324
|
+
contacts: nil,
|
325
|
+
clientName: nil,
|
326
|
+
clientNames: nil,
|
327
|
+
logoUri: nil,
|
328
|
+
logoUris: nil,
|
329
|
+
clientUri: nil,
|
330
|
+
clientUris: nil,
|
331
|
+
policyUri: nil,
|
332
|
+
policyUris: nil,
|
333
|
+
tosUri: nil,
|
334
|
+
tosUris: nil,
|
335
|
+
jwksUri: nil,
|
336
|
+
jwks: nil,
|
337
|
+
derivedSectorIdentifier: nil,
|
338
|
+
sectorIdentifierUri: nil,
|
339
|
+
subjectType: nil,
|
340
|
+
idTokenSignAlg: nil,
|
341
|
+
idTokenEncryptionAlg: nil,
|
342
|
+
idTokenEncryptionEnc: nil,
|
343
|
+
userInfoSignAlg: nil,
|
344
|
+
userInfoEncryptionAlg: nil,
|
345
|
+
userInfoEncryptionEnc: nil,
|
346
|
+
requestSignAlg: nil,
|
347
|
+
requestEncryptionAlg: nil,
|
348
|
+
requestEncryptionEnc: nil,
|
349
|
+
tokenAuthMethod: nil,
|
350
|
+
tokenAuthSignAlg: nil,
|
351
|
+
defaultMaxAge: 0,
|
352
|
+
defaultAcrs: nil,
|
353
|
+
authTimeRequired: false,
|
354
|
+
loginUri: nil,
|
355
|
+
requestUris: nil,
|
356
|
+
description: nil,
|
357
|
+
descriptions: nil,
|
358
|
+
createdAt: 0,
|
359
|
+
modifiedAt: 0,
|
360
|
+
extension: nil,
|
361
|
+
tlsClientAuthSubjectDn: nil,
|
362
|
+
tlsClientAuthSanDns: nil,
|
363
|
+
tlsClientAuthSanUri: nil,
|
364
|
+
tlsClientAuthSanIp: nil,
|
365
|
+
tlsClientAuthSanEmail: nil,
|
366
|
+
tlsClientCertificateBoundAccessTokens: false,
|
367
|
+
selfSignedCertificateKeyId: nil,
|
368
|
+
softwareId: nil,
|
369
|
+
softwareVersion: nil,
|
370
|
+
authorizationSignAlg: nil,
|
371
|
+
authorizationEncryptionAlg: nil,
|
372
|
+
authorizationEncryptionEnc: nil,
|
373
|
+
bcDeliveryMode: nil,
|
374
|
+
bcNotificationEndpoint: nil,
|
375
|
+
bcRequestSignAlg: nil,
|
376
|
+
bcUserCodeRequired: false,
|
377
|
+
dynamicallyRegistered: false,
|
378
|
+
registrationAccessTokenHash: nil,
|
379
|
+
authorizationDetailsTypes: nil,
|
380
|
+
parRequired: false,
|
381
|
+
requestObjectRequired: false,
|
382
|
+
attributes: nil,
|
383
|
+
customMetadata: nil,
|
384
|
+
frontChannelRequestObjectEncryptionRequired: false,
|
385
|
+
requestObjectEncryptionAlgMatchRequired: false,
|
386
|
+
requestObjectEncryptionEncMatchRequired: false
|
372
387
|
}
|
373
388
|
end
|
374
389
|
|
375
390
|
def set_params(hash)
|
376
|
-
@number
|
377
|
-
@serviceNumber
|
378
|
-
@developer
|
379
|
-
@clientId
|
380
|
-
@clientIdAlias
|
381
|
-
@clientIdAliasEnabled
|
382
|
-
@clientSecret
|
383
|
-
@clientType
|
384
|
-
@redirectUris
|
385
|
-
@responseTypes
|
386
|
-
@grantTypes
|
387
|
-
@applicationType
|
388
|
-
@contacts
|
389
|
-
@clientName
|
390
|
-
@clientNames
|
391
|
-
@logoUri
|
392
|
-
@logoUris
|
393
|
-
@clientUri
|
394
|
-
@clientUris
|
395
|
-
@policyUri
|
396
|
-
@policyUris
|
397
|
-
@tosUri
|
398
|
-
@tosUris
|
399
|
-
@jwksUri
|
400
|
-
@jwks
|
401
|
-
@derivedSectorIdentifier
|
402
|
-
@sectorIdentifierUri
|
403
|
-
@subjectType
|
404
|
-
@idTokenSignAlg
|
405
|
-
@idTokenEncryptionAlg
|
406
|
-
@idTokenEncryptionEnc
|
407
|
-
@userInfoSignAlg
|
408
|
-
@userInfoEncryptionAlg
|
409
|
-
@userInfoEncryptionEnc
|
410
|
-
@requestSignAlg
|
411
|
-
@requestEncryptionAlg
|
412
|
-
@requestEncryptionEnc
|
413
|
-
@tokenAuthMethod
|
414
|
-
@tokenAuthSignAlg
|
415
|
-
@defaultMaxAge
|
416
|
-
@defaultAcrs
|
417
|
-
@authTimeRequired
|
418
|
-
@loginUri
|
419
|
-
@requestUris
|
420
|
-
@description
|
421
|
-
@descriptions
|
422
|
-
@createdAt
|
423
|
-
@modifiedAt
|
424
|
-
@extension
|
425
|
-
@tlsClientAuthSubjectDn
|
426
|
-
@tlsClientAuthSanDns
|
427
|
-
@tlsClientAuthSanUri
|
428
|
-
@tlsClientAuthSanIp
|
429
|
-
@tlsClientAuthSanEmail
|
430
|
-
@tlsClientCertificateBoundAccessTokens
|
431
|
-
@selfSignedCertificateKeyId
|
432
|
-
@softwareId
|
433
|
-
@softwareVersion
|
434
|
-
@authorizationSignAlg
|
435
|
-
@authorizationEncryptionAlg
|
436
|
-
@authorizationEncryptionEnc
|
437
|
-
@bcDeliveryMode
|
438
|
-
@bcNotificationEndpoint
|
439
|
-
@bcRequestSignAlg
|
440
|
-
@bcUserCodeRequired
|
441
|
-
@dynamicallyRegistered
|
442
|
-
@registrationAccessTokenHash
|
443
|
-
@authorizationDetailsTypes
|
444
|
-
@parRequired
|
445
|
-
@requestObjectRequired
|
446
|
-
@attributes
|
447
|
-
@customMetadata
|
391
|
+
@number = hash[:number]
|
392
|
+
@serviceNumber = hash[:serviceNumber]
|
393
|
+
@developer = hash[:developer]
|
394
|
+
@clientId = hash[:clientId]
|
395
|
+
@clientIdAlias = hash[:clientIdAlias]
|
396
|
+
@clientIdAliasEnabled = hash[:clientIdAliasEnabled]
|
397
|
+
@clientSecret = hash[:clientSecret]
|
398
|
+
@clientType = hash[:clientType]
|
399
|
+
@redirectUris = hash[:redirectUris]
|
400
|
+
@responseTypes = hash[:responseTypes]
|
401
|
+
@grantTypes = hash[:grantTypes]
|
402
|
+
@applicationType = hash[:applicationType]
|
403
|
+
@contacts = hash[:contacts]
|
404
|
+
@clientName = hash[:clientName]
|
405
|
+
@clientNames = get_parsed_array(hash[:clientNames]) { |e| Authlete::Model::TaggedValue.parse(e) }
|
406
|
+
@logoUri = hash[:logoUri]
|
407
|
+
@logoUris = get_parsed_array(hash[:logoUris]) { |e| Authlete::Model::TaggedValue.parse(e) }
|
408
|
+
@clientUri = hash[:clientUri]
|
409
|
+
@clientUris = get_parsed_array(hash[:clientUris]) { |e| Authlete::Model::TaggedValue.parse(e) }
|
410
|
+
@policyUri = hash[:policyUri]
|
411
|
+
@policyUris = get_parsed_array(hash[:policyUris]) { |e| Authlete::Model::TaggedValue.parse(e) }
|
412
|
+
@tosUri = hash[:tosUri]
|
413
|
+
@tosUris = get_parsed_array(hash[:tosUris]) { |e| Authlete::Model::TaggedValue.parse(e) }
|
414
|
+
@jwksUri = hash[:jwksUri]
|
415
|
+
@jwks = hash[:jwks]
|
416
|
+
@derivedSectorIdentifier = hash[:derivedSectorIdentifier]
|
417
|
+
@sectorIdentifierUri = hash[:sectorIdentifierUri]
|
418
|
+
@subjectType = hash[:subjectType]
|
419
|
+
@idTokenSignAlg = hash[:idTokenSignAlg]
|
420
|
+
@idTokenEncryptionAlg = hash[:idTokenEncryptionAlg]
|
421
|
+
@idTokenEncryptionEnc = hash[:idTokenEncryptionEnc]
|
422
|
+
@userInfoSignAlg = hash[:userInfoSignAlg]
|
423
|
+
@userInfoEncryptionAlg = hash[:userInfoEncryptionAlg]
|
424
|
+
@userInfoEncryptionEnc = hash[:userInfoEncryptionEnc]
|
425
|
+
@requestSignAlg = hash[:requestSignAlg]
|
426
|
+
@requestEncryptionAlg = hash[:requestEncryptionAlg]
|
427
|
+
@requestEncryptionEnc = hash[:requestEncryptionEnc]
|
428
|
+
@tokenAuthMethod = hash[:tokenAuthMethod]
|
429
|
+
@tokenAuthSignAlg = hash[:tokenAuthSignAlg]
|
430
|
+
@defaultMaxAge = hash[:defaultMaxAge]
|
431
|
+
@defaultAcrs = hash[:defaultAcrs]
|
432
|
+
@authTimeRequired = hash[:authTimeRequired]
|
433
|
+
@loginUri = hash[:loginUri]
|
434
|
+
@requestUris = hash[:requestUris]
|
435
|
+
@description = hash[:description]
|
436
|
+
@descriptions = get_parsed_array(hash[:descriptions]) { |e| Authlete::Model::TaggedValue.parse(e) }
|
437
|
+
@createdAt = hash[:createdAt]
|
438
|
+
@modifiedAt = hash[:modifiedAt]
|
439
|
+
@extension = Authlete::Model::ClientExtension.parse(hash[:extension])
|
440
|
+
@tlsClientAuthSubjectDn = hash[:tlsClientAuthSubjectDn]
|
441
|
+
@tlsClientAuthSanDns = hash[:tlsClientAuthSanDns]
|
442
|
+
@tlsClientAuthSanUri = hash[:tlsClientAuthSanUri]
|
443
|
+
@tlsClientAuthSanIp = hash[:tlsClientAuthSanIp]
|
444
|
+
@tlsClientAuthSanEmail = hash[:tlsClientAuthSanEmail]
|
445
|
+
@tlsClientCertificateBoundAccessTokens = hash[:tlsClientCertificateBoundAccessTokens]
|
446
|
+
@selfSignedCertificateKeyId = hash[:selfSignedCertificateKeyId]
|
447
|
+
@softwareId = hash[:softwareId]
|
448
|
+
@softwareVersion = hash[:softwareVersion]
|
449
|
+
@authorizationSignAlg = hash[:authorizationSignAlg]
|
450
|
+
@authorizationEncryptionAlg = hash[:authorizationEncryptionAlg]
|
451
|
+
@authorizationEncryptionEnc = hash[:authorizationEncryptionEnc]
|
452
|
+
@bcDeliveryMode = hash[:bcDeliveryMode]
|
453
|
+
@bcNotificationEndpoint = hash[:bcNotificationEndpoint]
|
454
|
+
@bcRequestSignAlg = hash[:bcRequestSignAlg]
|
455
|
+
@bcUserCodeRequired = hash[:bcUserCodeRequired]
|
456
|
+
@dynamicallyRegistered = hash[:dynamicallyRegistered]
|
457
|
+
@registrationAccessTokenHash = hash[:registrationAccessTokenHash]
|
458
|
+
@authorizationDetailsTypes = hash[:authorizationDetailsTypes]
|
459
|
+
@parRequired = hash[:parRequired]
|
460
|
+
@requestObjectRequired = hash[:requestObjectRequired]
|
461
|
+
@attributes = get_parsed_array(hash[:attributes]) { |e| Authlete::Model::Pair.parse(e) }
|
462
|
+
@customMetadata = hash[:customMetadata]
|
463
|
+
@frontChannelRequestObjectEncryptionRequired = hash[:frontChannelRequestObjectEncryptionRequired]
|
464
|
+
@requestObjectEncryptionAlgMatchRequired = hash[:requestObjectEncryptionAlgMatchRequired]
|
465
|
+
@requestObjectEncryptionEncMatchRequired = hash[:requestObjectEncryptionEncMatchRequired]
|
448
466
|
end
|
449
467
|
|
450
468
|
def to_hash_value(key, var)
|
@@ -0,0 +1,67 @@
|
|
1
|
+
# :nodoc:
|
2
|
+
#
|
3
|
+
# Copyright (C) 2014-2021 Authlete, Inc.
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
16
|
+
|
17
|
+
|
18
|
+
module Authlete
|
19
|
+
module Model
|
20
|
+
class Hsk < Authlete::Model::Base
|
21
|
+
include Authlete::Model::Hashable
|
22
|
+
include Authlete::Utility
|
23
|
+
|
24
|
+
attr_accessor :kty
|
25
|
+
|
26
|
+
attr_accessor :use
|
27
|
+
|
28
|
+
attr_accessor :alg
|
29
|
+
|
30
|
+
attr_accessor :kid
|
31
|
+
|
32
|
+
attr_accessor :hsmName
|
33
|
+
alias_method :hsm_name, :hsmName
|
34
|
+
alias_method :hsm_name=, :hsmName=
|
35
|
+
|
36
|
+
attr_accessor :handle
|
37
|
+
|
38
|
+
attr_accessor :publicKey
|
39
|
+
alias_method :public_key, :publicKey
|
40
|
+
alias_method :public_key=, :publicKey=
|
41
|
+
|
42
|
+
private
|
43
|
+
|
44
|
+
def defaults
|
45
|
+
{
|
46
|
+
kty: nil,
|
47
|
+
use: nil,
|
48
|
+
alg: nil,
|
49
|
+
kid: nil,
|
50
|
+
hsmName: nil,
|
51
|
+
handle: nil,
|
52
|
+
publicKey: nil,
|
53
|
+
}
|
54
|
+
end
|
55
|
+
|
56
|
+
def set_params(hash)
|
57
|
+
@kty = hash[:kty]
|
58
|
+
@use = hash[:use]
|
59
|
+
@alg = hash[:alg]
|
60
|
+
@kid = hash[:kid]
|
61
|
+
@hsmName = hash[:hsmName]
|
62
|
+
@handle = hash[:handle]
|
63
|
+
@publicKey = hash[:publicKey]
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
67
|
+
end
|