authlete 1.0.17 → 1.0.22
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/README.md +20 -20
- data/lib/authlete/authentication-server.rb +229 -229
- data/lib/authlete/model/client-extension.rb +26 -2
- data/lib/authlete/model/client.rb +66 -59
- data/lib/authlete/model/scope.rb +157 -157
- data/lib/authlete/model/service-list.rb +127 -127
- data/lib/authlete/model/service.rb +851 -787
- data/lib/authlete/model/sns-credentials.rb +123 -123
- data/lib/authlete/utility.rb +98 -98
- data/lib/authlete/version.rb +2 -3
- metadata +3 -4
@@ -1,128 +1,128 @@
|
|
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 ServiceList < Authlete::Model::Hashable
|
24
|
-
include Authlete::Utility
|
25
|
-
# The start index (inclusive) of the services in this list.
|
26
|
-
# (Integer)
|
27
|
-
attr_accessor :start
|
28
|
-
|
29
|
-
# The end index (exclusive) of the services in this list.
|
30
|
-
# (Integer)
|
31
|
-
attr_accessor :end
|
32
|
-
|
33
|
-
# The total count of services. (Integer)
|
34
|
-
attr_accessor :totalCount
|
35
|
-
alias_method :total_count, :totalCount
|
36
|
-
alias_method :total_count=, :totalCount=
|
37
|
-
|
38
|
-
# The list of services. (Service array)
|
39
|
-
attr_accessor :services
|
40
|
-
|
41
|
-
private
|
42
|
-
|
43
|
-
# Integer attributes.
|
44
|
-
INTEGER_ATTRIBUTES = ::Set.new([ :start, :end, :totalCount ])
|
45
|
-
|
46
|
-
# Mapping from snake cases to camel cases.
|
47
|
-
SNAKE_TO_CAMEL = { :total_count => :totalCount }
|
48
|
-
|
49
|
-
# The constructor
|
50
|
-
def initialize(hash = nil)
|
51
|
-
# Set default values to integer attributes.
|
52
|
-
INTEGER_ATTRIBUTES.each do |attr|
|
53
|
-
send("#{attr}=", 0)
|
54
|
-
end
|
55
|
-
|
56
|
-
@services = nil
|
57
|
-
|
58
|
-
# Set attribute values using the given hash.
|
59
|
-
authlete_model_update(hash)
|
60
|
-
end
|
61
|
-
|
62
|
-
def authlete_model_convert_key(key)
|
63
|
-
key = key.to_sym
|
64
|
-
|
65
|
-
# Convert snakecase to camelcase, if necessary.
|
66
|
-
if SNAKE_TO_CAMEL.has_key?(key)
|
67
|
-
key = SNAKE_TO_CAMEL[key]
|
68
|
-
end
|
69
|
-
|
70
|
-
key
|
71
|
-
end
|
72
|
-
|
73
|
-
def authlete_model_simple_attribute?(key)
|
74
|
-
INTEGER_ATTRIBUTES.include?(key)
|
75
|
-
end
|
76
|
-
|
77
|
-
def authlete_model_update(hash)
|
78
|
-
return if hash.nil?
|
79
|
-
|
80
|
-
hash.each do |key, value|
|
81
|
-
key = authlete_model_convert_key(key)
|
82
|
-
|
83
|
-
if authlete_model_simple_attribute?(key)
|
84
|
-
send("#{key}=", value)
|
85
|
-
elsif key == :services
|
86
|
-
@services = get_parsed_array(value) do |element|
|
87
|
-
Authlete::Model::Service.parse(element)
|
88
|
-
end
|
89
|
-
end
|
90
|
-
end
|
91
|
-
|
92
|
-
self
|
93
|
-
end
|
94
|
-
|
95
|
-
public
|
96
|
-
|
97
|
-
# Construct an instance from the given hash.
|
98
|
-
#
|
99
|
-
# If the given argument is nil or is not a Hash, nil is returned.
|
100
|
-
# Otherwise, ServiceList.new(hash) is returned.
|
101
|
-
def self.parse(hash)
|
102
|
-
if hash.nil? or (hash.kind_of?(Hash) == false)
|
103
|
-
return nil
|
104
|
-
end
|
105
|
-
|
106
|
-
ServiceList.new(hash)
|
107
|
-
end
|
108
|
-
|
109
|
-
# Convert this object into a hash.
|
110
|
-
def to_hash
|
111
|
-
hash = {}
|
112
|
-
|
113
|
-
instance_variables.each do |var|
|
114
|
-
key = var.to_s.delete("@").to_sym
|
115
|
-
val = instance_variable_get(var)
|
116
|
-
|
117
|
-
if authlete_model_simple_attribute?(key) or val.nil?
|
118
|
-
hash[key] = val
|
119
|
-
elsif val.kind_of?(Array)
|
120
|
-
hash[key] = val.map { |element| element.to_hash }
|
121
|
-
end
|
122
|
-
end
|
123
|
-
|
124
|
-
hash
|
125
|
-
end
|
126
|
-
end
|
127
|
-
end
|
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 ServiceList < Authlete::Model::Hashable
|
24
|
+
include Authlete::Utility
|
25
|
+
# The start index (inclusive) of the services in this list.
|
26
|
+
# (Integer)
|
27
|
+
attr_accessor :start
|
28
|
+
|
29
|
+
# The end index (exclusive) of the services in this list.
|
30
|
+
# (Integer)
|
31
|
+
attr_accessor :end
|
32
|
+
|
33
|
+
# The total count of services. (Integer)
|
34
|
+
attr_accessor :totalCount
|
35
|
+
alias_method :total_count, :totalCount
|
36
|
+
alias_method :total_count=, :totalCount=
|
37
|
+
|
38
|
+
# The list of services. (Service array)
|
39
|
+
attr_accessor :services
|
40
|
+
|
41
|
+
private
|
42
|
+
|
43
|
+
# Integer attributes.
|
44
|
+
INTEGER_ATTRIBUTES = ::Set.new([ :start, :end, :totalCount ])
|
45
|
+
|
46
|
+
# Mapping from snake cases to camel cases.
|
47
|
+
SNAKE_TO_CAMEL = { :total_count => :totalCount }
|
48
|
+
|
49
|
+
# The constructor
|
50
|
+
def initialize(hash = nil)
|
51
|
+
# Set default values to integer attributes.
|
52
|
+
INTEGER_ATTRIBUTES.each do |attr|
|
53
|
+
send("#{attr}=", 0)
|
54
|
+
end
|
55
|
+
|
56
|
+
@services = nil
|
57
|
+
|
58
|
+
# Set attribute values using the given hash.
|
59
|
+
authlete_model_update(hash)
|
60
|
+
end
|
61
|
+
|
62
|
+
def authlete_model_convert_key(key)
|
63
|
+
key = key.to_sym
|
64
|
+
|
65
|
+
# Convert snakecase to camelcase, if necessary.
|
66
|
+
if SNAKE_TO_CAMEL.has_key?(key)
|
67
|
+
key = SNAKE_TO_CAMEL[key]
|
68
|
+
end
|
69
|
+
|
70
|
+
key
|
71
|
+
end
|
72
|
+
|
73
|
+
def authlete_model_simple_attribute?(key)
|
74
|
+
INTEGER_ATTRIBUTES.include?(key)
|
75
|
+
end
|
76
|
+
|
77
|
+
def authlete_model_update(hash)
|
78
|
+
return if hash.nil?
|
79
|
+
|
80
|
+
hash.each do |key, value|
|
81
|
+
key = authlete_model_convert_key(key)
|
82
|
+
|
83
|
+
if authlete_model_simple_attribute?(key)
|
84
|
+
send("#{key}=", value)
|
85
|
+
elsif key == :services
|
86
|
+
@services = get_parsed_array(value) do |element|
|
87
|
+
Authlete::Model::Service.parse(element)
|
88
|
+
end
|
89
|
+
end
|
90
|
+
end
|
91
|
+
|
92
|
+
self
|
93
|
+
end
|
94
|
+
|
95
|
+
public
|
96
|
+
|
97
|
+
# Construct an instance from the given hash.
|
98
|
+
#
|
99
|
+
# If the given argument is nil or is not a Hash, nil is returned.
|
100
|
+
# Otherwise, ServiceList.new(hash) is returned.
|
101
|
+
def self.parse(hash)
|
102
|
+
if hash.nil? or (hash.kind_of?(Hash) == false)
|
103
|
+
return nil
|
104
|
+
end
|
105
|
+
|
106
|
+
ServiceList.new(hash)
|
107
|
+
end
|
108
|
+
|
109
|
+
# Convert this object into a hash.
|
110
|
+
def to_hash
|
111
|
+
hash = {}
|
112
|
+
|
113
|
+
instance_variables.each do |var|
|
114
|
+
key = var.to_s.delete("@").to_sym
|
115
|
+
val = instance_variable_get(var)
|
116
|
+
|
117
|
+
if authlete_model_simple_attribute?(key) or val.nil?
|
118
|
+
hash[key] = val
|
119
|
+
elsif val.kind_of?(Array)
|
120
|
+
hash[key] = val.map { |element| element.to_hash }
|
121
|
+
end
|
122
|
+
end
|
123
|
+
|
124
|
+
hash
|
125
|
+
end
|
126
|
+
end
|
127
|
+
end
|
128
128
|
end
|
@@ -1,788 +1,852 @@
|
|
1
|
-
# :nodoc:
|
2
|
-
#
|
3
|
-
# Copyright (C) 2014-2019 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 Service < Authlete::Model::Hashable
|
24
|
-
include Authlete::Utility
|
25
|
-
# The duration of access tokens in seconds. (Integer)
|
26
|
-
attr_accessor :accessTokenDuration
|
27
|
-
alias_method :access_token_duration, :accessTokenDuration
|
28
|
-
alias_method :access_token_duration=, :accessTokenDuration=
|
29
|
-
|
30
|
-
# The signature algorithm for access tokens. (String)
|
31
|
-
attr_accessor :accessTokenSignAlg
|
32
|
-
alias_method :access_token_sign_alg, :accessTokenSignAlg
|
33
|
-
alias_method :access_token_sign_alg=, :accessTokenSignAlg=
|
34
|
-
|
35
|
-
# The key ID to identify a JWK used for signing access tokens. (String)
|
36
|
-
attr_accessor :accessTokenSignatureKeyId
|
37
|
-
alias_method :access_token_signature_key_id, :accessTokenSignatureKeyId
|
38
|
-
alias_method :access_token_signature_key_id=, :accessTokenSignatureKeyId=
|
39
|
-
|
40
|
-
# The access token type. (String)
|
41
|
-
attr_accessor :accessTokenType
|
42
|
-
alias_method :access_token_type, :accessTokenType
|
43
|
-
alias_method :access_token_type=, :accessTokenType=
|
44
|
-
|
45
|
-
# The allowable clock skew between the server and clients in seconds.
|
46
|
-
# The clock skew is taken into consideration when time-related claims
|
47
|
-
# in a JWT (e.g. +exp+, +iat+, +nbf+) are verified. (Integer)
|
48
|
-
attr_accessor :allowableClockSkew
|
49
|
-
alias_method :allowable_clock_skew, :allowableClockSkew
|
50
|
-
alias_method :allowable_clock_skew=, :allowableClockSkew=
|
51
|
-
|
52
|
-
# The API key. (Integer)
|
53
|
-
attr_accessor :apiKey
|
54
|
-
alias_method :api_key, :apiKey
|
55
|
-
alias_method :api_key=, :apiKey=
|
56
|
-
|
57
|
-
# The API secret. (String)
|
58
|
-
attr_accessor :apiSecret
|
59
|
-
alias_method :api_secret, :apiSecret
|
60
|
-
alias_method :api_secret=, :apiSecret=
|
61
|
-
|
62
|
-
# The API key to access the authentication callback endpoint. (String)
|
63
|
-
attr_accessor :authenticationCallbackApiKey
|
64
|
-
alias_method :authentication_callback_api_key, :authenticationCallbackApiKey
|
65
|
-
alias_method :authentication_callback_api_key=, :authenticationCallbackApiKey=
|
66
|
-
|
67
|
-
# The API secret to access the authentication callback endpoint. (String)
|
68
|
-
attr_accessor :authenticationCallbackApiSecret
|
69
|
-
alias_method :authentication_callback_api_secret, :authenticationCallbackApiSecret
|
70
|
-
alias_method :authentication_callback_api_secret=, :authenticationCallbackApiSecret=
|
71
|
-
|
72
|
-
# The URI of the authentication callback endpoint. (String)
|
73
|
-
attr_accessor :authenticationCallbackEndpoint
|
74
|
-
alias_method :authentication_callback_endpoint, :authenticationCallbackEndpoint
|
75
|
-
alias_method :authentication_callback_endpoint=, :authenticationCallbackEndpoint=
|
76
|
-
|
77
|
-
# The URI of the authorization endpoint. (String)
|
78
|
-
attr_accessor :authorizationEndpoint
|
79
|
-
alias_method :authorization_endpoint, :authorizationEndpoint
|
80
|
-
alias_method :authorization_endpoint=, :authorizationEndpoint=
|
81
|
-
|
82
|
-
# The duration of access tokens in seconds; the value of +expires_in+
|
83
|
-
# in access token responses. (Integer)
|
84
|
-
attr_accessor :authorizationResponseDuration
|
85
|
-
alias_method :authorization_response_duration, :authorizationResponseDuration
|
86
|
-
alias_method :authorization_response_duration=, :authorizationResponseDuration=
|
87
|
-
|
88
|
-
# The key ID to identify a JWK used for signing authorization responses
|
89
|
-
# using an asymmetric key. (String)
|
90
|
-
attr_accessor :authorizationSignatureKeyId
|
91
|
-
alias_method :authorization_signature_key_id, :authorizationSignatureKeyId
|
92
|
-
alias_method :authorization_signature_key_id=, :authorizationSignatureKeyId=
|
93
|
-
|
94
|
-
# The URI of the backchannel authentication endpoint. (String)
|
95
|
-
attr_accessor :backchannelAuthenticationEndpoint
|
96
|
-
alias_method :backchannel_authentication_endpoint, :backchannelAuthenticationEndpoint
|
97
|
-
alias_method :backchannel_authentication_endpoint=, :backchannelAuthenticationEndpoint=
|
98
|
-
|
99
|
-
# The duration of backchannel authentication request IDs in seconds.
|
100
|
-
# (Integer)
|
101
|
-
attr_accessor :backchannelAuthReqIdDuration
|
102
|
-
alias_method :backchannel_auth_req_id_duration, :backchannelAuthReqIdDuration
|
103
|
-
alias_method :backchannel_auth_req_id_duration=, :backchannelAuthReqIdDuration=
|
104
|
-
|
105
|
-
# The flag indicating whether the +binding_message+ request parameter
|
106
|
-
# is always required whenever a backchannel authentication request is
|
107
|
-
# judged as a request for Financial-grade API. (Boolean)
|
108
|
-
attr_accessor :backchannelBindingMessageRequiredInFapi
|
109
|
-
alias_method :backchannel_binding_message_required_in_fapi, :backchannelBindingMessageRequiredInFapi
|
110
|
-
alias_method :backchannel_binding_message_required_in_fapi=, :backchannelBindingMessageRequiredInFapi=
|
111
|
-
|
112
|
-
# The minimum interval between polling requests in seconds. (Integer)
|
113
|
-
attr_accessor :backchannelPollingInterval
|
114
|
-
alias_method :backchannel_polling_interval, :backchannelPollingInterval
|
115
|
-
alias_method :backchannel_polling_interval=, :backchannelPollingInterval=
|
116
|
-
|
117
|
-
# The flag which indicates whether the +user_code+ request parameter
|
118
|
-
# is supported at the backchannel authentication endpoint. (Boolean)
|
119
|
-
attr_accessor :backchannelUserCodeParameterSupported
|
120
|
-
alias_method :backchannel_user_code_parameter_supported, :backchannelUserCodeParameterSupported
|
121
|
-
alias_method :backchannel_user_code_parameter_supported=, :backchannelUserCodeParameterSupported=
|
122
|
-
|
123
|
-
# The flag which indicates whether the 'Client ID Alias' feature
|
124
|
-
# is enabled or not. (Boolean)
|
125
|
-
attr_accessor :clientIdAliasEnabled
|
126
|
-
alias_method :client_id_alias_enabled, :clientIdAliasEnabled
|
127
|
-
alias_method :client_id_alias_enabled=, :clientIdAliasEnabled=
|
128
|
-
|
129
|
-
# The number of client applications that one developer can create.
|
130
|
-
# 0 means no limit. (Integer)
|
131
|
-
attr_accessor :clientsPerDeveloper
|
132
|
-
alias_method :clients_per_developer, :clientsPerDeveloper
|
133
|
-
alias_method :clients_per_developer=, :clientsPerDeveloper=
|
134
|
-
|
135
|
-
# The timestamp at which the service was created. (Integer)
|
136
|
-
attr_accessor :createdAt
|
137
|
-
alias_method :created_at, :createdAt
|
138
|
-
alias_method :created_at=, :createdAt=
|
139
|
-
|
140
|
-
# The description of this service. (String)
|
141
|
-
attr_accessor :description
|
142
|
-
|
143
|
-
# The API key to access the developer authentication callback endpoint. (String)
|
144
|
-
attr_accessor :developerAuthenticationCallbackApiKey
|
145
|
-
alias_method :developer_authentication_callback_api_key, :developerAuthenticationCallbackApiKey
|
146
|
-
alias_method :developer_authentication_callback_api_key=, :developerAuthenticationCallbackApiKey=
|
147
|
-
|
148
|
-
# The API secret to access the developer authentication callback endpoint. (String)
|
149
|
-
attr_accessor :developerAuthenticationCallbackApiSecret
|
150
|
-
alias_method :developer_authentication_callback_api_secret, :developerAuthenticationCallbackApiSecret
|
151
|
-
alias_method :developer_authentication_callback_api_secret=, :developerAuthenticationCallbackApiSecret=
|
152
|
-
|
153
|
-
# The URI of the developer authentication callback endpoint. (String)
|
154
|
-
attr_accessor :developerAuthenticationCallbackEndpoint
|
155
|
-
alias_method :developer_authentication_callback_endpoint, :developerAuthenticationCallbackEndpoint
|
156
|
-
alias_method :developer_authentication_callback_endpoint=, :developerAuthenticationCallbackEndpoint=
|
157
|
-
|
158
|
-
# The list of SNS credentials for developer login. (SnsCredentials array)
|
159
|
-
attr_accessor :developerSnsCredentials
|
160
|
-
alias_method :developer_sns_credentials, :developerSnsCredentials
|
161
|
-
alias_method :developer_sns_credentials=, :developerSnsCredentials=
|
162
|
-
|
163
|
-
# The URI of the device authorization endpoint. (String)
|
164
|
-
attr_accessor :deviceAuthorizationEndpoint
|
165
|
-
alias_method :device_authorization_endpoint, :deviceAuthorizationEndpoint
|
166
|
-
alias_method :device_authorization_endpoint=, :deviceAuthorizationEndpoint=
|
167
|
-
|
168
|
-
# The duration of device verification codes (device_code) and
|
169
|
-
# end-user verification codes (user_code) in seconds. (Integer)
|
170
|
-
attr_accessor :deviceFlowCodeDuration
|
171
|
-
alias_method :device_flow_code_duration, :deviceFlowCodeDuration
|
172
|
-
alias_method :device_flow_code_duration=, :deviceFlowCodeDuration=
|
173
|
-
|
174
|
-
# The minimum interval between polling requests in Device Flow in seconds. (Integer)
|
175
|
-
attr_accessor :deviceFlowPollingInterval
|
176
|
-
alias_method :device_flow_polling_interval, :deviceFlowPollingInterval
|
177
|
-
alias_method :device_flow_polling_interval=, :deviceFlowPollingInterval=
|
178
|
-
|
179
|
-
# The verification URI for Device Flow. (String)
|
180
|
-
attr_accessor :deviceVerificationUri
|
181
|
-
alias_method :device_verification_uri, :deviceVerificationUri
|
182
|
-
alias_method :device_verification_uri=, :deviceVerificationUri=
|
183
|
-
|
184
|
-
# The verification URI for Device Flow with a placeholder for a user code. (String)
|
185
|
-
attr_accessor :deviceVerificationUriComplete
|
186
|
-
alias_method :device_verification_uri_complete, :deviceVerificationUriComplete
|
187
|
-
alias_method :device_verification_uri_complete=, :deviceVerificationUriComplete=
|
188
|
-
|
189
|
-
# The flag to indicate whether the direct authorization endpoint
|
190
|
-
# is enabled or not. The path of the endpoint is
|
191
|
-
# <code>/api/auth/authorization/direct/{serviceApiKey}</code>.
|
192
|
-
# (Boolean)
|
193
|
-
attr_accessor :directAuthorizationEndpointEnabled
|
194
|
-
alias_method :direct_authorization_endpoint_enabled, :directAuthorizationEndpointEnabled
|
195
|
-
alias_method :direct_authorization_endpoint_enabled=, :directAuthorizationEndpointEnabled=
|
196
|
-
|
197
|
-
# The flag to indicate whether the direct introspection endpoint
|
198
|
-
# is enabled or not. The path of the endpoint is
|
199
|
-
# <code>/api/auth/introspection/direct/{serviceApiKey}</code>.
|
200
|
-
# (Boolean)
|
201
|
-
attr_accessor :directIntrospectionEndpointEnabled
|
202
|
-
alias_method :direct_introspection_endpoint_enabled, :directIntrospectionEndpointEnabled
|
203
|
-
alias_method :direct_introspection_endpoint_enabled=, :directIntrospectionEndpointEnabled=
|
204
|
-
|
205
|
-
# The flag to indicate whether the direct jwks endpoint
|
206
|
-
# is enabled or not. The path of the endpoint is
|
207
|
-
# <code>/api/service/jwks/get/direct/{serviceApiKey}</code>.
|
208
|
-
# (Boolean)
|
209
|
-
attr_accessor :directJwksEndpointEnabled
|
210
|
-
alias_method :direct_jwks_endpoint_enabled, :directJwksEndpointEnabled
|
211
|
-
alias_method :direct_jwks_endpoint_enabled=, :directJwksEndpointEnabled=
|
212
|
-
|
213
|
-
# The flag to indicate whether the direct revocation endpoint
|
214
|
-
# is enabled or not. The path of the endpoint is
|
215
|
-
# <code>/api/auth/revocation/direct/{serviceApiKey}</code>.
|
216
|
-
# (Boolean)
|
217
|
-
attr_accessor :directRevocationEndpointEnabled
|
218
|
-
alias_method :direct_revocation_endpoint_enabled, :directRevocationEndpointEnabled
|
219
|
-
alias_method :direct_revocation_endpoint_enabled=, :directRevocationEndpointEnabled=
|
220
|
-
|
221
|
-
# The flag to indicate whether the direct token endpoint
|
222
|
-
# is enabled or not. The path of the endpoint is
|
223
|
-
# <code>/api/auth/token/direct/{serviceApiKey}</code>.
|
224
|
-
# (Boolean)
|
225
|
-
attr_accessor :directTokenEndpointEnabled
|
226
|
-
alias_method :direct_token_endpoint_enabled, :directTokenEndpointEnabled
|
227
|
-
alias_method :direct_token_endpoint_enabled=, :directTokenEndpointEnabled=
|
228
|
-
|
229
|
-
# The flag to indicate whether the direct user info endpoint
|
230
|
-
# is enabled or not. The path of the endpoint is
|
231
|
-
# <code>/api/auth/userinfo/direct/{serviceApiKey}</code>.
|
232
|
-
# (Boolean)
|
233
|
-
attr_accessor :directUserInfoEndpointEnabled
|
234
|
-
alias_method :direct_user_info_endpoint_enabled, :directUserInfoEndpointEnabled
|
235
|
-
alias_method :direct_user_info_endpoint_enabled=, :directUserInfoEndpointEnabled=
|
236
|
-
|
237
|
-
# The flag to indicate whether the <code>error_description</code>
|
238
|
-
# response parameter is omitted. (Boolean)
|
239
|
-
attr_accessor :errorDescriptionOmitted
|
240
|
-
alias_method :error_description_omitted, :errorDescriptionOmitted
|
241
|
-
alias_method :error_description_omitted=, :errorDescriptionOmitted=
|
242
|
-
|
243
|
-
# The flag to indicate whether the <code>error_uri</code>
|
244
|
-
# response parameter is omitted. (Boolean)
|
245
|
-
attr_accessor :errorUriOmitted
|
246
|
-
alias_method :error_uri_omitted, :errorUriOmitted
|
247
|
-
alias_method :error_uri_omitted=, :errorUriOmitted=
|
248
|
-
|
249
|
-
# The duration of ID tokens in seconds. (Integer)
|
250
|
-
attr_accessor :idTokenDuration
|
251
|
-
alias_method :id_token_duration, :idTokenDuration
|
252
|
-
alias_method :id_token_duration=, :idTokenDuration=
|
253
|
-
|
254
|
-
# The key ID to identify a JWK used for ID token signature using an
|
255
|
-
# asymmetric key. (String)
|
256
|
-
attr_accessor :idTokenSignatureKeyId
|
257
|
-
alias_method :id_token_signature_key_id, :idTokenSignatureKeyId
|
258
|
-
alias_method :id_token_signature_key_id=, :idTokenSignatureKeyId=
|
259
|
-
|
260
|
-
# The URI of the introspection endpoint. (String)
|
261
|
-
attr_accessor :introspectionEndpoint
|
262
|
-
alias_method :introspection_endpoint, :introspectionEndpoint
|
263
|
-
alias_method :introspection_endpoint=, :introspectionEndpoint=
|
264
|
-
|
265
|
-
# The issuer identifier of this OpenID Provider. (String)
|
266
|
-
attr_accessor :issuer
|
267
|
-
|
268
|
-
# The JSON Web Key Set of this service. (String)
|
269
|
-
attr_accessor :jwks
|
270
|
-
|
271
|
-
# The URI of the service's JSON Web Key Set. (String)
|
272
|
-
attr_accessor :jwksUri
|
273
|
-
alias_method :jwks_uri, :jwksUri
|
274
|
-
alias_method :jwks_uri=, :jwksUri=
|
275
|
-
|
276
|
-
# The metadata of the service. (Pair Array)
|
277
|
-
attr_accessor :metadata
|
278
|
-
|
279
|
-
# The timestamp at which the service was modified. (Integer)
|
280
|
-
attr_accessor :modifiedAt
|
281
|
-
alias_method :modified_at, :modifiedAt
|
282
|
-
alias_method :modified_at=, :modifiedAt=
|
283
|
-
|
284
|
-
# The flag that indicates whether the service will validate the PKI certificate chain
|
285
|
-
# for MTLS based authentication. (Boolean)
|
286
|
-
attr_accessor :mutualTlsValidatePkiCertChain
|
287
|
-
alias_method :mutual_tls_validate_pki_cert_chain, :mutualTlsValidatePkiCertChain
|
288
|
-
alias_method :mutual_tls_validate_pki_cert_chain=, :mutualTlsValidatePkiCertChain=
|
289
|
-
|
290
|
-
# The service number. (Integer)
|
291
|
-
attr_accessor :number
|
292
|
-
|
293
|
-
# The flag to indicate whether the use of Proof Key for Code
|
294
|
-
# Exchange (PKCE) is always required for authorization requests
|
295
|
-
# Authorization Code Flow.
|
296
|
-
# (Boolean)
|
297
|
-
attr_accessor :pkceRequired
|
298
|
-
alias_method :pkce_required, :pkceRequired
|
299
|
-
alias_method :pkce_required=, :pkceRequired=
|
300
|
-
|
301
|
-
# The flag indicating whether S256 is required as the code challenge
|
302
|
-
# method whenever PKCE is used. (Boolean)
|
303
|
-
attr_accessor :pkceS256Required
|
304
|
-
alias_method :pkce_s256_required, :pkceS256Required
|
305
|
-
alias_method :pkce_s256_required=, :pkceS256Required=
|
306
|
-
|
307
|
-
# The URI of the service's policy page. (String)
|
308
|
-
attr_accessor :policyUri
|
309
|
-
alias_method :policy_uri, :policyUri
|
310
|
-
alias_method :policy_uri=, :policyUri=
|
311
|
-
|
312
|
-
# The duration of refresh tokens in seconds. (Integer)
|
313
|
-
attr_accessor :refreshTokenDuration
|
314
|
-
alias_method :refresh_token_duration, :refreshTokenDuration
|
315
|
-
alias_method :refresh_token_duration=, :refreshTokenDuration=
|
316
|
-
|
317
|
-
# The flag to indicate whether a refresh token remains unchanged
|
318
|
-
# or gets renewed after its use.
|
319
|
-
# (Boolean)
|
320
|
-
attr_accessor :refreshTokenKept
|
321
|
-
alias_method :refresh_token_kept, :refreshTokenKept
|
322
|
-
alias_method :refresh_token_kept=, :refreshTokenKept=
|
323
|
-
|
324
|
-
# The URI of the registration endpoint. (String)
|
325
|
-
attr_accessor :registrationEndpoint
|
326
|
-
alias_method :registration_endpoint, :registrationEndpoint
|
327
|
-
alias_method :registration_endpoint=, :registrationEndpoint=
|
328
|
-
|
329
|
-
# The URI of the token revocation endpoint. (String)
|
330
|
-
attr_accessor :revocationEndpoint
|
331
|
-
alias_method :revocation_endpoint, :revocationEndpoint
|
332
|
-
alias_method :revocation_endpoint=, :revocationEndpoint=
|
333
|
-
|
334
|
-
# The URI of the service's documentation. (String)
|
335
|
-
attr_accessor :serviceDocumentation
|
336
|
-
alias_method :service_documentation, :serviceDocumentation
|
337
|
-
alias_method :service_documentation=, :serviceDocumentation=
|
338
|
-
|
339
|
-
# The service name. (String)
|
340
|
-
attr_accessor :serviceName
|
341
|
-
alias_method :service_name, :serviceName
|
342
|
-
alias_method :service_name=, :serviceName=
|
343
|
-
|
344
|
-
# The service owner number. (Integer)
|
345
|
-
attr_accessor :serviceOwnerNumber
|
346
|
-
alias_method :service_owner_number, :serviceOwnerNumber
|
347
|
-
alias_method :service_owner_number=, :serviceOwnerNumber=
|
348
|
-
|
349
|
-
# The flag to indicate whether the number of access tokens
|
350
|
-
# per subject (and per client) is at most one or can be more. (Boolean)
|
351
|
-
attr_accessor :singleAccessTokenPerSubject
|
352
|
-
alias_method :single_access_token_per_subject, :singleAccessTokenPerSubject
|
353
|
-
alias_method :single_access_token_per_subject=, :singleAccessTokenPerSubject=
|
354
|
-
|
355
|
-
# The list of SNS credentials. (SnsCredentials array)
|
356
|
-
attr_accessor :snsCredentials
|
357
|
-
alias_method :sns_credentials, :snsCredentials
|
358
|
-
alias_method :sns_credentials=, :snsCredentials=
|
359
|
-
|
360
|
-
# The list of supported ACRs. (String array)
|
361
|
-
attr_accessor :supportedAcrs
|
362
|
-
alias_method :supported_acrs, :supportedAcrs
|
363
|
-
alias_method :supported_acrs=, :supportedAcrs=
|
364
|
-
|
365
|
-
# The list of supported claim locales. (String array)
|
366
|
-
attr_accessor :supportedClaimLocales
|
367
|
-
alias_method :supported_claim_locales, :supportedClaimLocales
|
368
|
-
alias_method :supported_claim_locales=, :supportedClaimLocales=
|
369
|
-
|
370
|
-
# The list of supported claims. (String array)
|
371
|
-
attr_accessor :supportedClaims
|
372
|
-
alias_method :supported_claims, :supportedClaims
|
373
|
-
alias_method :supported_claims=, :supportedClaims=
|
374
|
-
|
375
|
-
# The list of supported claim types. (String array)
|
376
|
-
#
|
377
|
-
# Valid values are "NORMAL", "AGGREGATED" and "DISTRIBUTED".
|
378
|
-
attr_accessor :supportedClaimTypes
|
379
|
-
alias_method :supported_claim_types, :supportedClaimTypes
|
380
|
-
alias_method :supported_claim_types=, :supportedClaimTypes=
|
381
|
-
|
382
|
-
# The list of supported SNSes for developer login. (Sns array)
|
383
|
-
attr_accessor :supportedDeveloperSnses
|
384
|
-
alias_method :supported_developer_snses, :supportedDeveloperSnses
|
385
|
-
alias_method :supported_developer_snses=, :supportedDeveloperSnses=
|
386
|
-
|
387
|
-
# The list of supported values of +display+ parameter. (String array)
|
388
|
-
#
|
389
|
-
# Valid values are "PAGE", "POPUP", "TOUCH" and "WAP".
|
390
|
-
attr_accessor :supportedDisplays
|
391
|
-
alias_method :supported_displays, :supportedDisplays
|
392
|
-
alias_method :supported_displays=, :supportedDisplays=
|
393
|
-
|
394
|
-
# The list of supported grant types. (String array)
|
395
|
-
#
|
396
|
-
# Valid values are "AUTHORIZATION_CODE", "IMPLICIT", "PASSWORD",
|
397
|
-
# "CLIENT_CREDENTIALS" and "REFRESH_TOKEN".
|
398
|
-
attr_accessor :supportedGrantTypes
|
399
|
-
alias_method :supported_grant_types, :supportedGrantTypes
|
400
|
-
alias_method :supported_grant_types=, :supportedGrantTypes=
|
401
|
-
|
402
|
-
# The list of supported response types. (String array)
|
403
|
-
#
|
404
|
-
# Valid values are "NONE", "CODE", "TOKEN", "ID_TOKEN",
|
405
|
-
# "CODE_TOKEN", "CODE_ID_TOKEN", "ID_TOKEN_TOKEN" and
|
406
|
-
# "CODE_ID_TOKEN_TOKEN".
|
407
|
-
attr_accessor :supportedResponseTypes
|
408
|
-
alias_method :supported_response_types, :supportedResponseTypes
|
409
|
-
alias_method :supported_response_types=, :supportedResponseTypes=
|
410
|
-
|
411
|
-
# The list of supported scopes. (Scope array)
|
412
|
-
attr_accessor :supportedScopes
|
413
|
-
alias_method :supported_scopes, :supportedScopes
|
414
|
-
alias_method :supported_scopes=, :supportedScopes=
|
415
|
-
|
416
|
-
# The list of supported service profiles. (String array)
|
417
|
-
attr_accessor :supportedServiceProfiles
|
418
|
-
alias_method :supported_service_profiles, :supportedServiceProfiles
|
419
|
-
alias_method :supported_service_profiles=, :supportedServiceProfiles=
|
420
|
-
|
421
|
-
# The list of supported SNSes. (Sns array)
|
422
|
-
attr_accessor :supportedSnses
|
423
|
-
alias_method :supported_snses, :supportedSnses
|
424
|
-
alias_method :supported_snses=, :supportedSnses=
|
425
|
-
|
426
|
-
# The list of supported client authentication methods at the token endpoint. (String array)
|
427
|
-
#
|
428
|
-
# Valid values are "NONE", "CLIENT_SECRET_BASIC", "CLIENT_SECRET_POST",
|
429
|
-
# "CLIENT_SECRET_JWT" and "PRIVATE_KEY_JWT".
|
430
|
-
attr_accessor :supportedTokenAuthMethods
|
431
|
-
alias_method :supported_token_auth_methods, :supportedTokenAuthMethods
|
432
|
-
alias_method :supported_token_auth_methods=, :supportedTokenAuthMethods=
|
433
|
-
|
434
|
-
# The list of supported backchannel token delivery modes. (String array)
|
435
|
-
# Valid values are "POLL", "PING" and "PUSH".
|
436
|
-
attr_accessor :supportedBackchannelTokenDeliveryModes
|
437
|
-
alias_method :supported_backchannel_token_delivery_modes, :supportedBackchannelTokenDeliveryModes
|
438
|
-
alias_method :supported_backchannel_token_delivery_modes=, :supportedBackchannelTokenDeliveryModes=
|
439
|
-
|
440
|
-
# The list of supported UI locales. (String array)
|
441
|
-
attr_accessor :supportedUiLocales
|
442
|
-
alias_method :supported_ui_locales, :supportedUiLocales
|
443
|
-
alias_method :supported_ui_locales=, :supportedUiLocales=
|
444
|
-
|
445
|
-
# The flag that indicates whether the service offers TLS client certificate
|
446
|
-
# bound access tokens (Boolean)
|
447
|
-
attr_accessor :tlsClientCertificateBoundAccessTokens
|
448
|
-
alias_method :tls_client_certificate_bound_access_tokens, :tlsClientCertificateBoundAccessTokens
|
449
|
-
alias_method :tls_client_certificate_bound_access_tokens=, :tlsClientCertificateBoundAccessTokens=
|
450
|
-
|
451
|
-
# The URI of the token endpoint. (String)
|
452
|
-
attr_accessor :tokenEndpoint
|
453
|
-
alias_method :token_endpoint, :tokenEndpoint
|
454
|
-
alias_method :token_endpoint=, :tokenEndpoint=
|
455
|
-
|
456
|
-
# The URI of the service's "Terms Of Service" page. (String)
|
457
|
-
attr_accessor :tosUri
|
458
|
-
alias_method :tos_uri, :tosUri
|
459
|
-
alias_method :tos_uri=, :tosUri=
|
460
|
-
|
461
|
-
# The list of trusted root certificates, used when the service validates client
|
462
|
-
# certificate paths. (String array)
|
463
|
-
attr_accessor :trustedRootCertificates
|
464
|
-
alias_method :trusted_root_certificates, :trustedRootCertificates
|
465
|
-
alias_method :trusted_root_certificates=, :trustedRootCertificates=
|
466
|
-
|
467
|
-
# The character set for user codes. (String)
|
468
|
-
attr_accessor :userCodeCharset
|
469
|
-
alias_method :user_code_charset, :userCodeCharset
|
470
|
-
alias_method :user_code_charset=, :userCodeCharset=
|
471
|
-
|
472
|
-
# The length of user codes. (Integer)
|
473
|
-
attr_accessor :userCodeLength
|
474
|
-
alias_method :user_code_length, :userCodeLength
|
475
|
-
alias_method :user_code_length=, :userCodeLength=
|
476
|
-
|
477
|
-
# The URI of user info endpoint. (String)
|
478
|
-
attr_accessor :userInfoEndpoint
|
479
|
-
alias_method :user_info_endpoint, :userInfoEndpoint
|
480
|
-
alias_method :user_info_endpoint=, :userInfoEndpoint=
|
481
|
-
|
482
|
-
# The key ID to identify a JWK used for user info signature using an
|
483
|
-
# asymmetric key. (String)
|
484
|
-
attr_accessor :userInfoSignatureKeyId
|
485
|
-
alias_method :user_info_signature_key_id, :userInfoSignatureKeyId
|
486
|
-
alias_method :user_info_signature_key_id=, :userInfoSignatureKeyId=
|
487
|
-
|
488
|
-
# Flag of whether this service supports dynamic client registration.
|
489
|
-
# (Boolean)
|
490
|
-
attr_accessor :dynamicRegistrationSupported
|
491
|
-
alias_method :dynamic_registration_supported, :dynamicRegistrationSupported
|
492
|
-
alias_method :dynamic_registration_supported=, :dynamicRegistrationSupported=
|
493
|
-
|
494
|
-
# The base URI of the service's "Dynamic Client Registration Management"
|
495
|
-
# endpoint. Client management URIs will be based on this by adding the
|
496
|
-
# client ID as a path component. (String)
|
497
|
-
attr_accessor :registrationManagementEndpoint
|
498
|
-
alias_method :registration_management_endpoint, :registrationManagementEndpoint
|
499
|
-
alias_method :registration_management_endpoint=, :registrationManagementEndpoint=
|
500
|
-
|
501
|
-
# The URI of request object endpoint. (String)
|
502
|
-
attr_accessor :requestObjectEndpoint
|
503
|
-
alias_method :request_object_endpoint, :requestObjectEndpoint
|
504
|
-
alias_method :request_object_endpoint=, :requestObjectEndpoint=
|
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
|
-
|
526
|
-
|
527
|
-
|
528
|
-
#
|
529
|
-
|
530
|
-
|
531
|
-
|
532
|
-
|
533
|
-
|
534
|
-
|
535
|
-
|
536
|
-
|
537
|
-
|
538
|
-
|
539
|
-
|
540
|
-
|
541
|
-
|
542
|
-
|
543
|
-
|
544
|
-
|
545
|
-
|
546
|
-
|
547
|
-
|
548
|
-
|
549
|
-
#
|
550
|
-
|
551
|
-
|
552
|
-
|
553
|
-
|
554
|
-
|
555
|
-
|
556
|
-
|
557
|
-
|
558
|
-
|
559
|
-
|
560
|
-
|
561
|
-
|
562
|
-
|
563
|
-
|
564
|
-
|
565
|
-
|
566
|
-
|
567
|
-
|
568
|
-
|
569
|
-
|
570
|
-
|
571
|
-
|
572
|
-
|
573
|
-
#
|
574
|
-
|
575
|
-
|
576
|
-
|
577
|
-
|
578
|
-
|
579
|
-
|
580
|
-
|
581
|
-
|
582
|
-
|
583
|
-
:
|
584
|
-
:
|
585
|
-
:
|
586
|
-
:
|
587
|
-
:
|
588
|
-
|
589
|
-
|
590
|
-
|
591
|
-
|
592
|
-
:
|
593
|
-
:
|
594
|
-
:
|
595
|
-
:
|
596
|
-
:
|
597
|
-
:
|
598
|
-
:
|
599
|
-
:
|
600
|
-
:
|
601
|
-
|
602
|
-
|
603
|
-
|
604
|
-
|
605
|
-
:
|
606
|
-
:
|
607
|
-
:
|
608
|
-
:
|
609
|
-
:
|
610
|
-
:
|
611
|
-
:
|
612
|
-
:
|
613
|
-
:
|
614
|
-
:
|
615
|
-
:
|
616
|
-
|
617
|
-
|
618
|
-
|
619
|
-
|
620
|
-
:
|
621
|
-
:
|
622
|
-
:
|
623
|
-
:
|
624
|
-
:
|
625
|
-
:
|
626
|
-
:
|
627
|
-
|
628
|
-
|
629
|
-
|
630
|
-
|
631
|
-
:
|
632
|
-
|
633
|
-
|
634
|
-
|
635
|
-
|
636
|
-
:
|
637
|
-
:
|
638
|
-
:
|
639
|
-
:
|
640
|
-
:
|
641
|
-
:
|
642
|
-
:
|
643
|
-
:
|
644
|
-
:
|
645
|
-
:
|
646
|
-
:
|
647
|
-
:
|
648
|
-
:
|
649
|
-
:
|
650
|
-
:
|
651
|
-
:
|
652
|
-
:
|
653
|
-
:
|
654
|
-
:
|
655
|
-
:
|
656
|
-
:
|
657
|
-
:
|
658
|
-
:
|
659
|
-
:
|
660
|
-
:
|
661
|
-
:
|
662
|
-
:
|
663
|
-
:
|
664
|
-
:
|
665
|
-
|
666
|
-
|
667
|
-
|
668
|
-
|
669
|
-
|
670
|
-
|
671
|
-
|
672
|
-
|
673
|
-
|
674
|
-
|
675
|
-
|
676
|
-
|
677
|
-
|
678
|
-
|
679
|
-
|
680
|
-
|
681
|
-
|
682
|
-
|
683
|
-
|
684
|
-
|
685
|
-
|
686
|
-
|
687
|
-
|
688
|
-
|
689
|
-
|
690
|
-
|
691
|
-
|
692
|
-
|
693
|
-
|
694
|
-
|
695
|
-
|
696
|
-
|
697
|
-
|
698
|
-
|
699
|
-
|
700
|
-
|
701
|
-
|
702
|
-
|
703
|
-
|
704
|
-
|
705
|
-
|
706
|
-
|
707
|
-
|
708
|
-
|
709
|
-
|
710
|
-
|
711
|
-
|
712
|
-
|
713
|
-
|
714
|
-
|
715
|
-
|
716
|
-
|
717
|
-
|
718
|
-
|
719
|
-
|
720
|
-
|
721
|
-
|
722
|
-
|
723
|
-
|
724
|
-
|
725
|
-
|
726
|
-
|
727
|
-
|
728
|
-
|
729
|
-
|
730
|
-
|
731
|
-
|
732
|
-
|
733
|
-
|
734
|
-
|
735
|
-
|
736
|
-
|
737
|
-
|
738
|
-
|
739
|
-
|
740
|
-
|
741
|
-
|
742
|
-
|
743
|
-
|
744
|
-
|
745
|
-
|
746
|
-
|
747
|
-
|
748
|
-
|
749
|
-
|
750
|
-
|
751
|
-
|
752
|
-
|
753
|
-
|
754
|
-
|
755
|
-
|
756
|
-
|
757
|
-
|
758
|
-
|
759
|
-
|
760
|
-
|
761
|
-
|
762
|
-
|
763
|
-
|
764
|
-
|
765
|
-
|
766
|
-
|
767
|
-
|
768
|
-
|
769
|
-
|
770
|
-
|
771
|
-
|
772
|
-
|
773
|
-
|
774
|
-
|
775
|
-
|
776
|
-
|
777
|
-
|
778
|
-
|
779
|
-
|
780
|
-
|
781
|
-
|
782
|
-
|
783
|
-
|
784
|
-
|
785
|
-
|
786
|
-
|
787
|
-
|
1
|
+
# :nodoc:
|
2
|
+
#
|
3
|
+
# Copyright (C) 2014-2019 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 Service < Authlete::Model::Hashable
|
24
|
+
include Authlete::Utility
|
25
|
+
# The duration of access tokens in seconds. (Integer)
|
26
|
+
attr_accessor :accessTokenDuration
|
27
|
+
alias_method :access_token_duration, :accessTokenDuration
|
28
|
+
alias_method :access_token_duration=, :accessTokenDuration=
|
29
|
+
|
30
|
+
# The signature algorithm for access tokens. (String)
|
31
|
+
attr_accessor :accessTokenSignAlg
|
32
|
+
alias_method :access_token_sign_alg, :accessTokenSignAlg
|
33
|
+
alias_method :access_token_sign_alg=, :accessTokenSignAlg=
|
34
|
+
|
35
|
+
# The key ID to identify a JWK used for signing access tokens. (String)
|
36
|
+
attr_accessor :accessTokenSignatureKeyId
|
37
|
+
alias_method :access_token_signature_key_id, :accessTokenSignatureKeyId
|
38
|
+
alias_method :access_token_signature_key_id=, :accessTokenSignatureKeyId=
|
39
|
+
|
40
|
+
# The access token type. (String)
|
41
|
+
attr_accessor :accessTokenType
|
42
|
+
alias_method :access_token_type, :accessTokenType
|
43
|
+
alias_method :access_token_type=, :accessTokenType=
|
44
|
+
|
45
|
+
# The allowable clock skew between the server and clients in seconds.
|
46
|
+
# The clock skew is taken into consideration when time-related claims
|
47
|
+
# in a JWT (e.g. +exp+, +iat+, +nbf+) are verified. (Integer)
|
48
|
+
attr_accessor :allowableClockSkew
|
49
|
+
alias_method :allowable_clock_skew, :allowableClockSkew
|
50
|
+
alias_method :allowable_clock_skew=, :allowableClockSkew=
|
51
|
+
|
52
|
+
# The API key. (Integer)
|
53
|
+
attr_accessor :apiKey
|
54
|
+
alias_method :api_key, :apiKey
|
55
|
+
alias_method :api_key=, :apiKey=
|
56
|
+
|
57
|
+
# The API secret. (String)
|
58
|
+
attr_accessor :apiSecret
|
59
|
+
alias_method :api_secret, :apiSecret
|
60
|
+
alias_method :api_secret=, :apiSecret=
|
61
|
+
|
62
|
+
# The API key to access the authentication callback endpoint. (String)
|
63
|
+
attr_accessor :authenticationCallbackApiKey
|
64
|
+
alias_method :authentication_callback_api_key, :authenticationCallbackApiKey
|
65
|
+
alias_method :authentication_callback_api_key=, :authenticationCallbackApiKey=
|
66
|
+
|
67
|
+
# The API secret to access the authentication callback endpoint. (String)
|
68
|
+
attr_accessor :authenticationCallbackApiSecret
|
69
|
+
alias_method :authentication_callback_api_secret, :authenticationCallbackApiSecret
|
70
|
+
alias_method :authentication_callback_api_secret=, :authenticationCallbackApiSecret=
|
71
|
+
|
72
|
+
# The URI of the authentication callback endpoint. (String)
|
73
|
+
attr_accessor :authenticationCallbackEndpoint
|
74
|
+
alias_method :authentication_callback_endpoint, :authenticationCallbackEndpoint
|
75
|
+
alias_method :authentication_callback_endpoint=, :authenticationCallbackEndpoint=
|
76
|
+
|
77
|
+
# The URI of the authorization endpoint. (String)
|
78
|
+
attr_accessor :authorizationEndpoint
|
79
|
+
alias_method :authorization_endpoint, :authorizationEndpoint
|
80
|
+
alias_method :authorization_endpoint=, :authorizationEndpoint=
|
81
|
+
|
82
|
+
# The duration of access tokens in seconds; the value of +expires_in+
|
83
|
+
# in access token responses. (Integer)
|
84
|
+
attr_accessor :authorizationResponseDuration
|
85
|
+
alias_method :authorization_response_duration, :authorizationResponseDuration
|
86
|
+
alias_method :authorization_response_duration=, :authorizationResponseDuration=
|
87
|
+
|
88
|
+
# The key ID to identify a JWK used for signing authorization responses
|
89
|
+
# using an asymmetric key. (String)
|
90
|
+
attr_accessor :authorizationSignatureKeyId
|
91
|
+
alias_method :authorization_signature_key_id, :authorizationSignatureKeyId
|
92
|
+
alias_method :authorization_signature_key_id=, :authorizationSignatureKeyId=
|
93
|
+
|
94
|
+
# The URI of the backchannel authentication endpoint. (String)
|
95
|
+
attr_accessor :backchannelAuthenticationEndpoint
|
96
|
+
alias_method :backchannel_authentication_endpoint, :backchannelAuthenticationEndpoint
|
97
|
+
alias_method :backchannel_authentication_endpoint=, :backchannelAuthenticationEndpoint=
|
98
|
+
|
99
|
+
# The duration of backchannel authentication request IDs in seconds.
|
100
|
+
# (Integer)
|
101
|
+
attr_accessor :backchannelAuthReqIdDuration
|
102
|
+
alias_method :backchannel_auth_req_id_duration, :backchannelAuthReqIdDuration
|
103
|
+
alias_method :backchannel_auth_req_id_duration=, :backchannelAuthReqIdDuration=
|
104
|
+
|
105
|
+
# The flag indicating whether the +binding_message+ request parameter
|
106
|
+
# is always required whenever a backchannel authentication request is
|
107
|
+
# judged as a request for Financial-grade API. (Boolean)
|
108
|
+
attr_accessor :backchannelBindingMessageRequiredInFapi
|
109
|
+
alias_method :backchannel_binding_message_required_in_fapi, :backchannelBindingMessageRequiredInFapi
|
110
|
+
alias_method :backchannel_binding_message_required_in_fapi=, :backchannelBindingMessageRequiredInFapi=
|
111
|
+
|
112
|
+
# The minimum interval between polling requests in seconds. (Integer)
|
113
|
+
attr_accessor :backchannelPollingInterval
|
114
|
+
alias_method :backchannel_polling_interval, :backchannelPollingInterval
|
115
|
+
alias_method :backchannel_polling_interval=, :backchannelPollingInterval=
|
116
|
+
|
117
|
+
# The flag which indicates whether the +user_code+ request parameter
|
118
|
+
# is supported at the backchannel authentication endpoint. (Boolean)
|
119
|
+
attr_accessor :backchannelUserCodeParameterSupported
|
120
|
+
alias_method :backchannel_user_code_parameter_supported, :backchannelUserCodeParameterSupported
|
121
|
+
alias_method :backchannel_user_code_parameter_supported=, :backchannelUserCodeParameterSupported=
|
122
|
+
|
123
|
+
# The flag which indicates whether the 'Client ID Alias' feature
|
124
|
+
# is enabled or not. (Boolean)
|
125
|
+
attr_accessor :clientIdAliasEnabled
|
126
|
+
alias_method :client_id_alias_enabled, :clientIdAliasEnabled
|
127
|
+
alias_method :client_id_alias_enabled=, :clientIdAliasEnabled=
|
128
|
+
|
129
|
+
# The number of client applications that one developer can create.
|
130
|
+
# 0 means no limit. (Integer)
|
131
|
+
attr_accessor :clientsPerDeveloper
|
132
|
+
alias_method :clients_per_developer, :clientsPerDeveloper
|
133
|
+
alias_method :clients_per_developer=, :clientsPerDeveloper=
|
134
|
+
|
135
|
+
# The timestamp at which the service was created. (Integer)
|
136
|
+
attr_accessor :createdAt
|
137
|
+
alias_method :created_at, :createdAt
|
138
|
+
alias_method :created_at=, :createdAt=
|
139
|
+
|
140
|
+
# The description of this service. (String)
|
141
|
+
attr_accessor :description
|
142
|
+
|
143
|
+
# The API key to access the developer authentication callback endpoint. (String)
|
144
|
+
attr_accessor :developerAuthenticationCallbackApiKey
|
145
|
+
alias_method :developer_authentication_callback_api_key, :developerAuthenticationCallbackApiKey
|
146
|
+
alias_method :developer_authentication_callback_api_key=, :developerAuthenticationCallbackApiKey=
|
147
|
+
|
148
|
+
# The API secret to access the developer authentication callback endpoint. (String)
|
149
|
+
attr_accessor :developerAuthenticationCallbackApiSecret
|
150
|
+
alias_method :developer_authentication_callback_api_secret, :developerAuthenticationCallbackApiSecret
|
151
|
+
alias_method :developer_authentication_callback_api_secret=, :developerAuthenticationCallbackApiSecret=
|
152
|
+
|
153
|
+
# The URI of the developer authentication callback endpoint. (String)
|
154
|
+
attr_accessor :developerAuthenticationCallbackEndpoint
|
155
|
+
alias_method :developer_authentication_callback_endpoint, :developerAuthenticationCallbackEndpoint
|
156
|
+
alias_method :developer_authentication_callback_endpoint=, :developerAuthenticationCallbackEndpoint=
|
157
|
+
|
158
|
+
# The list of SNS credentials for developer login. (SnsCredentials array)
|
159
|
+
attr_accessor :developerSnsCredentials
|
160
|
+
alias_method :developer_sns_credentials, :developerSnsCredentials
|
161
|
+
alias_method :developer_sns_credentials=, :developerSnsCredentials=
|
162
|
+
|
163
|
+
# The URI of the device authorization endpoint. (String)
|
164
|
+
attr_accessor :deviceAuthorizationEndpoint
|
165
|
+
alias_method :device_authorization_endpoint, :deviceAuthorizationEndpoint
|
166
|
+
alias_method :device_authorization_endpoint=, :deviceAuthorizationEndpoint=
|
167
|
+
|
168
|
+
# The duration of device verification codes (device_code) and
|
169
|
+
# end-user verification codes (user_code) in seconds. (Integer)
|
170
|
+
attr_accessor :deviceFlowCodeDuration
|
171
|
+
alias_method :device_flow_code_duration, :deviceFlowCodeDuration
|
172
|
+
alias_method :device_flow_code_duration=, :deviceFlowCodeDuration=
|
173
|
+
|
174
|
+
# The minimum interval between polling requests in Device Flow in seconds. (Integer)
|
175
|
+
attr_accessor :deviceFlowPollingInterval
|
176
|
+
alias_method :device_flow_polling_interval, :deviceFlowPollingInterval
|
177
|
+
alias_method :device_flow_polling_interval=, :deviceFlowPollingInterval=
|
178
|
+
|
179
|
+
# The verification URI for Device Flow. (String)
|
180
|
+
attr_accessor :deviceVerificationUri
|
181
|
+
alias_method :device_verification_uri, :deviceVerificationUri
|
182
|
+
alias_method :device_verification_uri=, :deviceVerificationUri=
|
183
|
+
|
184
|
+
# The verification URI for Device Flow with a placeholder for a user code. (String)
|
185
|
+
attr_accessor :deviceVerificationUriComplete
|
186
|
+
alias_method :device_verification_uri_complete, :deviceVerificationUriComplete
|
187
|
+
alias_method :device_verification_uri_complete=, :deviceVerificationUriComplete=
|
188
|
+
|
189
|
+
# The flag to indicate whether the direct authorization endpoint
|
190
|
+
# is enabled or not. The path of the endpoint is
|
191
|
+
# <code>/api/auth/authorization/direct/{serviceApiKey}</code>.
|
192
|
+
# (Boolean)
|
193
|
+
attr_accessor :directAuthorizationEndpointEnabled
|
194
|
+
alias_method :direct_authorization_endpoint_enabled, :directAuthorizationEndpointEnabled
|
195
|
+
alias_method :direct_authorization_endpoint_enabled=, :directAuthorizationEndpointEnabled=
|
196
|
+
|
197
|
+
# The flag to indicate whether the direct introspection endpoint
|
198
|
+
# is enabled or not. The path of the endpoint is
|
199
|
+
# <code>/api/auth/introspection/direct/{serviceApiKey}</code>.
|
200
|
+
# (Boolean)
|
201
|
+
attr_accessor :directIntrospectionEndpointEnabled
|
202
|
+
alias_method :direct_introspection_endpoint_enabled, :directIntrospectionEndpointEnabled
|
203
|
+
alias_method :direct_introspection_endpoint_enabled=, :directIntrospectionEndpointEnabled=
|
204
|
+
|
205
|
+
# The flag to indicate whether the direct jwks endpoint
|
206
|
+
# is enabled or not. The path of the endpoint is
|
207
|
+
# <code>/api/service/jwks/get/direct/{serviceApiKey}</code>.
|
208
|
+
# (Boolean)
|
209
|
+
attr_accessor :directJwksEndpointEnabled
|
210
|
+
alias_method :direct_jwks_endpoint_enabled, :directJwksEndpointEnabled
|
211
|
+
alias_method :direct_jwks_endpoint_enabled=, :directJwksEndpointEnabled=
|
212
|
+
|
213
|
+
# The flag to indicate whether the direct revocation endpoint
|
214
|
+
# is enabled or not. The path of the endpoint is
|
215
|
+
# <code>/api/auth/revocation/direct/{serviceApiKey}</code>.
|
216
|
+
# (Boolean)
|
217
|
+
attr_accessor :directRevocationEndpointEnabled
|
218
|
+
alias_method :direct_revocation_endpoint_enabled, :directRevocationEndpointEnabled
|
219
|
+
alias_method :direct_revocation_endpoint_enabled=, :directRevocationEndpointEnabled=
|
220
|
+
|
221
|
+
# The flag to indicate whether the direct token endpoint
|
222
|
+
# is enabled or not. The path of the endpoint is
|
223
|
+
# <code>/api/auth/token/direct/{serviceApiKey}</code>.
|
224
|
+
# (Boolean)
|
225
|
+
attr_accessor :directTokenEndpointEnabled
|
226
|
+
alias_method :direct_token_endpoint_enabled, :directTokenEndpointEnabled
|
227
|
+
alias_method :direct_token_endpoint_enabled=, :directTokenEndpointEnabled=
|
228
|
+
|
229
|
+
# The flag to indicate whether the direct user info endpoint
|
230
|
+
# is enabled or not. The path of the endpoint is
|
231
|
+
# <code>/api/auth/userinfo/direct/{serviceApiKey}</code>.
|
232
|
+
# (Boolean)
|
233
|
+
attr_accessor :directUserInfoEndpointEnabled
|
234
|
+
alias_method :direct_user_info_endpoint_enabled, :directUserInfoEndpointEnabled
|
235
|
+
alias_method :direct_user_info_endpoint_enabled=, :directUserInfoEndpointEnabled=
|
236
|
+
|
237
|
+
# The flag to indicate whether the <code>error_description</code>
|
238
|
+
# response parameter is omitted. (Boolean)
|
239
|
+
attr_accessor :errorDescriptionOmitted
|
240
|
+
alias_method :error_description_omitted, :errorDescriptionOmitted
|
241
|
+
alias_method :error_description_omitted=, :errorDescriptionOmitted=
|
242
|
+
|
243
|
+
# The flag to indicate whether the <code>error_uri</code>
|
244
|
+
# response parameter is omitted. (Boolean)
|
245
|
+
attr_accessor :errorUriOmitted
|
246
|
+
alias_method :error_uri_omitted, :errorUriOmitted
|
247
|
+
alias_method :error_uri_omitted=, :errorUriOmitted=
|
248
|
+
|
249
|
+
# The duration of ID tokens in seconds. (Integer)
|
250
|
+
attr_accessor :idTokenDuration
|
251
|
+
alias_method :id_token_duration, :idTokenDuration
|
252
|
+
alias_method :id_token_duration=, :idTokenDuration=
|
253
|
+
|
254
|
+
# The key ID to identify a JWK used for ID token signature using an
|
255
|
+
# asymmetric key. (String)
|
256
|
+
attr_accessor :idTokenSignatureKeyId
|
257
|
+
alias_method :id_token_signature_key_id, :idTokenSignatureKeyId
|
258
|
+
alias_method :id_token_signature_key_id=, :idTokenSignatureKeyId=
|
259
|
+
|
260
|
+
# The URI of the introspection endpoint. (String)
|
261
|
+
attr_accessor :introspectionEndpoint
|
262
|
+
alias_method :introspection_endpoint, :introspectionEndpoint
|
263
|
+
alias_method :introspection_endpoint=, :introspectionEndpoint=
|
264
|
+
|
265
|
+
# The issuer identifier of this OpenID Provider. (String)
|
266
|
+
attr_accessor :issuer
|
267
|
+
|
268
|
+
# The JSON Web Key Set of this service. (String)
|
269
|
+
attr_accessor :jwks
|
270
|
+
|
271
|
+
# The URI of the service's JSON Web Key Set. (String)
|
272
|
+
attr_accessor :jwksUri
|
273
|
+
alias_method :jwks_uri, :jwksUri
|
274
|
+
alias_method :jwks_uri=, :jwksUri=
|
275
|
+
|
276
|
+
# The metadata of the service. (Pair Array)
|
277
|
+
attr_accessor :metadata
|
278
|
+
|
279
|
+
# The timestamp at which the service was modified. (Integer)
|
280
|
+
attr_accessor :modifiedAt
|
281
|
+
alias_method :modified_at, :modifiedAt
|
282
|
+
alias_method :modified_at=, :modifiedAt=
|
283
|
+
|
284
|
+
# The flag that indicates whether the service will validate the PKI certificate chain
|
285
|
+
# for MTLS based authentication. (Boolean)
|
286
|
+
attr_accessor :mutualTlsValidatePkiCertChain
|
287
|
+
alias_method :mutual_tls_validate_pki_cert_chain, :mutualTlsValidatePkiCertChain
|
288
|
+
alias_method :mutual_tls_validate_pki_cert_chain=, :mutualTlsValidatePkiCertChain=
|
289
|
+
|
290
|
+
# The service number. (Integer)
|
291
|
+
attr_accessor :number
|
292
|
+
|
293
|
+
# The flag to indicate whether the use of Proof Key for Code
|
294
|
+
# Exchange (PKCE) is always required for authorization requests
|
295
|
+
# Authorization Code Flow.
|
296
|
+
# (Boolean)
|
297
|
+
attr_accessor :pkceRequired
|
298
|
+
alias_method :pkce_required, :pkceRequired
|
299
|
+
alias_method :pkce_required=, :pkceRequired=
|
300
|
+
|
301
|
+
# The flag indicating whether S256 is required as the code challenge
|
302
|
+
# method whenever PKCE is used. (Boolean)
|
303
|
+
attr_accessor :pkceS256Required
|
304
|
+
alias_method :pkce_s256_required, :pkceS256Required
|
305
|
+
alias_method :pkce_s256_required=, :pkceS256Required=
|
306
|
+
|
307
|
+
# The URI of the service's policy page. (String)
|
308
|
+
attr_accessor :policyUri
|
309
|
+
alias_method :policy_uri, :policyUri
|
310
|
+
alias_method :policy_uri=, :policyUri=
|
311
|
+
|
312
|
+
# The duration of refresh tokens in seconds. (Integer)
|
313
|
+
attr_accessor :refreshTokenDuration
|
314
|
+
alias_method :refresh_token_duration, :refreshTokenDuration
|
315
|
+
alias_method :refresh_token_duration=, :refreshTokenDuration=
|
316
|
+
|
317
|
+
# The flag to indicate whether a refresh token remains unchanged
|
318
|
+
# or gets renewed after its use.
|
319
|
+
# (Boolean)
|
320
|
+
attr_accessor :refreshTokenKept
|
321
|
+
alias_method :refresh_token_kept, :refreshTokenKept
|
322
|
+
alias_method :refresh_token_kept=, :refreshTokenKept=
|
323
|
+
|
324
|
+
# The URI of the registration endpoint. (String)
|
325
|
+
attr_accessor :registrationEndpoint
|
326
|
+
alias_method :registration_endpoint, :registrationEndpoint
|
327
|
+
alias_method :registration_endpoint=, :registrationEndpoint=
|
328
|
+
|
329
|
+
# The URI of the token revocation endpoint. (String)
|
330
|
+
attr_accessor :revocationEndpoint
|
331
|
+
alias_method :revocation_endpoint, :revocationEndpoint
|
332
|
+
alias_method :revocation_endpoint=, :revocationEndpoint=
|
333
|
+
|
334
|
+
# The URI of the service's documentation. (String)
|
335
|
+
attr_accessor :serviceDocumentation
|
336
|
+
alias_method :service_documentation, :serviceDocumentation
|
337
|
+
alias_method :service_documentation=, :serviceDocumentation=
|
338
|
+
|
339
|
+
# The service name. (String)
|
340
|
+
attr_accessor :serviceName
|
341
|
+
alias_method :service_name, :serviceName
|
342
|
+
alias_method :service_name=, :serviceName=
|
343
|
+
|
344
|
+
# The service owner number. (Integer)
|
345
|
+
attr_accessor :serviceOwnerNumber
|
346
|
+
alias_method :service_owner_number, :serviceOwnerNumber
|
347
|
+
alias_method :service_owner_number=, :serviceOwnerNumber=
|
348
|
+
|
349
|
+
# The flag to indicate whether the number of access tokens
|
350
|
+
# per subject (and per client) is at most one or can be more. (Boolean)
|
351
|
+
attr_accessor :singleAccessTokenPerSubject
|
352
|
+
alias_method :single_access_token_per_subject, :singleAccessTokenPerSubject
|
353
|
+
alias_method :single_access_token_per_subject=, :singleAccessTokenPerSubject=
|
354
|
+
|
355
|
+
# The list of SNS credentials. (SnsCredentials array)
|
356
|
+
attr_accessor :snsCredentials
|
357
|
+
alias_method :sns_credentials, :snsCredentials
|
358
|
+
alias_method :sns_credentials=, :snsCredentials=
|
359
|
+
|
360
|
+
# The list of supported ACRs. (String array)
|
361
|
+
attr_accessor :supportedAcrs
|
362
|
+
alias_method :supported_acrs, :supportedAcrs
|
363
|
+
alias_method :supported_acrs=, :supportedAcrs=
|
364
|
+
|
365
|
+
# The list of supported claim locales. (String array)
|
366
|
+
attr_accessor :supportedClaimLocales
|
367
|
+
alias_method :supported_claim_locales, :supportedClaimLocales
|
368
|
+
alias_method :supported_claim_locales=, :supportedClaimLocales=
|
369
|
+
|
370
|
+
# The list of supported claims. (String array)
|
371
|
+
attr_accessor :supportedClaims
|
372
|
+
alias_method :supported_claims, :supportedClaims
|
373
|
+
alias_method :supported_claims=, :supportedClaims=
|
374
|
+
|
375
|
+
# The list of supported claim types. (String array)
|
376
|
+
#
|
377
|
+
# Valid values are "NORMAL", "AGGREGATED" and "DISTRIBUTED".
|
378
|
+
attr_accessor :supportedClaimTypes
|
379
|
+
alias_method :supported_claim_types, :supportedClaimTypes
|
380
|
+
alias_method :supported_claim_types=, :supportedClaimTypes=
|
381
|
+
|
382
|
+
# The list of supported SNSes for developer login. (Sns array)
|
383
|
+
attr_accessor :supportedDeveloperSnses
|
384
|
+
alias_method :supported_developer_snses, :supportedDeveloperSnses
|
385
|
+
alias_method :supported_developer_snses=, :supportedDeveloperSnses=
|
386
|
+
|
387
|
+
# The list of supported values of +display+ parameter. (String array)
|
388
|
+
#
|
389
|
+
# Valid values are "PAGE", "POPUP", "TOUCH" and "WAP".
|
390
|
+
attr_accessor :supportedDisplays
|
391
|
+
alias_method :supported_displays, :supportedDisplays
|
392
|
+
alias_method :supported_displays=, :supportedDisplays=
|
393
|
+
|
394
|
+
# The list of supported grant types. (String array)
|
395
|
+
#
|
396
|
+
# Valid values are "AUTHORIZATION_CODE", "IMPLICIT", "PASSWORD",
|
397
|
+
# "CLIENT_CREDENTIALS" and "REFRESH_TOKEN".
|
398
|
+
attr_accessor :supportedGrantTypes
|
399
|
+
alias_method :supported_grant_types, :supportedGrantTypes
|
400
|
+
alias_method :supported_grant_types=, :supportedGrantTypes=
|
401
|
+
|
402
|
+
# The list of supported response types. (String array)
|
403
|
+
#
|
404
|
+
# Valid values are "NONE", "CODE", "TOKEN", "ID_TOKEN",
|
405
|
+
# "CODE_TOKEN", "CODE_ID_TOKEN", "ID_TOKEN_TOKEN" and
|
406
|
+
# "CODE_ID_TOKEN_TOKEN".
|
407
|
+
attr_accessor :supportedResponseTypes
|
408
|
+
alias_method :supported_response_types, :supportedResponseTypes
|
409
|
+
alias_method :supported_response_types=, :supportedResponseTypes=
|
410
|
+
|
411
|
+
# The list of supported scopes. (Scope array)
|
412
|
+
attr_accessor :supportedScopes
|
413
|
+
alias_method :supported_scopes, :supportedScopes
|
414
|
+
alias_method :supported_scopes=, :supportedScopes=
|
415
|
+
|
416
|
+
# The list of supported service profiles. (String array)
|
417
|
+
attr_accessor :supportedServiceProfiles
|
418
|
+
alias_method :supported_service_profiles, :supportedServiceProfiles
|
419
|
+
alias_method :supported_service_profiles=, :supportedServiceProfiles=
|
420
|
+
|
421
|
+
# The list of supported SNSes. (Sns array)
|
422
|
+
attr_accessor :supportedSnses
|
423
|
+
alias_method :supported_snses, :supportedSnses
|
424
|
+
alias_method :supported_snses=, :supportedSnses=
|
425
|
+
|
426
|
+
# The list of supported client authentication methods at the token endpoint. (String array)
|
427
|
+
#
|
428
|
+
# Valid values are "NONE", "CLIENT_SECRET_BASIC", "CLIENT_SECRET_POST",
|
429
|
+
# "CLIENT_SECRET_JWT" and "PRIVATE_KEY_JWT".
|
430
|
+
attr_accessor :supportedTokenAuthMethods
|
431
|
+
alias_method :supported_token_auth_methods, :supportedTokenAuthMethods
|
432
|
+
alias_method :supported_token_auth_methods=, :supportedTokenAuthMethods=
|
433
|
+
|
434
|
+
# The list of supported backchannel token delivery modes. (String array)
|
435
|
+
# Valid values are "POLL", "PING" and "PUSH".
|
436
|
+
attr_accessor :supportedBackchannelTokenDeliveryModes
|
437
|
+
alias_method :supported_backchannel_token_delivery_modes, :supportedBackchannelTokenDeliveryModes
|
438
|
+
alias_method :supported_backchannel_token_delivery_modes=, :supportedBackchannelTokenDeliveryModes=
|
439
|
+
|
440
|
+
# The list of supported UI locales. (String array)
|
441
|
+
attr_accessor :supportedUiLocales
|
442
|
+
alias_method :supported_ui_locales, :supportedUiLocales
|
443
|
+
alias_method :supported_ui_locales=, :supportedUiLocales=
|
444
|
+
|
445
|
+
# The flag that indicates whether the service offers TLS client certificate
|
446
|
+
# bound access tokens (Boolean)
|
447
|
+
attr_accessor :tlsClientCertificateBoundAccessTokens
|
448
|
+
alias_method :tls_client_certificate_bound_access_tokens, :tlsClientCertificateBoundAccessTokens
|
449
|
+
alias_method :tls_client_certificate_bound_access_tokens=, :tlsClientCertificateBoundAccessTokens=
|
450
|
+
|
451
|
+
# The URI of the token endpoint. (String)
|
452
|
+
attr_accessor :tokenEndpoint
|
453
|
+
alias_method :token_endpoint, :tokenEndpoint
|
454
|
+
alias_method :token_endpoint=, :tokenEndpoint=
|
455
|
+
|
456
|
+
# The URI of the service's "Terms Of Service" page. (String)
|
457
|
+
attr_accessor :tosUri
|
458
|
+
alias_method :tos_uri, :tosUri
|
459
|
+
alias_method :tos_uri=, :tosUri=
|
460
|
+
|
461
|
+
# The list of trusted root certificates, used when the service validates client
|
462
|
+
# certificate paths. (String array)
|
463
|
+
attr_accessor :trustedRootCertificates
|
464
|
+
alias_method :trusted_root_certificates, :trustedRootCertificates
|
465
|
+
alias_method :trusted_root_certificates=, :trustedRootCertificates=
|
466
|
+
|
467
|
+
# The character set for user codes. (String)
|
468
|
+
attr_accessor :userCodeCharset
|
469
|
+
alias_method :user_code_charset, :userCodeCharset
|
470
|
+
alias_method :user_code_charset=, :userCodeCharset=
|
471
|
+
|
472
|
+
# The length of user codes. (Integer)
|
473
|
+
attr_accessor :userCodeLength
|
474
|
+
alias_method :user_code_length, :userCodeLength
|
475
|
+
alias_method :user_code_length=, :userCodeLength=
|
476
|
+
|
477
|
+
# The URI of user info endpoint. (String)
|
478
|
+
attr_accessor :userInfoEndpoint
|
479
|
+
alias_method :user_info_endpoint, :userInfoEndpoint
|
480
|
+
alias_method :user_info_endpoint=, :userInfoEndpoint=
|
481
|
+
|
482
|
+
# The key ID to identify a JWK used for user info signature using an
|
483
|
+
# asymmetric key. (String)
|
484
|
+
attr_accessor :userInfoSignatureKeyId
|
485
|
+
alias_method :user_info_signature_key_id, :userInfoSignatureKeyId
|
486
|
+
alias_method :user_info_signature_key_id=, :userInfoSignatureKeyId=
|
487
|
+
|
488
|
+
# Flag of whether this service supports dynamic client registration.
|
489
|
+
# (Boolean)
|
490
|
+
attr_accessor :dynamicRegistrationSupported
|
491
|
+
alias_method :dynamic_registration_supported, :dynamicRegistrationSupported
|
492
|
+
alias_method :dynamic_registration_supported=, :dynamicRegistrationSupported=
|
493
|
+
|
494
|
+
# The base URI of the service's "Dynamic Client Registration Management"
|
495
|
+
# endpoint. Client management URIs will be based on this by adding the
|
496
|
+
# client ID as a path component. (String)
|
497
|
+
attr_accessor :registrationManagementEndpoint
|
498
|
+
alias_method :registration_management_endpoint, :registrationManagementEndpoint
|
499
|
+
alias_method :registration_management_endpoint=, :registrationManagementEndpoint=
|
500
|
+
|
501
|
+
# The URI of request object endpoint. (String)
|
502
|
+
attr_accessor :requestObjectEndpoint
|
503
|
+
alias_method :request_object_endpoint, :requestObjectEndpoint
|
504
|
+
alias_method :request_object_endpoint=, :requestObjectEndpoint=
|
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
|
+
|
526
|
+
# Trust frameworks supported by this service. (String array)
|
527
|
+
# This corresponds to the +trust_frameworks_supported+ in OpenID Connect
|
528
|
+
# for Identity Assurance 1.0.
|
529
|
+
attr_accessor :supportedTrustFrameworks
|
530
|
+
alias_method :supported_trust_frameworks, :supportedTrustFrameworks
|
531
|
+
alias_method :supported_trust_frameworks=, :supportedTrustFrameworks=
|
532
|
+
|
533
|
+
# Evidence supported by this service. (String array)
|
534
|
+
# This corresponds to the +evidence_supported+ in OpenID Connect for
|
535
|
+
# Identity Assurance 1.0.
|
536
|
+
attr_accessor :supportedEvidence
|
537
|
+
alias_method :supported_evidence, :supportedEvidence
|
538
|
+
alias_method :supported_evidence=, :supportedEvidence=
|
539
|
+
|
540
|
+
# Identity documents supported by this service. (String array)
|
541
|
+
# This corresponds to the +id_documents_supported+ in OpenID Connect
|
542
|
+
# for Identity Assurance 1.0.
|
543
|
+
attr_accessor :supportedIdentityDocuments
|
544
|
+
alias_method :supported_identity_documents, :supportedIdentityDocuments
|
545
|
+
alias_method :supported_identity_documents=, :supportedIdentityDocuments=
|
546
|
+
|
547
|
+
# Verification methods supported by this service. (String array)
|
548
|
+
# This corresponds to the +id_documents_verification_methods_supported+ in
|
549
|
+
# OpenID Connect for Identity Assurance 1.0.
|
550
|
+
attr_accessor :supportedVerificationMethods
|
551
|
+
alias_method :supported_verification_methods, :supportedVerificationMethods
|
552
|
+
alias_method :supported_verification_methods=, :supportedVerificationMethods=
|
553
|
+
|
554
|
+
# Verified claims supported by this service. (String array)
|
555
|
+
# This corresponds to the +claims_in_verified_claims_supported+ in
|
556
|
+
# OpenID Connect for Identity Assurance 1.0.
|
557
|
+
attr_accessor :supportedVerifiedClaims
|
558
|
+
alias_method :supported_verified_claims, :supportedVerifiedClaims
|
559
|
+
alias_method :supported_verified_claims=, :supportedVerifiedClaims=
|
560
|
+
|
561
|
+
# Flag of whether this service allows token requests without client ID
|
562
|
+
# from public clients or not. (Boolean)
|
563
|
+
attr_accessor :missingClientIdAllowed
|
564
|
+
alias_method :missing_client_id_allowed, :missingClientIdAllowed
|
565
|
+
alias_method :missing_client_id_allowed=, :missingClientIdAllowed=
|
566
|
+
|
567
|
+
# Flag of whether the remaining duration of the used refresh token is
|
568
|
+
# taken over to the newly issued refresh token. (Boolean)
|
569
|
+
attr_accessor :refreshTokenDurationKept
|
570
|
+
alias_method :refresh_token_duration_kept, :refreshTokenDurationKept
|
571
|
+
alias_method :refresh_token_duration_kept=, :refreshTokenDurationKept=
|
572
|
+
|
573
|
+
# Flag of whether this service requires that clients use the pushed
|
574
|
+
# authorization request endpoint. (Boolean)
|
575
|
+
attr_accessor :parRequired
|
576
|
+
alias_method :par_required, :parRequired
|
577
|
+
alias_method :par_required=, :parRequired=
|
578
|
+
|
579
|
+
private
|
580
|
+
|
581
|
+
# Integer attributes.
|
582
|
+
INTEGER_ATTRIBUTES = ::Set.new([
|
583
|
+
:accessTokenDuration, :allowableClockSkew, :apiKey, :authorizationResponseDuration,
|
584
|
+
:backchannelAuthReqIdDuration, :backchannelPollingInterval, :clientsPerDeveloper,
|
585
|
+
:createdAt, :deviceFlowCodeDuration, :deviceFlowPollingInterval,
|
586
|
+
:idTokenDuration, :modifiedAt, :number, :refreshTokenDuration,
|
587
|
+
:serviceOwnerNumber, :userCodeLength, :pushedAuthReqDuration
|
588
|
+
])
|
589
|
+
|
590
|
+
# Boolean attributes.
|
591
|
+
BOOLEAN_ATTRIBUTES = ::Set.new([
|
592
|
+
:backchannelBindingMessageRequiredInFapi, :backchannelUserCodeParameterSupported,
|
593
|
+
:clientIdAliasEnabled,
|
594
|
+
:directAuthorizationEndpointEnabled, :directIntrospectionEndpointEnabled,
|
595
|
+
:directJwksEndpointEnabled, :directRevocationEndpointEnabled, :directTokenEndpointEnabled,
|
596
|
+
:directUserInfoEndpointEnabled, :errorDescriptionOmitted, :errorUriOmitted,
|
597
|
+
:mutualTlsValidatePkiCertChain, :pkceRequired, :pkceS256Required, :refreshTokenKept,
|
598
|
+
:singleAccessTokenPerSubject, :tlsClientCertificateBoundAccessTokens,
|
599
|
+
:dynamicRegistrationSupported, :missingClientIdAllowed, :refreshTokenDurationKept,
|
600
|
+
:parRequired
|
601
|
+
])
|
602
|
+
|
603
|
+
# String attributes.
|
604
|
+
STRING_ATTRIBUTES = ::Set.new([
|
605
|
+
:accessTokenSignAlg, :accessTokenSignatureKeyId, :accessTokenType,
|
606
|
+
:apiSecret, :authenticationCallbackApiKey, :authenticationCallbackApiSecret,
|
607
|
+
:authenticationCallbackEndpoint, :authorizationEndpoint, :authorizationSignatureKeyId,
|
608
|
+
:backchannelAuthenticationEndpoint, :description, :developerAuthenticationCallbackApiKey,
|
609
|
+
:developerAuthenticationCallbackApiSecret, :developerAuthenticationCallbackEndpoint,
|
610
|
+
:deviceAuthorizationEndpoint, :deviceVerificationUri, :deviceVerificationUriComplete,
|
611
|
+
:idTokenSignatureKeyId, :introspectionEndpoint, :issuer, :jwks, :jwksUri,
|
612
|
+
:policyUri, :registrationEndpoint, :registrationManagementEndpoint,
|
613
|
+
:requestObjectEndpoint, :revocationEndpoint, :serviceDocumentation, :serviceName,
|
614
|
+
:tokenEndpoint, :tosUri, :userCodeCharset, :userInfoEndpoint, :userInfoSignatureKeyId,
|
615
|
+
:pushedAuthReqEndpoint
|
616
|
+
])
|
617
|
+
|
618
|
+
# String array attributes.
|
619
|
+
STRING_ARRAY_ATTRIBUTES = ::Set.new([
|
620
|
+
:supportedAcrs, :supportedBackchannelTokenDeliveryModes, :supportedClaimLocales,
|
621
|
+
:supportedClaims, :supportedClaimTypes, :supportedDeveloperSnses,
|
622
|
+
:supportedDisplays, :supportedGrantTypes, :supportedResponseTypes,
|
623
|
+
:supportedServiceProfiles, :supportedSnses, :supportedTokenAuthMethods,
|
624
|
+
:supportedUiLocales, :trustedRootCertificates, :supportedAuthorizationDataTypes,
|
625
|
+
:supportedTrustFrameworks, :supportedEvidence, :supportedIdentityDocuments,
|
626
|
+
:supportedVerificationMethods, :supportedVerifiedClaims
|
627
|
+
])
|
628
|
+
|
629
|
+
# SNS credentials array attributes.
|
630
|
+
SNS_CREDENTIALS_ARRAY_ATTRIBUTES = ::Set.new([
|
631
|
+
:developerSnsCredentials, :snsCredentials
|
632
|
+
])
|
633
|
+
|
634
|
+
# Mapping from snake cases to camel cases.
|
635
|
+
SNAKE_TO_CAMEL = {
|
636
|
+
:access_token_duration => :accessTokenDuration,
|
637
|
+
:access_token_sign_alg => :accessTokenSignAlg,
|
638
|
+
:access_token_signature_key_id => :accessTokenSignatureKeyId,
|
639
|
+
:access_token_type => :accessTokenType,
|
640
|
+
:allowable_clock_skew => :allowableClockSkew,
|
641
|
+
:api_key => :apiKey,
|
642
|
+
:api_secret => :apiSecret,
|
643
|
+
:authentication_callback_api_key => :authenticationCallbackApiKey,
|
644
|
+
:authentication_callback_api_secret => :authenticationCallbackApiSecret,
|
645
|
+
:authentication_callback_endpoint => :authenticationCallbackEndpoint,
|
646
|
+
:authorization_endpoint => :authorizationEndpoint,
|
647
|
+
:authorization_response_duration => :authorizationResponseDuration,
|
648
|
+
:authorization_signature_key_id => :authorizationSignatureKeyId,
|
649
|
+
:backchannel_authentication_endpoint => :backchannelAuthenticationEndpoint,
|
650
|
+
:backchannel_binding_message_required_in_fapi => :backchannelBindingMessageRequiredInFapi,
|
651
|
+
:backchannel_auth_req_id_duration => :backchannelAuthReqIdDuration,
|
652
|
+
:backchannel_polling_interval => :backchannelPollingInterval,
|
653
|
+
:backchannel_user_code_parameter_supported => :backchannelUserCodeParameterSupported,
|
654
|
+
:developer_authentication_callback_api_key => :developerAuthenticationCallbackApiKey,
|
655
|
+
:developer_authentication_callback_api_secret => :developerAuthenticationCallbackApiSecret,
|
656
|
+
:developer_authentication_callback_endpoint => :developerAuthenticationCallbackEndpoint,
|
657
|
+
:developer_sns_credentials => :developerSnsCredentials,
|
658
|
+
:device_authorization_endpoint => :deviceAuthorizationEndpoint,
|
659
|
+
:device_flow_code_duration => :deviceFlowCodeDuration,
|
660
|
+
:device_flow_polling_interval => :deviceFlowPollingInterval,
|
661
|
+
:device_verification_uri => :deviceVerificationUri,
|
662
|
+
:device_verification_uri_complete => :deviceVerificationUriComplete,
|
663
|
+
:client_id_alias_enabled => :clientIdAliasEnabled,
|
664
|
+
:clients_per_developer => :clientsPerDeveloper,
|
665
|
+
:created_at => :createdAt,
|
666
|
+
:direct_authorization_endpoint_enabled => :directAuthorizationEndpointEnabled,
|
667
|
+
:direct_introspection_endpoint_enabled => :directIntrospectionEndpointEnabled,
|
668
|
+
:direct_jwks_endpoint_enabled => :directJwksEndpointEnabled,
|
669
|
+
:direct_revocation_endpoint_enabled => :directRevocationEndpointEnabled,
|
670
|
+
:direct_token_endpoint_enabled => :directTokenEndpointEnabled,
|
671
|
+
:direct_user_info_endpoint_enabled => :directUserInfoEndpointEnabled,
|
672
|
+
:dynamic_registration_supported => :dynamicRegistrationSupported,
|
673
|
+
:error_description_omitted => :errorDescriptionOmitted,
|
674
|
+
:error_uri_omitted => :errorUriOmitted,
|
675
|
+
:id_token_duration => :idTokenDuration,
|
676
|
+
:id_token_signature_key_id => :idTokenSignatureKeyId,
|
677
|
+
:introspection_endpoint => :introspectionEndpoint,
|
678
|
+
:jwks_uri => :jwksUri,
|
679
|
+
:modified_at => :modifiedAt,
|
680
|
+
:mutual_tls_validate_pki_cert_chain => :mutualTlsValidatePkiCertChain,
|
681
|
+
:pkce_required => :pkceRequired,
|
682
|
+
:pkce_s256_required => :pkceS256Required,
|
683
|
+
:policy_uri => :policyUri,
|
684
|
+
:refresh_token_duration => :refreshTokenDuration,
|
685
|
+
:refresh_token_kept => :refreshTokenKept,
|
686
|
+
:registration_endpoint => :registrationEndpoint,
|
687
|
+
:registration_management_endpoint => :registrationManagementEndpoint,
|
688
|
+
:revocation_endpoint => :revocationEndpoint,
|
689
|
+
:request_object_endpoint => :requestObjectEndpoint,
|
690
|
+
:service_documentation => :serviceDocumentation,
|
691
|
+
:service_name => :serviceName,
|
692
|
+
:service_owner_number => :serviceOwnerNumber,
|
693
|
+
:single_access_token_per_subject => :singleAccessTokenPerSubject,
|
694
|
+
:sns_credentials => :snsCredentials,
|
695
|
+
:supported_acrs => :supportedAcrs,
|
696
|
+
:supported_backchannel_token_delivery_modes => :supportedBackchannelTokenDeliveryModes,
|
697
|
+
:supported_claim_locales => :supportedClaimLocales,
|
698
|
+
:supported_claims => :supportedClaims,
|
699
|
+
:supported_claim_types => :supportedClaimTypes,
|
700
|
+
:supported_developer_snses => :supportedDeveloperSnses,
|
701
|
+
:supported_displays => :supportedDisplays,
|
702
|
+
:supported_grant_types => :supportedGrantTypes,
|
703
|
+
:supported_response_types => :supportedResponseTypes,
|
704
|
+
:supported_scopes => :supportedScopes,
|
705
|
+
:supported_service_profiles => :supportedServiceProfiles,
|
706
|
+
:supported_snses => :supportedSnses,
|
707
|
+
:supported_token_auth_methods => :supportedTokenAuthMethods,
|
708
|
+
:supported_ui_locales => :supportedUiLocales,
|
709
|
+
:tls_client_certificate_bound_access_tokens => :tlsClientCertificateBoundAccessTokens,
|
710
|
+
:token_endpoint => :tokenEndpoint,
|
711
|
+
:tos_uri => :tosUri,
|
712
|
+
:trusted_root_certificates => :trustedRootCertificates,
|
713
|
+
:user_code_charset => :userCodeCharset,
|
714
|
+
:user_code_length => :userCodeLength,
|
715
|
+
:user_info_endpoint => :userInfoEndpoint,
|
716
|
+
:user_info_signature_key_id => :userInfoSignatureKeyId,
|
717
|
+
:mtls_endpoint_aliases => :mtlsEndpointAliases,
|
718
|
+
:pushed_auth_req_endpoint => :pushedAuthReqEndpoint,
|
719
|
+
:pushed_auth_req_duration => :pushedAuthReqDuration,
|
720
|
+
:supported_authorization_data_types => :supportedAuthorizationDataTypes,
|
721
|
+
:supported_trust_frameworks => :supportedTrustFrameworks,
|
722
|
+
:supported_evidence => :supportedEvidence,
|
723
|
+
:supported_identity_documents => :supportedIdentityDocuments,
|
724
|
+
:supported_verification_methods => :supportedVerificationMethods,
|
725
|
+
:supported_verified_claims => :supportedVerifiedClaims,
|
726
|
+
:missing_client_id_allowed => :missingClientIdAllowed,
|
727
|
+
:refresh_token_duration_kept => :refreshTokenDurationKept,
|
728
|
+
:par_required => :parRequired
|
729
|
+
}
|
730
|
+
|
731
|
+
# The constructor
|
732
|
+
def initialize(hash = nil)
|
733
|
+
# Set default values to integer attributes.
|
734
|
+
INTEGER_ATTRIBUTES.each do |attr|
|
735
|
+
send("#{attr}=", 0)
|
736
|
+
end
|
737
|
+
|
738
|
+
# Set default values to boolean attributes.
|
739
|
+
BOOLEAN_ATTRIBUTES.each do |attr|
|
740
|
+
send("#{attr}=", false)
|
741
|
+
end
|
742
|
+
|
743
|
+
# Set default values to string attributes.
|
744
|
+
STRING_ATTRIBUTES.each do |attr|
|
745
|
+
send("#{attr}=", nil)
|
746
|
+
end
|
747
|
+
|
748
|
+
# Set default values to string array attributes.
|
749
|
+
STRING_ARRAY_ATTRIBUTES.each do |attr|
|
750
|
+
send("#{attr}=", nil)
|
751
|
+
end
|
752
|
+
|
753
|
+
# Set default values to sns credentials array attributes.
|
754
|
+
SNS_CREDENTIALS_ARRAY_ATTRIBUTES.each do |attr|
|
755
|
+
send("#{attr}=", nil)
|
756
|
+
end
|
757
|
+
|
758
|
+
# Set default values to special objects.
|
759
|
+
@metadata = nil
|
760
|
+
@supportedScopes = nil
|
761
|
+
@mtlsEndpointAliases = nil
|
762
|
+
|
763
|
+
# Set attribute values using the given hash.
|
764
|
+
authlete_model_update(hash)
|
765
|
+
end
|
766
|
+
|
767
|
+
def authlete_model_convert_key(key)
|
768
|
+
key = key.to_sym
|
769
|
+
|
770
|
+
# Convert snakecase to camelcase, if necessary.
|
771
|
+
if SNAKE_TO_CAMEL.has_key?(key)
|
772
|
+
key = SNAKE_TO_CAMEL[key]
|
773
|
+
end
|
774
|
+
|
775
|
+
key
|
776
|
+
end
|
777
|
+
|
778
|
+
def authlete_model_simple_attribute?(key)
|
779
|
+
INTEGER_ATTRIBUTES.include?(key) or
|
780
|
+
BOOLEAN_ATTRIBUTES.include?(key) or
|
781
|
+
STRING_ATTRIBUTES.include?(key) or
|
782
|
+
STRING_ARRAY_ATTRIBUTES.include?(key)
|
783
|
+
end
|
784
|
+
|
785
|
+
def authlete_model_update(hash)
|
786
|
+
return if hash.nil?
|
787
|
+
|
788
|
+
hash.each do |key, value|
|
789
|
+
key = authlete_model_convert_key(key)
|
790
|
+
|
791
|
+
if authlete_model_simple_attribute?(key)
|
792
|
+
send("#{key}=", value)
|
793
|
+
elsif SNS_CREDENTIALS_ARRAY_ATTRIBUTES.include?(key)
|
794
|
+
# Get an array consisting of "SnsCredentials" objects.
|
795
|
+
parsed = get_parsed_array(value) do |element|
|
796
|
+
Authlete::Model::SnsCredentials.parse(element)
|
797
|
+
end
|
798
|
+
|
799
|
+
send("#{key}=", parsed)
|
800
|
+
elsif key == :metadata
|
801
|
+
@metadata = get_parsed_array(value) do |element|
|
802
|
+
Authlete::Model::Pair.parse(element)
|
803
|
+
end
|
804
|
+
elsif key == :supportedScopes
|
805
|
+
@supportedScopes = get_parsed_array(value) do |element|
|
806
|
+
Authlete::Model::Scope.parse(element)
|
807
|
+
end
|
808
|
+
elsif key == :mtlsEndpointAliases
|
809
|
+
@mtlsEndpointAliases = get_parsed_array(value) do |element|
|
810
|
+
Authlete::Model::NamedUri.parse(element)
|
811
|
+
end
|
812
|
+
end
|
813
|
+
end
|
814
|
+
|
815
|
+
self
|
816
|
+
end
|
817
|
+
|
818
|
+
public
|
819
|
+
|
820
|
+
# Construct an instance from the given hash.
|
821
|
+
#
|
822
|
+
# If the given argument is nil or is not a Hash, nil is returned.
|
823
|
+
# Otherwise, Service.new(hash) is returned.
|
824
|
+
def self.parse(hash)
|
825
|
+
if hash.nil? or (hash.kind_of?(Hash) == false)
|
826
|
+
return nil
|
827
|
+
end
|
828
|
+
|
829
|
+
Service.new(hash)
|
830
|
+
end
|
831
|
+
|
832
|
+
# Convert this object into a hash.
|
833
|
+
def to_hash
|
834
|
+
hash = {}
|
835
|
+
|
836
|
+
instance_variables.each do |var|
|
837
|
+
key = var.to_s.delete("@").to_sym
|
838
|
+
val = instance_variable_get(var)
|
839
|
+
|
840
|
+
if authlete_model_simple_attribute?(key) or val.nil?
|
841
|
+
hash[key] = val
|
842
|
+
elsif key == :developerSnsCredentials or key == :snsCredentials or
|
843
|
+
key == :supportedScopes or key == :metadata or key == :mtlsEndpointAliases
|
844
|
+
hash[key] = val.map { |element| element.to_hash }
|
845
|
+
end
|
846
|
+
end
|
847
|
+
|
848
|
+
hash
|
849
|
+
end
|
850
|
+
end
|
851
|
+
end
|
788
852
|
end
|