authlete 1.0.19 → 1.0.24

Sign up to get free protection for your applications and to get access to all the features.
@@ -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,881 @@
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
- private
527
-
528
- # Integer attributes.
529
- INTEGER_ATTRIBUTES = ::Set.new([
530
- :accessTokenDuration, :allowableClockSkew, :apiKey, :authorizationResponseDuration,
531
- :backchannelAuthReqIdDuration, :backchannelPollingInterval, :clientsPerDeveloper,
532
- :createdAt, :deviceFlowCodeDuration, :deviceFlowPollingInterval,
533
- :idTokenDuration, :modifiedAt, :number, :refreshTokenDuration,
534
- :serviceOwnerNumber, :userCodeLength, :pushedAuthReqDuration
535
- ])
536
-
537
- # Boolean attributes.
538
- BOOLEAN_ATTRIBUTES = ::Set.new([
539
- :backchannelBindingMessageRequiredInFapi, :backchannelUserCodeParameterSupported,
540
- :clientIdAliasEnabled,
541
- :directAuthorizationEndpointEnabled, :directIntrospectionEndpointEnabled,
542
- :directJwksEndpointEnabled, :directRevocationEndpointEnabled, :directTokenEndpointEnabled,
543
- :directUserInfoEndpointEnabled, :errorDescriptionOmitted, :errorUriOmitted,
544
- :mutualTlsValidatePkiCertChain, :pkceRequired, :pkceS256Required, :refreshTokenKept,
545
- :singleAccessTokenPerSubject, :tlsClientCertificateBoundAccessTokens,
546
- :dynamicRegistrationSupported
547
- ])
548
-
549
- # String attributes.
550
- STRING_ATTRIBUTES = ::Set.new([
551
- :accessTokenSignAlg, :accessTokenSignatureKeyId, :accessTokenType,
552
- :apiSecret, :authenticationCallbackApiKey, :authenticationCallbackApiSecret,
553
- :authenticationCallbackEndpoint, :authorizationEndpoint, :authorizationSignatureKeyId,
554
- :backchannelAuthenticationEndpoint, :description, :developerAuthenticationCallbackApiKey,
555
- :developerAuthenticationCallbackApiSecret, :developerAuthenticationCallbackEndpoint,
556
- :deviceAuthorizationEndpoint, :deviceVerificationUri, :deviceVerificationUriComplete,
557
- :idTokenSignatureKeyId, :introspectionEndpoint, :issuer, :jwks, :jwksUri,
558
- :policyUri, :registrationEndpoint, :registrationManagementEndpoint,
559
- :requestObjectEndpoint, :revocationEndpoint, :serviceDocumentation, :serviceName,
560
- :tokenEndpoint, :tosUri, :userCodeCharset, :userInfoEndpoint, :userInfoSignatureKeyId,
561
- :pushedAuthReqEndpoint
562
- ])
563
-
564
- # String array attributes.
565
- STRING_ARRAY_ATTRIBUTES = ::Set.new([
566
- :supportedAcrs, :supportedBackchannelTokenDeliveryModes, :supportedClaimLocales,
567
- :supportedClaims, :supportedClaimTypes, :supportedDeveloperSnses,
568
- :supportedDisplays, :supportedGrantTypes, :supportedResponseTypes,
569
- :supportedServiceProfiles, :supportedSnses, :supportedTokenAuthMethods,
570
- :supportedUiLocales, :trustedRootCertificates, :supportedAuthorizationDataTypes
571
- ])
572
-
573
- # SNS credentials array attributes.
574
- SNS_CREDENTIALS_ARRAY_ATTRIBUTES = ::Set.new([
575
- :developerSnsCredentials, :snsCredentials
576
- ])
577
-
578
- # Mapping from snake cases to camel cases.
579
- SNAKE_TO_CAMEL = {
580
- :access_token_duration => :accessTokenDuration,
581
- :access_token_sign_alg => :accessTokenSignAlg,
582
- :access_token_signature_key_id => :accessTokenSignatureKeyId,
583
- :access_token_type => :accessTokenType,
584
- :allowable_clock_skew => :allowableClockSkew,
585
- :api_key => :apiKey,
586
- :api_secret => :apiSecret,
587
- :authentication_callback_api_key => :authenticationCallbackApiKey,
588
- :authentication_callback_api_secret => :authenticationCallbackApiSecret,
589
- :authentication_callback_endpoint => :authenticationCallbackEndpoint,
590
- :authorization_endpoint => :authorizationEndpoint,
591
- :authorization_response_duration => :authorizationResponseDuration,
592
- :authorization_signature_key_id => :authorizationSignatureKeyId,
593
- :backchannel_authentication_endpoint => :backchannelAuthenticationEndpoint,
594
- :backchannel_binding_message_required_in_fapi => :backchannelBindingMessageRequiredInFapi,
595
- :backchannel_auth_req_id_duration => :backchannelAuthReqIdDuration,
596
- :backchannel_polling_interval => :backchannelPollingInterval,
597
- :backchannel_user_code_parameter_supported => :backchannelUserCodeParameterSupported,
598
- :developer_authentication_callback_api_key => :developerAuthenticationCallbackApiKey,
599
- :developer_authentication_callback_api_secret => :developerAuthenticationCallbackApiSecret,
600
- :developer_authentication_callback_endpoint => :developerAuthenticationCallbackEndpoint,
601
- :developer_sns_credentials => :developerSnsCredentials,
602
- :device_authorization_endpoint => :deviceAuthorizationEndpoint,
603
- :device_flow_code_duration => :deviceFlowCodeDuration,
604
- :device_flow_polling_interval => :deviceFlowPollingInterval,
605
- :device_verification_uri => :deviceVerificationUri,
606
- :device_verification_uri_complete => :deviceVerificationUriComplete,
607
- :client_id_alias_enabled => :clientIdAliasEnabled,
608
- :clients_per_developer => :clientsPerDeveloper,
609
- :created_at => :createdAt,
610
- :direct_authorization_endpoint_enabled => :directAuthorizationEndpointEnabled,
611
- :direct_introspection_endpoint_enabled => :directIntrospectionEndpointEnabled,
612
- :direct_jwks_endpoint_enabled => :directJwksEndpointEnabled,
613
- :direct_revocation_endpoint_enabled => :directRevocationEndpointEnabled,
614
- :direct_token_endpoint_enabled => :directTokenEndpointEnabled,
615
- :direct_user_info_endpoint_enabled => :directUserInfoEndpointEnabled,
616
- :dynamic_registration_supported => :dynamicRegistrationSupported,
617
- :error_description_omitted => :errorDescriptionOmitted,
618
- :error_uri_omitted => :errorUriOmitted,
619
- :id_token_duration => :idTokenDuration,
620
- :id_token_signature_key_id => :idTokenSignatureKeyId,
621
- :introspection_endpoint => :introspectionEndpoint,
622
- :jwks_uri => :jwksUri,
623
- :modified_at => :modifiedAt,
624
- :mutual_tls_validate_pki_cert_chain => :mutualTlsValidatePkiCertChain,
625
- :pkce_required => :pkceRequired,
626
- :pkce_s256_required => :pkceS256Required,
627
- :policy_uri => :policyUri,
628
- :refresh_token_duration => :refreshTokenDuration,
629
- :refresh_token_kept => :refreshTokenKept,
630
- :registration_endpoint => :registrationEndpoint,
631
- :registration_management_endpoint => :registrationManagementEndpoint,
632
- :revocation_endpoint => :revocationEndpoint,
633
- :request_object_endpoint => :requestObjectEndpoint,
634
- :service_documentation => :serviceDocumentation,
635
- :service_name => :serviceName,
636
- :service_owner_number => :serviceOwnerNumber,
637
- :single_access_token_per_subject => :singleAccessTokenPerSubject,
638
- :sns_credentials => :snsCredentials,
639
- :supported_acrs => :supportedAcrs,
640
- :supported_backchannel_token_delivery_modes => :supportedBackchannelTokenDeliveryModes,
641
- :supported_claim_locales => :supportedClaimLocales,
642
- :supported_claims => :supportedClaims,
643
- :supported_claim_types => :supportedClaimTypes,
644
- :supported_developer_snses => :supportedDeveloperSnses,
645
- :supported_displays => :supportedDisplays,
646
- :supported_grant_types => :supportedGrantTypes,
647
- :supported_response_types => :supportedResponseTypes,
648
- :supported_scopes => :supportedScopes,
649
- :supported_service_profiles => :supportedServiceProfiles,
650
- :supported_snses => :supportedSnses,
651
- :supported_token_auth_methods => :supportedTokenAuthMethods,
652
- :supported_ui_locales => :supportedUiLocales,
653
- :tls_client_certificate_bound_access_tokens => :tlsClientCertificateBoundAccessTokens,
654
- :token_endpoint => :tokenEndpoint,
655
- :tos_uri => :tosUri,
656
- :trusted_root_certificates => :trustedRootCertificates,
657
- :user_code_charset => :userCodeCharset,
658
- :user_code_length => :userCodeLength,
659
- :user_info_endpoint => :userInfoEndpoint,
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
665
- }
666
-
667
- # The constructor
668
- def initialize(hash = nil)
669
- # Set default values to integer attributes.
670
- INTEGER_ATTRIBUTES.each do |attr|
671
- send("#{attr}=", 0)
672
- end
673
-
674
- # Set default values to boolean attributes.
675
- BOOLEAN_ATTRIBUTES.each do |attr|
676
- send("#{attr}=", false)
677
- end
678
-
679
- # Set default values to string attributes.
680
- STRING_ATTRIBUTES.each do |attr|
681
- send("#{attr}=", nil)
682
- end
683
-
684
- # Set default values to string array attributes.
685
- STRING_ARRAY_ATTRIBUTES.each do |attr|
686
- send("#{attr}=", nil)
687
- end
688
-
689
- # Set default values to sns credentials array attributes.
690
- SNS_CREDENTIALS_ARRAY_ATTRIBUTES.each do |attr|
691
- send("#{attr}=", nil)
692
- end
693
-
694
- # Set default values to special objects.
695
- @metadata = nil
696
- @supportedScopes = nil
697
- @mtlsEndpointAliases = nil
698
-
699
- # Set attribute values using the given hash.
700
- authlete_model_update(hash)
701
- end
702
-
703
- def authlete_model_convert_key(key)
704
- key = key.to_sym
705
-
706
- # Convert snakecase to camelcase, if necessary.
707
- if SNAKE_TO_CAMEL.has_key?(key)
708
- key = SNAKE_TO_CAMEL[key]
709
- end
710
-
711
- key
712
- end
713
-
714
- def authlete_model_simple_attribute?(key)
715
- INTEGER_ATTRIBUTES.include?(key) or
716
- BOOLEAN_ATTRIBUTES.include?(key) or
717
- STRING_ATTRIBUTES.include?(key) or
718
- STRING_ARRAY_ATTRIBUTES.include?(key)
719
- end
720
-
721
- def authlete_model_update(hash)
722
- return if hash.nil?
723
-
724
- hash.each do |key, value|
725
- key = authlete_model_convert_key(key)
726
-
727
- if authlete_model_simple_attribute?(key)
728
- send("#{key}=", value)
729
- elsif SNS_CREDENTIALS_ARRAY_ATTRIBUTES.include?(key)
730
- # Get an array consisting of "SnsCredentials" objects.
731
- parsed = get_parsed_array(value) do |element|
732
- Authlete::Model::SnsCredentials.parse(element)
733
- end
734
-
735
- send("#{key}=", parsed)
736
- elsif key == :metadata
737
- @metadata = get_parsed_array(value) do |element|
738
- Authlete::Model::Pair.parse(element)
739
- end
740
- elsif key == :supportedScopes
741
- @supportedScopes = get_parsed_array(value) do |element|
742
- Authlete::Model::Scope.parse(element)
743
- end
744
- elsif key == :mtlsEndpointAliases
745
- @mtlsEndpointAliases = get_parsed_array(value) do |element|
746
- Authlete::Model::NamedUri.parse(element)
747
- end
748
- end
749
- end
750
-
751
- self
752
- end
753
-
754
- public
755
-
756
- # Construct an instance from the given hash.
757
- #
758
- # If the given argument is nil or is not a Hash, nil is returned.
759
- # Otherwise, Service.new(hash) is returned.
760
- def self.parse(hash)
761
- if hash.nil? or (hash.kind_of?(Hash) == false)
762
- return nil
763
- end
764
-
765
- Service.new(hash)
766
- end
767
-
768
- # Convert this object into a hash.
769
- def to_hash
770
- hash = {}
771
-
772
- instance_variables.each do |var|
773
- key = var.to_s.delete("@").to_sym
774
- val = instance_variable_get(var)
775
-
776
- if authlete_model_simple_attribute?(key) or val.nil?
777
- hash[key] = val
778
- elsif key == :developerSnsCredentials or key == :snsCredentials or
779
- key == :supportedScopes or key == :metadata or key == :mtlsEndpointAliases
780
- hash[key] = val.map { |element| element.to_hash }
781
- end
782
- end
783
-
784
- hash
785
- end
786
- end
787
- end
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
+ # Flag of whether this service always requires request objects. (Boolean)
580
+ attr_accessor :requestObjectRequired
581
+ alias_method :request_object_required, :requestObjectRequired
582
+ alias_method :request_object_required=, :requestObjectRequired=
583
+
584
+ # Flag of whether this service processes request objects based on the
585
+ # rules defined in OpenID Connect Core 1.0 (if +true+) or JAR (JWT Secured
586
+ # Authorization Request) (if +false+). (Boolean)
587
+ attr_accessor :traditionalRequestObjectProcessingApplied
588
+ alias_method :traditional_request_object_processing_applied, :traditionalRequestObjectProcessingApplied
589
+ alias_method :traditional_request_object_processing_applied=, :traditionalRequestObjectProcessingApplied=
590
+
591
+ # Flag of whether claims specified by shortcut scopes (e.g. profile)
592
+ # are included in the issued ID token only when no access token is issued.
593
+ # (Boolean)
594
+ attr_accessor :claimShortcutRestrictive
595
+ alias_method :claim_shortcut_restrictive, :claimShortcutRestrictive
596
+ alias_method :claim_shortcut_restrictive=, :claimShortcutRestrictive=
597
+
598
+ # Flag of whether requests that request no scope are rejected or not.
599
+ # (Boolean)
600
+ attr_accessor :scopeRequired
601
+ alias_method :scope_required, :scopeRequired
602
+ alias_method :scope_required=, :scopeRequired=
603
+
604
+ private
605
+
606
+ # Integer attributes.
607
+ INTEGER_ATTRIBUTES = ::Set.new([
608
+ :accessTokenDuration, :allowableClockSkew, :apiKey, :authorizationResponseDuration,
609
+ :backchannelAuthReqIdDuration, :backchannelPollingInterval, :clientsPerDeveloper,
610
+ :createdAt, :deviceFlowCodeDuration, :deviceFlowPollingInterval,
611
+ :idTokenDuration, :modifiedAt, :number, :refreshTokenDuration,
612
+ :serviceOwnerNumber, :userCodeLength, :pushedAuthReqDuration
613
+ ])
614
+
615
+ # Boolean attributes.
616
+ BOOLEAN_ATTRIBUTES = ::Set.new([
617
+ :backchannelBindingMessageRequiredInFapi, :backchannelUserCodeParameterSupported,
618
+ :claimShortcutRestrictive, :clientIdAliasEnabled,
619
+ :directAuthorizationEndpointEnabled, :directIntrospectionEndpointEnabled,
620
+ :directJwksEndpointEnabled, :directRevocationEndpointEnabled, :directTokenEndpointEnabled,
621
+ :directUserInfoEndpointEnabled, :errorDescriptionOmitted, :errorUriOmitted,
622
+ :mutualTlsValidatePkiCertChain, :pkceRequired, :pkceS256Required, :refreshTokenKept,
623
+ :singleAccessTokenPerSubject, :tlsClientCertificateBoundAccessTokens,
624
+ :dynamicRegistrationSupported, :missingClientIdAllowed, :refreshTokenDurationKept,
625
+ :parRequired, :requestObjectRequired, :scopeRequired, :traditionalRequestObjectProcessingApplied
626
+ ])
627
+
628
+ # String attributes.
629
+ STRING_ATTRIBUTES = ::Set.new([
630
+ :accessTokenSignAlg, :accessTokenSignatureKeyId, :accessTokenType,
631
+ :apiSecret, :authenticationCallbackApiKey, :authenticationCallbackApiSecret,
632
+ :authenticationCallbackEndpoint, :authorizationEndpoint, :authorizationSignatureKeyId,
633
+ :backchannelAuthenticationEndpoint, :description, :developerAuthenticationCallbackApiKey,
634
+ :developerAuthenticationCallbackApiSecret, :developerAuthenticationCallbackEndpoint,
635
+ :deviceAuthorizationEndpoint, :deviceVerificationUri, :deviceVerificationUriComplete,
636
+ :idTokenSignatureKeyId, :introspectionEndpoint, :issuer, :jwks, :jwksUri,
637
+ :policyUri, :registrationEndpoint, :registrationManagementEndpoint,
638
+ :requestObjectEndpoint, :revocationEndpoint, :serviceDocumentation, :serviceName,
639
+ :tokenEndpoint, :tosUri, :userCodeCharset, :userInfoEndpoint, :userInfoSignatureKeyId,
640
+ :pushedAuthReqEndpoint
641
+ ])
642
+
643
+ # String array attributes.
644
+ STRING_ARRAY_ATTRIBUTES = ::Set.new([
645
+ :supportedAcrs, :supportedBackchannelTokenDeliveryModes, :supportedClaimLocales,
646
+ :supportedClaims, :supportedClaimTypes, :supportedDeveloperSnses,
647
+ :supportedDisplays, :supportedGrantTypes, :supportedResponseTypes,
648
+ :supportedServiceProfiles, :supportedSnses, :supportedTokenAuthMethods,
649
+ :supportedUiLocales, :trustedRootCertificates, :supportedAuthorizationDataTypes,
650
+ :supportedTrustFrameworks, :supportedEvidence, :supportedIdentityDocuments,
651
+ :supportedVerificationMethods, :supportedVerifiedClaims
652
+ ])
653
+
654
+ # SNS credentials array attributes.
655
+ SNS_CREDENTIALS_ARRAY_ATTRIBUTES = ::Set.new([
656
+ :developerSnsCredentials, :snsCredentials
657
+ ])
658
+
659
+ # Mapping from snake cases to camel cases.
660
+ SNAKE_TO_CAMEL = {
661
+ :access_token_duration => :accessTokenDuration,
662
+ :access_token_sign_alg => :accessTokenSignAlg,
663
+ :access_token_signature_key_id => :accessTokenSignatureKeyId,
664
+ :access_token_type => :accessTokenType,
665
+ :allowable_clock_skew => :allowableClockSkew,
666
+ :api_key => :apiKey,
667
+ :api_secret => :apiSecret,
668
+ :authentication_callback_api_key => :authenticationCallbackApiKey,
669
+ :authentication_callback_api_secret => :authenticationCallbackApiSecret,
670
+ :authentication_callback_endpoint => :authenticationCallbackEndpoint,
671
+ :authorization_endpoint => :authorizationEndpoint,
672
+ :authorization_response_duration => :authorizationResponseDuration,
673
+ :authorization_signature_key_id => :authorizationSignatureKeyId,
674
+ :backchannel_authentication_endpoint => :backchannelAuthenticationEndpoint,
675
+ :backchannel_binding_message_required_in_fapi => :backchannelBindingMessageRequiredInFapi,
676
+ :backchannel_auth_req_id_duration => :backchannelAuthReqIdDuration,
677
+ :backchannel_polling_interval => :backchannelPollingInterval,
678
+ :backchannel_user_code_parameter_supported => :backchannelUserCodeParameterSupported,
679
+ :developer_authentication_callback_api_key => :developerAuthenticationCallbackApiKey,
680
+ :developer_authentication_callback_api_secret => :developerAuthenticationCallbackApiSecret,
681
+ :developer_authentication_callback_endpoint => :developerAuthenticationCallbackEndpoint,
682
+ :developer_sns_credentials => :developerSnsCredentials,
683
+ :device_authorization_endpoint => :deviceAuthorizationEndpoint,
684
+ :device_flow_code_duration => :deviceFlowCodeDuration,
685
+ :device_flow_polling_interval => :deviceFlowPollingInterval,
686
+ :device_verification_uri => :deviceVerificationUri,
687
+ :device_verification_uri_complete => :deviceVerificationUriComplete,
688
+ :client_id_alias_enabled => :clientIdAliasEnabled,
689
+ :clients_per_developer => :clientsPerDeveloper,
690
+ :created_at => :createdAt,
691
+ :direct_authorization_endpoint_enabled => :directAuthorizationEndpointEnabled,
692
+ :direct_introspection_endpoint_enabled => :directIntrospectionEndpointEnabled,
693
+ :direct_jwks_endpoint_enabled => :directJwksEndpointEnabled,
694
+ :direct_revocation_endpoint_enabled => :directRevocationEndpointEnabled,
695
+ :direct_token_endpoint_enabled => :directTokenEndpointEnabled,
696
+ :direct_user_info_endpoint_enabled => :directUserInfoEndpointEnabled,
697
+ :dynamic_registration_supported => :dynamicRegistrationSupported,
698
+ :error_description_omitted => :errorDescriptionOmitted,
699
+ :error_uri_omitted => :errorUriOmitted,
700
+ :id_token_duration => :idTokenDuration,
701
+ :id_token_signature_key_id => :idTokenSignatureKeyId,
702
+ :introspection_endpoint => :introspectionEndpoint,
703
+ :jwks_uri => :jwksUri,
704
+ :modified_at => :modifiedAt,
705
+ :mutual_tls_validate_pki_cert_chain => :mutualTlsValidatePkiCertChain,
706
+ :pkce_required => :pkceRequired,
707
+ :pkce_s256_required => :pkceS256Required,
708
+ :policy_uri => :policyUri,
709
+ :refresh_token_duration => :refreshTokenDuration,
710
+ :refresh_token_kept => :refreshTokenKept,
711
+ :registration_endpoint => :registrationEndpoint,
712
+ :registration_management_endpoint => :registrationManagementEndpoint,
713
+ :revocation_endpoint => :revocationEndpoint,
714
+ :request_object_endpoint => :requestObjectEndpoint,
715
+ :service_documentation => :serviceDocumentation,
716
+ :service_name => :serviceName,
717
+ :service_owner_number => :serviceOwnerNumber,
718
+ :single_access_token_per_subject => :singleAccessTokenPerSubject,
719
+ :sns_credentials => :snsCredentials,
720
+ :supported_acrs => :supportedAcrs,
721
+ :supported_backchannel_token_delivery_modes => :supportedBackchannelTokenDeliveryModes,
722
+ :supported_claim_locales => :supportedClaimLocales,
723
+ :supported_claims => :supportedClaims,
724
+ :supported_claim_types => :supportedClaimTypes,
725
+ :supported_developer_snses => :supportedDeveloperSnses,
726
+ :supported_displays => :supportedDisplays,
727
+ :supported_grant_types => :supportedGrantTypes,
728
+ :supported_response_types => :supportedResponseTypes,
729
+ :supported_scopes => :supportedScopes,
730
+ :supported_service_profiles => :supportedServiceProfiles,
731
+ :supported_snses => :supportedSnses,
732
+ :supported_token_auth_methods => :supportedTokenAuthMethods,
733
+ :supported_ui_locales => :supportedUiLocales,
734
+ :tls_client_certificate_bound_access_tokens => :tlsClientCertificateBoundAccessTokens,
735
+ :token_endpoint => :tokenEndpoint,
736
+ :tos_uri => :tosUri,
737
+ :trusted_root_certificates => :trustedRootCertificates,
738
+ :user_code_charset => :userCodeCharset,
739
+ :user_code_length => :userCodeLength,
740
+ :user_info_endpoint => :userInfoEndpoint,
741
+ :user_info_signature_key_id => :userInfoSignatureKeyId,
742
+ :mtls_endpoint_aliases => :mtlsEndpointAliases,
743
+ :pushed_auth_req_endpoint => :pushedAuthReqEndpoint,
744
+ :pushed_auth_req_duration => :pushedAuthReqDuration,
745
+ :supported_authorization_data_types => :supportedAuthorizationDataTypes,
746
+ :supported_trust_frameworks => :supportedTrustFrameworks,
747
+ :supported_evidence => :supportedEvidence,
748
+ :supported_identity_documents => :supportedIdentityDocuments,
749
+ :supported_verification_methods => :supportedVerificationMethods,
750
+ :supported_verified_claims => :supportedVerifiedClaims,
751
+ :missing_client_id_allowed => :missingClientIdAllowed,
752
+ :refresh_token_duration_kept => :refreshTokenDurationKept,
753
+ :par_required => :parRequired,
754
+ :request_object_required => :requestObjectRequired,
755
+ :traditional_request_object_processing_applied => :traditionalRequestObjectProcessingApplied,
756
+ :claim_shortcut_restrictive => :claimShortcutRestrictive,
757
+ :scope_required => :scopeRequired
758
+ }
759
+
760
+ # The constructor
761
+ def initialize(hash = nil)
762
+ # Set default values to integer attributes.
763
+ INTEGER_ATTRIBUTES.each do |attr|
764
+ send("#{attr}=", 0)
765
+ end
766
+
767
+ # Set default values to boolean attributes.
768
+ BOOLEAN_ATTRIBUTES.each do |attr|
769
+ send("#{attr}=", false)
770
+ end
771
+
772
+ # Set default values to string attributes.
773
+ STRING_ATTRIBUTES.each do |attr|
774
+ send("#{attr}=", nil)
775
+ end
776
+
777
+ # Set default values to string array attributes.
778
+ STRING_ARRAY_ATTRIBUTES.each do |attr|
779
+ send("#{attr}=", nil)
780
+ end
781
+
782
+ # Set default values to sns credentials array attributes.
783
+ SNS_CREDENTIALS_ARRAY_ATTRIBUTES.each do |attr|
784
+ send("#{attr}=", nil)
785
+ end
786
+
787
+ # Set default values to special objects.
788
+ @metadata = nil
789
+ @supportedScopes = nil
790
+ @mtlsEndpointAliases = nil
791
+
792
+ # Set attribute values using the given hash.
793
+ authlete_model_update(hash)
794
+ end
795
+
796
+ def authlete_model_convert_key(key)
797
+ key = key.to_sym
798
+
799
+ # Convert snakecase to camelcase, if necessary.
800
+ if SNAKE_TO_CAMEL.has_key?(key)
801
+ key = SNAKE_TO_CAMEL[key]
802
+ end
803
+
804
+ key
805
+ end
806
+
807
+ def authlete_model_simple_attribute?(key)
808
+ INTEGER_ATTRIBUTES.include?(key) or
809
+ BOOLEAN_ATTRIBUTES.include?(key) or
810
+ STRING_ATTRIBUTES.include?(key) or
811
+ STRING_ARRAY_ATTRIBUTES.include?(key)
812
+ end
813
+
814
+ def authlete_model_update(hash)
815
+ return if hash.nil?
816
+
817
+ hash.each do |key, value|
818
+ key = authlete_model_convert_key(key)
819
+
820
+ if authlete_model_simple_attribute?(key)
821
+ send("#{key}=", value)
822
+ elsif SNS_CREDENTIALS_ARRAY_ATTRIBUTES.include?(key)
823
+ # Get an array consisting of "SnsCredentials" objects.
824
+ parsed = get_parsed_array(value) do |element|
825
+ Authlete::Model::SnsCredentials.parse(element)
826
+ end
827
+
828
+ send("#{key}=", parsed)
829
+ elsif key == :metadata
830
+ @metadata = get_parsed_array(value) do |element|
831
+ Authlete::Model::Pair.parse(element)
832
+ end
833
+ elsif key == :supportedScopes
834
+ @supportedScopes = get_parsed_array(value) do |element|
835
+ Authlete::Model::Scope.parse(element)
836
+ end
837
+ elsif key == :mtlsEndpointAliases
838
+ @mtlsEndpointAliases = get_parsed_array(value) do |element|
839
+ Authlete::Model::NamedUri.parse(element)
840
+ end
841
+ end
842
+ end
843
+
844
+ self
845
+ end
846
+
847
+ public
848
+
849
+ # Construct an instance from the given hash.
850
+ #
851
+ # If the given argument is nil or is not a Hash, nil is returned.
852
+ # Otherwise, Service.new(hash) is returned.
853
+ def self.parse(hash)
854
+ if hash.nil? or (hash.kind_of?(Hash) == false)
855
+ return nil
856
+ end
857
+
858
+ Service.new(hash)
859
+ end
860
+
861
+ # Convert this object into a hash.
862
+ def to_hash
863
+ hash = {}
864
+
865
+ instance_variables.each do |var|
866
+ key = var.to_s.delete("@").to_sym
867
+ val = instance_variable_get(var)
868
+
869
+ if authlete_model_simple_attribute?(key) or val.nil?
870
+ hash[key] = val
871
+ elsif key == :developerSnsCredentials or key == :snsCredentials or
872
+ key == :supportedScopes or key == :metadata or key == :mtlsEndpointAliases
873
+ hash[key] = val.map { |element| element.to_hash }
874
+ end
875
+ end
876
+
877
+ hash
878
+ end
879
+ end
880
+ end
788
881
  end