authlete 1.0.15 → 1.0.16
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.rb +1 -0
- data/lib/authlete/model/client.rb +50 -3
- data/lib/authlete/model/named-uri.rb +103 -0
- data/lib/authlete/model/service.rb +38 -7
- data/lib/authlete/version.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 12c5acedbab062c8cee07a06b9f364976a48bc8f
|
4
|
+
data.tar.gz: 75bd6c938207b7105234a68f0619fd89567e8b7a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fb253a5a900f93ba42b4f0e0fd62118353c7f77a0d6490354b684410c8ef5409f8e72aac18e97bb54d0834b15158982e62f90f7978b1dbfdcc5e82e4c28d4390
|
7
|
+
data.tar.gz: c44e57896223a56608a5063461b0e2f46fc9b1f75f89ffac1747f18d218309d17052a7534cc1cf549768e76a06b835f7efa45ddf56674f62726b1c6b23f20942
|
data/lib/authlete.rb
CHANGED
@@ -41,6 +41,7 @@ module Authlete
|
|
41
41
|
autoload :ServiceOwner, 'authlete/model/service-owner'
|
42
42
|
autoload :SnsCredentials, 'authlete/model/sns-credentials'
|
43
43
|
autoload :TaggedValue, 'authlete/model/tagged-value'
|
44
|
+
autoload :NamedUri, 'authlete/model/named-uri'
|
44
45
|
|
45
46
|
module Request
|
46
47
|
autoload :AuthenticationCallbackRequest, 'authlete/model/request/authentication-callback-request'
|
@@ -332,6 +332,45 @@ module Authlete
|
|
332
332
|
alias_method :dynamically_registered, :dynamicallyRegistered
|
333
333
|
alias_method :dynamically_registered=, :dynamicallyRegistered=
|
334
334
|
|
335
|
+
# The string representation of the expected email address subject
|
336
|
+
# alternative name of the certificate this client will use in mutual
|
337
|
+
# TLS authentication. (String)
|
338
|
+
attr_accessor :tlsClientAuthSanEmail
|
339
|
+
alias_method :tls_client_auth_san_email, :tlsClientAuthSanEmail
|
340
|
+
alias_method :tls_client_auth_san_email=, :tlsClientAuthSanEmail=
|
341
|
+
|
342
|
+
# The string representation of the expected IP address subject alternative
|
343
|
+
# name of the certificate this client will use in mutual TLS authentication.
|
344
|
+
# (String)
|
345
|
+
attr_accessor :tlsClientAuthSanIp
|
346
|
+
alias_method :tls_client_auth_san_ip, :tlsClientAuthSanIp
|
347
|
+
alias_method :tls_client_auth_san_ip=, :tlsClientAuthSanIp=
|
348
|
+
|
349
|
+
# The string representation of the expected URI subject alternative
|
350
|
+
# name of the certificate this client will use in mutual TLS authentication.
|
351
|
+
# (String)
|
352
|
+
attr_accessor :tlsClientAuthSanUri
|
353
|
+
alias_method :tls_client_auth_san_uri, :tlsClientAuthSanUri
|
354
|
+
alias_method :tls_client_auth_san_uri=, :tlsClientAuthSanUri=
|
355
|
+
|
356
|
+
# The string representation of the expected DNS subject alternative
|
357
|
+
# name of the certificate this client will use in mutual TLS authentication.
|
358
|
+
# (String)
|
359
|
+
attr_accessor :tlsClientAuthSanDns
|
360
|
+
alias_method :tls_client_auth_san_dns, :tlsClientAuthSanDns
|
361
|
+
alias_method :tls_client_auth_san_dns=, :tlsClientAuthSanDns=
|
362
|
+
|
363
|
+
# Sector identifier URI. (String)
|
364
|
+
attr_accessor :sectorIdentifierUri
|
365
|
+
alias_method :sector_identifier_uri, :sectorIdentifierUri
|
366
|
+
alias_method :sector_identifier_uri=, :sectorIdentifierUri=
|
367
|
+
|
368
|
+
# The data types that this client may use as values of the +type+ field
|
369
|
+
# in +authorization_details+. (String array)
|
370
|
+
attr_accessor :authorizationDataTypes
|
371
|
+
alias_method :authorization_data_types, :authorizationDataTypes
|
372
|
+
alias_method :authorization_data_types=, :authorizationDataTypes=
|
373
|
+
|
335
374
|
private
|
336
375
|
|
337
376
|
# Integer attributes.
|
@@ -355,12 +394,14 @@ module Authlete
|
|
355
394
|
:tokenAuthMethod, :tokenAuthSignAlg, :loginUri, :description, :tlsClientAuthSubjectDn,
|
356
395
|
:selfSignedCertificateKeyId, :authorizationSignAlg, :authorizationEncryptionAlg,
|
357
396
|
:authorizationEncryptionEnc, :bcDeliveryMode, :bcNotificationEndpoint,
|
358
|
-
:bcRequestSignAlg
|
397
|
+
:bcRequestSignAlg, :tlsClientAuthSanEmail, :tlsClientAuthSanIp, :tlsClientAuthSanUri,
|
398
|
+
:tlsClientAuthSanDns, :sectorIdentifierUri
|
359
399
|
])
|
360
400
|
|
361
401
|
# String array attributes.
|
362
402
|
STRING_ARRAY_ATTRIBUTES = ::Set.new([
|
363
|
-
:redirectUris, :responseTypes, :grantTypes, :contacts, :defaultAcrs,
|
403
|
+
:redirectUris, :responseTypes, :grantTypes, :contacts, :defaultAcrs,
|
404
|
+
:requestUris, :authorizationDataTypes
|
364
405
|
])
|
365
406
|
|
366
407
|
# Tagged value array atributes.
|
@@ -421,7 +462,13 @@ module Authlete
|
|
421
462
|
:bc_notification_endpoint => :bcNotificationEndpoint,
|
422
463
|
:bc_request_sign_alg => :bcRequestSignAlg,
|
423
464
|
:bc_user_code_required => :bcUserCodeRequired,
|
424
|
-
:dynamically_registered => :dynamicallyRegistered
|
465
|
+
:dynamically_registered => :dynamicallyRegistered,
|
466
|
+
:tls_client_auth_san_email => :tlsClientAuthSanEmail,
|
467
|
+
:tls_client_auth_san_ip => :tlsClientAuthSanIp,
|
468
|
+
:tls_client_auth_san_uri => :tlsClientAuthSanUri,
|
469
|
+
:tls_client_auth_san_dns => :tlsClientAuthSanDns,
|
470
|
+
:sector_identifier_uri => :sectorIdentifierUri,
|
471
|
+
:authorization_data_types => :authorizationDataTypes
|
425
472
|
}
|
426
473
|
|
427
474
|
# The constructor
|
@@ -0,0 +1,103 @@
|
|
1
|
+
# :nodoc:
|
2
|
+
#
|
3
|
+
# Copyright (C) 2014-2018 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
|
+
require 'set'
|
19
|
+
|
20
|
+
|
21
|
+
module Authlete
|
22
|
+
module Model
|
23
|
+
class NamedUri < Authlete::Model::Hashable
|
24
|
+
include Authlete::Utility
|
25
|
+
# The name of the URI. (String)
|
26
|
+
attr_accessor :name
|
27
|
+
|
28
|
+
# The value of the URI. (String)
|
29
|
+
attr_accessor :uri
|
30
|
+
|
31
|
+
private
|
32
|
+
|
33
|
+
# String attributes.
|
34
|
+
STRING_ATTRIBUTES = ::Set.new([ :name, :uri ])
|
35
|
+
|
36
|
+
# The constructor
|
37
|
+
def initialize(hash = nil)
|
38
|
+
# Set default values to string attributes.
|
39
|
+
STRING_ATTRIBUTES.each do |attr|
|
40
|
+
send("#{attr}=", nil)
|
41
|
+
end
|
42
|
+
|
43
|
+
# Set attribute values using the given hash.
|
44
|
+
authlete_model_update(hash)
|
45
|
+
end
|
46
|
+
|
47
|
+
def authlete_model_convert_key(key)
|
48
|
+
key.to_sym
|
49
|
+
end
|
50
|
+
|
51
|
+
def authlete_model_simple_attribute?(key)
|
52
|
+
STRING_ATTRIBUTES.include?(key)
|
53
|
+
end
|
54
|
+
|
55
|
+
def authlete_model_update(hash)
|
56
|
+
return if hash.nil?
|
57
|
+
|
58
|
+
hash.each do |key, value|
|
59
|
+
key = authlete_model_convert_key(key)
|
60
|
+
|
61
|
+
if authlete_model_simple_attribute?(key)
|
62
|
+
send("#{key}=", value)
|
63
|
+
end
|
64
|
+
end
|
65
|
+
|
66
|
+
self
|
67
|
+
end
|
68
|
+
|
69
|
+
public
|
70
|
+
|
71
|
+
# Construct an instance from the given hash.
|
72
|
+
#
|
73
|
+
# If the given argument is nil or is not a Hash, nil is returned.
|
74
|
+
# Otherwise, NamedUri.new(hash) is returned.
|
75
|
+
def self.parse(hash)
|
76
|
+
if hash.nil? or (hash.kind_of?(Hash) == false)
|
77
|
+
return nil
|
78
|
+
end
|
79
|
+
|
80
|
+
Authlete::Model::NamedUri.new(hash)
|
81
|
+
end
|
82
|
+
|
83
|
+
# Set attribute values using the given hash.
|
84
|
+
def update(hash)
|
85
|
+
authlete_model_update(hash)
|
86
|
+
end
|
87
|
+
|
88
|
+
# Convert this object into a hash.
|
89
|
+
def to_hash
|
90
|
+
hash = {}
|
91
|
+
|
92
|
+
instance_variables.each do |var|
|
93
|
+
key = var.to_s.delete("@").to_sym
|
94
|
+
val = instance_variable_get(var)
|
95
|
+
|
96
|
+
hash[key] = val
|
97
|
+
end
|
98
|
+
|
99
|
+
hash
|
100
|
+
end
|
101
|
+
end
|
102
|
+
end
|
103
|
+
end
|
@@ -503,6 +503,26 @@ module Authlete
|
|
503
503
|
alias_method :request_object_endpoint, :requestObjectEndpoint
|
504
504
|
alias_method :request_object_endpoint=, :requestObjectEndpoint=
|
505
505
|
|
506
|
+
# MTLS endpoint aliases. (NamedUri array)
|
507
|
+
attr_accessor :mtlsEndpointAliases
|
508
|
+
alias_method :mtls_endpoint_aliases, :mtlsEndpointAliases
|
509
|
+
alias_method :mtls_endpoint_aliases=, :mtlsEndpointAliases=
|
510
|
+
|
511
|
+
# The URI of pushed authorization request endpoint. (String)
|
512
|
+
attr_accessor :pushedAuthReqEndpoint
|
513
|
+
alias_method :pushed_auth_req_endpoint, :pushedAuthReqEndpoint
|
514
|
+
alias_method :pushed_auth_req_endpoint=, :pushedAuthReqEndpoint=
|
515
|
+
|
516
|
+
# Duration of pushed authorization requests. (Integer)
|
517
|
+
attr_accessor :pushedAuthReqDuration
|
518
|
+
alias_method :pushed_auth_req_duration, :pushedAuthReqDuration
|
519
|
+
alias_method :pushed_auth_req_duration=, :pushedAuthReqDuration=
|
520
|
+
|
521
|
+
# Supported data types for +authorization_details+. (String array)
|
522
|
+
attr_accessor :supportedAuthorizationDataTypes
|
523
|
+
alias_method :supported_authorization_data_types, :supportedAuthorizationDataTypes
|
524
|
+
alias_method :supported_authorization_data_types=, :supportedAuthorizationDataTypes=
|
525
|
+
|
506
526
|
private
|
507
527
|
|
508
528
|
# Integer attributes.
|
@@ -511,7 +531,7 @@ module Authlete
|
|
511
531
|
:backchannelAuthReqIdDuration, :backchannelPollingInterval, :clientsPerDeveloper,
|
512
532
|
:createdAt, :deviceFlowCodeDuration, :deviceFlowPollingInterval,
|
513
533
|
:idTokenDuration, :modifiedAt, :number, :refreshTokenDuration,
|
514
|
-
:serviceOwnerNumber, :userCodeLength
|
534
|
+
:serviceOwnerNumber, :userCodeLength, :pushedAuthReqDuration
|
515
535
|
])
|
516
536
|
|
517
537
|
# Boolean attributes.
|
@@ -537,7 +557,8 @@ module Authlete
|
|
537
557
|
:idTokenSignatureKeyId, :introspectionEndpoint, :issuer, :jwks, :jwksUri,
|
538
558
|
:policyUri, :registrationEndpoint, :registrationManagementEndpoint,
|
539
559
|
:requestObjectEndpoint, :revocationEndpoint, :serviceDocumentation, :serviceName,
|
540
|
-
:tokenEndpoint, :tosUri, :userCodeCharset, :userInfoEndpoint, :userInfoSignatureKeyId
|
560
|
+
:tokenEndpoint, :tosUri, :userCodeCharset, :userInfoEndpoint, :userInfoSignatureKeyId,
|
561
|
+
:pushedAuthReqEndpoint
|
541
562
|
])
|
542
563
|
|
543
564
|
# String array attributes.
|
@@ -546,7 +567,7 @@ module Authlete
|
|
546
567
|
:supportedClaims, :supportedClaimTypes, :supportedDeveloperSnses,
|
547
568
|
:supportedDisplays, :supportedGrantTypes, :supportedResponseTypes,
|
548
569
|
:supportedServiceProfiles, :supportedSnses, :supportedTokenAuthMethods,
|
549
|
-
:supportedUiLocales, :trustedRootCertificates
|
570
|
+
:supportedUiLocales, :trustedRootCertificates, :supportedAuthorizationDataTypes
|
550
571
|
])
|
551
572
|
|
552
573
|
# SNS credentials array attributes.
|
@@ -636,7 +657,11 @@ module Authlete
|
|
636
657
|
:user_code_charset => :userCodeCharset,
|
637
658
|
:user_code_length => :userCodeLength,
|
638
659
|
:user_info_endpoint => :userInfoEndpoint,
|
639
|
-
:user_info_signature_key_id => :userInfoSignatureKeyId
|
660
|
+
:user_info_signature_key_id => :userInfoSignatureKeyId,
|
661
|
+
:mtls_endpoint_aliases => :mtlsEndpointAliases,
|
662
|
+
:pushed_auth_req_endpoint => :pushedAuthReqEndpoint,
|
663
|
+
:pushed_auth_req_duration => :pushedAuthReqDuration,
|
664
|
+
:supported_authorization_data_types => :supportedAuthorizationDataTypes
|
640
665
|
}
|
641
666
|
|
642
667
|
# The constructor
|
@@ -667,8 +692,9 @@ module Authlete
|
|
667
692
|
end
|
668
693
|
|
669
694
|
# Set default values to special objects.
|
670
|
-
@metadata
|
671
|
-
@supportedScopes
|
695
|
+
@metadata = nil
|
696
|
+
@supportedScopes = nil
|
697
|
+
@mtls_endpoint_aliases = nil
|
672
698
|
|
673
699
|
# Set attribute values using the given hash.
|
674
700
|
authlete_model_update(hash)
|
@@ -715,6 +741,10 @@ module Authlete
|
|
715
741
|
@supportedScopes = get_parsed_array(value) do |element|
|
716
742
|
Authlete::Model::Scope.parse(element)
|
717
743
|
end
|
744
|
+
elsif key == :mtls_endpoint_aliases
|
745
|
+
@mtls_endpoint_aliases = get_parsed_array(value) do |element|
|
746
|
+
Authlete::Model::NamedUri.parse(element)
|
747
|
+
end
|
718
748
|
end
|
719
749
|
end
|
720
750
|
|
@@ -745,7 +775,8 @@ module Authlete
|
|
745
775
|
|
746
776
|
if authlete_model_simple_attribute?(key) or val.nil?
|
747
777
|
hash[key] = val
|
748
|
-
elsif key == :developerSnsCredentials or key == :snsCredentials or
|
778
|
+
elsif key == :developerSnsCredentials or key == :snsCredentials or
|
779
|
+
key == :supportedScopes or key == :metadata or key == :mtls_endpoint_aliases
|
749
780
|
hash[key] = val.map { |element| element.to_hash }
|
750
781
|
end
|
751
782
|
end
|
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.16
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Takahiko Kawasaki
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-11-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rest-client
|
@@ -73,6 +73,7 @@ files:
|
|
73
73
|
- lib/authlete/model/client-list.rb
|
74
74
|
- lib/authlete/model/client.rb
|
75
75
|
- lib/authlete/model/hashable.rb
|
76
|
+
- lib/authlete/model/named-uri.rb
|
76
77
|
- lib/authlete/model/pair.rb
|
77
78
|
- lib/authlete/model/property.rb
|
78
79
|
- lib/authlete/model/request/authentication-callback-request.rb
|
@@ -144,7 +145,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
144
145
|
version: '0'
|
145
146
|
requirements: []
|
146
147
|
rubyforge_project:
|
147
|
-
rubygems_version: 2.
|
148
|
+
rubygems_version: 2.5.1
|
148
149
|
signing_key:
|
149
150
|
specification_version: 4
|
150
151
|
summary: A library for Authlete Web APIs
|