authlete 1.0.4 → 1.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/authlete/model/client.rb +50 -43
- data/lib/authlete/model/scope.rb +8 -1
- data/lib/authlete/model/service.rb +37 -16
- data/lib/authlete/version.rb +1 -1
- 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: a19c57de187aa058751c1c88c0e22d3dd976d247
|
4
|
+
data.tar.gz: 05621d552b6b0474603d4f8db89ecf166dd9288a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a68d0b3a5a68678bfb4c918020bd848a212d2269959997e2ccdb09485b649df1fd882b871c7a9bd9d7f86fcd153f2a79262e0c1752d9e62a0380fefd31567907
|
7
|
+
data.tar.gz: 49e09fc2d8f9ef1ca84ec67271ffb045cab4a0de3f2a96e9f3577d5249e2dc5a2eea9ce46513d5330d39faed586b4b5cc85776d8c97aafdd0aabb6c1882d7dea
|
@@ -275,6 +275,12 @@ module Authlete
|
|
275
275
|
attr_accessor :modifiedAt
|
276
276
|
alias_method :modified_at, :modifiedAt
|
277
277
|
alias_method :modified_at=, :modifiedAt=
|
278
|
+
|
279
|
+
# The flag that indicates whether the client uses sender authenticated MTLS bound
|
280
|
+
# access tokens.
|
281
|
+
attr_accessor :mutualTlsSenderConstrainedAccessTokens
|
282
|
+
alias_method :mutual_tls_sender_constrained_access_tokens, :mutualTlsSenderConstrainedAccessTokens
|
283
|
+
alias_method :mutual_tls_sender_constrained_access_tokens=, :mutualTlsSenderConstrainedAccessTokens=
|
278
284
|
|
279
285
|
# The special information that extends the client. (ClientExtension)
|
280
286
|
attr_accessor :extension
|
@@ -288,7 +294,7 @@ module Authlete
|
|
288
294
|
|
289
295
|
# Boolean attributes.
|
290
296
|
BOOLEAN_ATTRIBUTES = ::Set.new([
|
291
|
-
:authTimeRequired, :clientIdAliasEnabled
|
297
|
+
:authTimeRequired, :clientIdAliasEnabled, :mutualTlsSenderConstrainedAccessTokens
|
292
298
|
])
|
293
299
|
|
294
300
|
# String attributes.
|
@@ -313,48 +319,49 @@ module Authlete
|
|
313
319
|
|
314
320
|
# Mapping from snake cases to camel cases.
|
315
321
|
SNAKE_TO_CAMEL = {
|
316
|
-
:service_number
|
317
|
-
:client_id
|
318
|
-
:client_id_alias
|
319
|
-
:client_id_alias_enabled
|
320
|
-
:client_secret
|
321
|
-
:client_type
|
322
|
-
:redirect_uris
|
323
|
-
:response_types
|
324
|
-
:grant_types
|
325
|
-
:application_type
|
326
|
-
:client_name
|
327
|
-
:client_names
|
328
|
-
:logo_uri
|
329
|
-
:logo_uris
|
330
|
-
:client_uri
|
331
|
-
:client_uris
|
332
|
-
:policy_uri
|
333
|
-
:policy_uris
|
334
|
-
:tos_uri
|
335
|
-
:tos_uris
|
336
|
-
:jwks_uri
|
337
|
-
:sector_identifier
|
338
|
-
:subject_type
|
339
|
-
:id_token_sign_alg
|
340
|
-
:id_token_encryption_alg
|
341
|
-
:id_token_encryption_enc
|
342
|
-
:user_info_sign_alg
|
343
|
-
:user_info_encryption_alg
|
344
|
-
:user_info_encryption_enc
|
345
|
-
:request_sign_alg
|
346
|
-
:request_encryption_alg
|
347
|
-
:request_encryption_enc
|
348
|
-
:token_auth_method
|
349
|
-
:token_auth_sign_alg
|
350
|
-
:default_max_age
|
351
|
-
:default_acrs
|
352
|
-
:auth_time_required
|
353
|
-
:login_uri
|
354
|
-
:request_uris
|
355
|
-
:created_at
|
356
|
-
:modified_at
|
357
|
-
:tls_client_auth_subject_dn
|
322
|
+
:service_number => :serviceNumber,
|
323
|
+
:client_id => :clientId,
|
324
|
+
:client_id_alias => :clientIdAlias,
|
325
|
+
:client_id_alias_enabled => :clientIdAliasEnabled,
|
326
|
+
:client_secret => :clientSecret,
|
327
|
+
:client_type => :clientType,
|
328
|
+
:redirect_uris => :redirectUris,
|
329
|
+
:response_types => :responseTypes,
|
330
|
+
:grant_types => :grantTypes,
|
331
|
+
:application_type => :applicationType,
|
332
|
+
:client_name => :clientName,
|
333
|
+
:client_names => :clientNames,
|
334
|
+
:logo_uri => :logoUri,
|
335
|
+
:logo_uris => :logoUris,
|
336
|
+
:client_uri => :clientUri,
|
337
|
+
:client_uris => :clientUris,
|
338
|
+
:policy_uri => :policyUri,
|
339
|
+
:policy_uris => :policyUris,
|
340
|
+
:tos_uri => :tosUri,
|
341
|
+
:tos_uris => :tosUris,
|
342
|
+
:jwks_uri => :jwksUri,
|
343
|
+
:sector_identifier => :sectorIdentifier,
|
344
|
+
:subject_type => :subjectType,
|
345
|
+
:id_token_sign_alg => :idTokenSignAlg,
|
346
|
+
:id_token_encryption_alg => :idTokenEncryptionAlg,
|
347
|
+
:id_token_encryption_enc => :idTokenEncryptionEnc,
|
348
|
+
:user_info_sign_alg => :userInfoSignAlg,
|
349
|
+
:user_info_encryption_alg => :userInfoEncryptionAlg,
|
350
|
+
:user_info_encryption_enc => :userInfoEncryptionEnc,
|
351
|
+
:request_sign_alg => :requestSignAlg,
|
352
|
+
:request_encryption_alg => :requestEncryptionAlg,
|
353
|
+
:request_encryption_enc => :requestEncryptionEnc,
|
354
|
+
:token_auth_method => :tokenAuthMethod,
|
355
|
+
:token_auth_sign_alg => :tokenAuthSignAlg,
|
356
|
+
:default_max_age => :defaultMaxAge,
|
357
|
+
:default_acrs => :defaultAcrs,
|
358
|
+
:auth_time_required => :authTimeRequired,
|
359
|
+
:login_uri => :loginUri,
|
360
|
+
:request_uris => :requestUris,
|
361
|
+
:created_at => :createdAt,
|
362
|
+
:modified_at => :modifiedAt,
|
363
|
+
:tls_client_auth_subject_dn => :tlsClientAuthSubjectDn,
|
364
|
+
:mutual_tls_sender_constrained_access_tokens => :mutualTlsSenderConstrainedAccessTokens
|
358
365
|
}
|
359
366
|
|
360
367
|
# The constructor
|
data/lib/authlete/model/scope.rb
CHANGED
@@ -22,6 +22,9 @@ module Authlete
|
|
22
22
|
module Model
|
23
23
|
class Scope < Authlete::Model::Hashable
|
24
24
|
include Authlete::Utility
|
25
|
+
# The attributes of this scopes. (Pair array)
|
26
|
+
attr_accessor :attributes
|
27
|
+
|
25
28
|
# The description about this scope. (String)
|
26
29
|
attr_accessor :description
|
27
30
|
|
@@ -104,6 +107,10 @@ module Authlete
|
|
104
107
|
end
|
105
108
|
|
106
109
|
send("#{key}=", parsed)
|
110
|
+
elsif key == :attributes
|
111
|
+
@attributes = get_parsed_array(value) do |element|
|
112
|
+
Authlete::Model::Pair.parse(element)
|
113
|
+
end
|
107
114
|
end
|
108
115
|
end
|
109
116
|
|
@@ -139,7 +146,7 @@ module Authlete
|
|
139
146
|
|
140
147
|
if authlete_model_simple_attribute?(key) or val.nil?
|
141
148
|
hash[key] = val
|
142
|
-
elsif
|
149
|
+
elsif key == :attributes or key == :descriptions
|
143
150
|
hash[key] = val.map { |element| element.to_hash }
|
144
151
|
end
|
145
152
|
end
|
@@ -312,6 +312,11 @@ module Authlete
|
|
312
312
|
alias_method :supported_scopes, :supportedScopes
|
313
313
|
alias_method :supported_scopes=, :supportedScopes=
|
314
314
|
|
315
|
+
# The list of supported service profiles. (String array)
|
316
|
+
attr_accessor :supportedServiceProfiles
|
317
|
+
alias_method :supported_service_profiles, :supportedServiceProfiles
|
318
|
+
alias_method :supported_service_profiles=, :supportedServiceProfiles=
|
319
|
+
|
315
320
|
# The list of supported SNSes. (Sns array)
|
316
321
|
attr_accessor :supportedSnses
|
317
322
|
alias_method :supported_snses, :supportedSnses
|
@@ -348,8 +353,14 @@ module Authlete
|
|
348
353
|
# The key ID to identify a JWK used for user info signature using an
|
349
354
|
# asymmetric key. (String)
|
350
355
|
attr_accessor :userInfoSignatureKeyId
|
351
|
-
alias_method
|
352
|
-
alias_method
|
356
|
+
alias_method :user_info_signature_key_id, :userInfoSignatureKeyId
|
357
|
+
alias_method :user_info_signature_key_id=, :userInfoSignatureKeyId=
|
358
|
+
|
359
|
+
# The flag that indicates whether the service offers sender authenticated MTLS bound
|
360
|
+
# access tokens.
|
361
|
+
attr_accessor :mutualTlsSenderConstrainedAccessTokens
|
362
|
+
alias_method :mutual_tls_sender_constrained_access_tokens, :mutualTlsSenderConstrainedAccessTokens
|
363
|
+
alias_method :mutual_tls_sender_constrained_access_tokens=, :mutualTlsSenderConstrainedAccessTokens=
|
353
364
|
|
354
365
|
private
|
355
366
|
|
@@ -365,7 +376,8 @@ module Authlete
|
|
365
376
|
:directIntrospectionEndpointEnabled, :directJwksEndpointEnabled,
|
366
377
|
:directRevocationEndpointEnabled, :directTokenEndpointEnabled,
|
367
378
|
:directUserInfoEndpointEnabled, :errorDescriptionOmitted, :errorUriOmitted,
|
368
|
-
:pkceRequired, :refreshTokenKept, :singleAccessTokenPerSubject
|
379
|
+
:pkceRequired, :refreshTokenKept, :singleAccessTokenPerSubject,
|
380
|
+
:mutualTlsSenderConstrainedAccessTokens
|
369
381
|
])
|
370
382
|
|
371
383
|
# String attributes.
|
@@ -383,8 +395,13 @@ module Authlete
|
|
383
395
|
STRING_ARRAY_ATTRIBUTES = ::Set.new([
|
384
396
|
:supportedAcrs, :supportedClaimLocales, :supportedClaims,
|
385
397
|
:supportedClaimTypes, :supportedDeveloperSnses, :supportedDisplays,
|
386
|
-
:supportedGrantTypes, :supportedResponseTypes, :
|
387
|
-
:supportedTokenAuthMethods, :supportedUiLocales
|
398
|
+
:supportedGrantTypes, :supportedResponseTypes, :supportedServiceProfiles,
|
399
|
+
:supportedSnses, :supportedTokenAuthMethods, :supportedUiLocales
|
400
|
+
])
|
401
|
+
|
402
|
+
# SNS credentials array attributes.
|
403
|
+
SNS_CREDENTIALS_ARRAY_ATTRIBUTES = ::Set.new([
|
404
|
+
:snsCredentials, :developerSnsCredentials
|
388
405
|
])
|
389
406
|
|
390
407
|
# Mapping from snake cases to camel cases.
|
@@ -436,13 +453,15 @@ module Authlete
|
|
436
453
|
:supported_grant_types => :supportedGrantTypes,
|
437
454
|
:supported_response_types => :supportedResponseTypes,
|
438
455
|
:supported_scopes => :supportedScopes,
|
456
|
+
:supported_service_profiles => :supportedServiceProfiles,
|
439
457
|
:supported_snses => :supportedSnses,
|
440
458
|
:supported_token_auth_methods => :supportedTokenAuthMethods,
|
441
459
|
:supported_ui_locales => :supportedUiLocales,
|
442
460
|
:token_endpoint => :tokenEndpoint,
|
443
461
|
:tos_uri => :tosUri,
|
444
462
|
:user_info_endpoint => :userInfoEndpoint,
|
445
|
-
:user_info_signature_key_id => :userInfoSignatureKeyId
|
463
|
+
:user_info_signature_key_id => :userInfoSignatureKeyId,
|
464
|
+
:mutual_tls_sender_constrained_access_tokens => :mutualTlsSenderConstrainedAccessTokens
|
446
465
|
}
|
447
466
|
|
448
467
|
# The constructor
|
@@ -467,11 +486,14 @@ module Authlete
|
|
467
486
|
send("#{attr}=", nil)
|
468
487
|
end
|
469
488
|
|
489
|
+
# Set default values to sns credentials array attributes.
|
490
|
+
SNS_CREDENTIALS_ARRAY_ATTRIBUTES.each do |attr|
|
491
|
+
send("#{attr}=", nil)
|
492
|
+
end
|
493
|
+
|
470
494
|
# Set default values to special objects.
|
471
|
-
@
|
472
|
-
@
|
473
|
-
@snsCredentials = nil
|
474
|
-
@supportedScopes = nil
|
495
|
+
@metadata = nil
|
496
|
+
@supportedScopes = nil
|
475
497
|
|
476
498
|
# Set attribute values using the given hash.
|
477
499
|
authlete_model_update(hash)
|
@@ -503,18 +525,17 @@ module Authlete
|
|
503
525
|
|
504
526
|
if authlete_model_simple_attribute?(key)
|
505
527
|
send("#{key}=", value)
|
506
|
-
elsif key
|
507
|
-
|
528
|
+
elsif SNS_CREDENTIALS_ARRAY_ATTRIBUTES.include?(key)
|
529
|
+
# Get an array consisting of "SnsCredentials" objects.
|
530
|
+
parsed = get_parsed_array(value) do |element|
|
508
531
|
Authlete::Model::SnsCredentials.parse(element)
|
509
532
|
end
|
533
|
+
|
534
|
+
send("#{key}=", parsed)
|
510
535
|
elsif key == :metadata
|
511
536
|
@metadata = get_parsed_array(value) do |element|
|
512
537
|
Authlete::Model::Pair.parse(element)
|
513
538
|
end
|
514
|
-
elsif key == :snsCredentials
|
515
|
-
@snsCredentials = get_parsed_array(value) do |element|
|
516
|
-
Authlete::Model::SnsCredentials.parse(element)
|
517
|
-
end
|
518
539
|
elsif key == :supportedScopes
|
519
540
|
@supportedScopes = get_parsed_array(value) do |element|
|
520
541
|
Authlete::Model::Scope.parse(element)
|
data/lib/authlete/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: authlete
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Takahiko Kawasaki
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-03-
|
11
|
+
date: 2018-03-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rest-client
|