authlete 1.0.20 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (161) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +2 -1
  3. data/Makefile +40 -0
  4. data/README.md +20 -20
  5. data/Rakefile +5 -0
  6. data/authlete.gemspec +2 -2
  7. data/lib/authlete.rb +28 -9
  8. data/lib/authlete/api.rb +153 -322
  9. data/lib/authlete/authentication-server.rb +230 -230
  10. data/lib/authlete/exception.rb +14 -15
  11. data/lib/authlete/model/base.rb +30 -0
  12. data/lib/authlete/model/client-extension.rb +17 -119
  13. data/lib/authlete/model/client.rb +203 -338
  14. data/lib/authlete/model/hashable.rb +13 -33
  15. data/lib/authlete/model/named-uri.rb +13 -74
  16. data/lib/authlete/model/pair.rb +13 -74
  17. data/lib/authlete/model/param-initializer.rb +45 -0
  18. data/lib/authlete/model/property.rb +15 -85
  19. data/lib/authlete/model/request/authentication-callback-request.rb +63 -55
  20. data/lib/authlete/model/request/authorization-fail-request.rb +14 -75
  21. data/lib/authlete/model/request/authorization-issue-request.rb +38 -119
  22. data/lib/authlete/model/request/authorization-request.rb +8 -73
  23. data/lib/authlete/model/request/backchannel-authentication-complete-request.rb +97 -0
  24. data/lib/authlete/model/request/backchannel-authentication-fail-request.rb +55 -0
  25. data/lib/authlete/model/request/backchannel-authentication-issue-request.rb +37 -0
  26. data/lib/authlete/model/request/backchannel-authentication-request.rb +63 -0
  27. data/lib/authlete/model/request/base.rb +26 -0
  28. data/lib/authlete/model/request/client-authorization-delete-request.rb +7 -93
  29. data/lib/authlete/model/request/client-authorization-get-list-request.rb +17 -89
  30. data/lib/authlete/model/request/client-authorization-update-request.rb +11 -86
  31. data/lib/authlete/model/request/client-registration-request.rb +49 -0
  32. data/lib/authlete/model/request/client-secret-update-request.rb +7 -89
  33. data/lib/authlete/model/request/developer-authentication-callback-request.rb +40 -43
  34. data/lib/authlete/model/request/device-authorization-request.rb +63 -0
  35. data/lib/authlete/model/request/device-complete-request.rb +99 -0
  36. data/lib/authlete/model/request/device-verification-request.rb +40 -0
  37. data/lib/authlete/model/request/granted-scopes-request.rb +8 -74
  38. data/lib/authlete/model/request/introspection-request.rb +24 -83
  39. data/lib/authlete/model/request/pushed-auth-req-request.rb +64 -0
  40. data/lib/authlete/model/request/revocation-request.rb +14 -88
  41. data/lib/authlete/model/request/standard-introspection-request.rb +8 -73
  42. data/lib/authlete/model/request/token-create-request.rb +52 -183
  43. data/lib/authlete/model/request/token-fail-request.rb +12 -74
  44. data/lib/authlete/model/request/token-issue-request.rb +22 -80
  45. data/lib/authlete/model/request/token-request.rb +44 -81
  46. data/lib/authlete/model/request/token-update-request.rb +35 -121
  47. data/lib/authlete/model/request/user-info-issue-request.rb +14 -80
  48. data/lib/authlete/model/request/user-info-request.rb +25 -70
  49. data/lib/authlete/model/response/access-token.rb +96 -0
  50. data/lib/authlete/model/response/authentication-callback-response.rb +24 -19
  51. data/lib/authlete/model/response/authorization-fail-response.rb +13 -15
  52. data/lib/authlete/model/response/authorization-issue-response.rb +29 -32
  53. data/lib/authlete/model/response/authorization-response.rb +97 -123
  54. data/lib/authlete/model/response/authorized-client-list-response.rb +37 -0
  55. data/lib/authlete/model/response/backchannel-authentication-complete-response.rb +143 -0
  56. data/lib/authlete/model/response/backchannel-authentication-fail-response.rb +47 -0
  57. data/lib/authlete/model/response/backchannel-authentication-issue-response.rb +63 -0
  58. data/lib/authlete/model/response/backchannel-authentication-response.rb +160 -0
  59. data/lib/authlete/model/response/client-list-response.rb +58 -0
  60. data/lib/authlete/model/response/client-registration-response.rb +50 -0
  61. data/lib/authlete/model/response/client-secret-refresh-response.rb +12 -12
  62. data/lib/authlete/model/response/client-secret-update-response.rb +12 -12
  63. data/lib/authlete/model/response/developer-authentication-callback-response.rb +24 -19
  64. data/lib/authlete/model/response/device-authorization-response.rb +134 -0
  65. data/lib/authlete/model/response/device-complete-response.rb +39 -0
  66. data/lib/authlete/model/response/device-verification-response.rb +96 -0
  67. data/lib/authlete/model/response/granted-scopes-get-response.rb +27 -19
  68. data/lib/authlete/model/response/introspection-response.rb +64 -58
  69. data/lib/authlete/model/response/pushed-auth-req-response.rb +59 -0
  70. data/lib/authlete/model/response/revocation-response.rb +12 -15
  71. data/lib/authlete/model/response/service-list-response.rb +54 -0
  72. data/lib/authlete/model/response/standard-introspection-response.rb +13 -15
  73. data/lib/authlete/model/response/token-create-response.rb +50 -55
  74. data/lib/authlete/model/response/token-fail-response.rb +14 -17
  75. data/lib/authlete/model/response/token-issue-response.rb +49 -62
  76. data/lib/authlete/model/response/token-list-response.rb +64 -0
  77. data/lib/authlete/model/response/token-response.rb +59 -79
  78. data/lib/authlete/model/response/token-update-response.rb +28 -23
  79. data/lib/authlete/model/response/user-info-issue-response.rb +16 -16
  80. data/lib/authlete/model/response/user-info-response.rb +48 -42
  81. data/lib/authlete/model/result.rb +14 -13
  82. data/lib/authlete/model/scope.rb +68 -158
  83. data/lib/authlete/model/service-owner.rb +32 -116
  84. data/lib/authlete/model/service.rb +660 -830
  85. data/lib/authlete/model/sns-credentials.rb +51 -124
  86. data/lib/authlete/model/tagged-value.rb +14 -69
  87. data/lib/authlete/utility.rb +70 -99
  88. data/lib/authlete/version.rb +3 -3
  89. data/test/authlete/model/request/test_authentication-callback-request.rb +100 -0
  90. data/test/authlete/model/request/test_authorization-fail-request.rb +67 -0
  91. data/test/authlete/model/request/test_authorization-issue-request.rb +94 -0
  92. data/test/authlete/model/request/test_authorization-request.rb +57 -0
  93. data/test/authlete/model/request/test_backchannel-authentication-complete-request.rb +102 -0
  94. data/test/authlete/model/request/test_backchannel-authentication-fail-request.rb +71 -0
  95. data/test/authlete/model/request/test_backchannel-authentication-issue-request.rb +57 -0
  96. data/test/authlete/model/request/test_backchannel-authentication-request.rb +75 -0
  97. data/test/authlete/model/request/test_client-authorization-delete-request.rb +57 -0
  98. data/test/authlete/model/request/test_client-authorization-get-list-request.rb +71 -0
  99. data/test/authlete/model/request/test_client-authorization-update-request.rb +63 -0
  100. data/test/authlete/model/request/test_client-registration-request.rb +68 -0
  101. data/test/authlete/model/request/test_device-authorization-request.rb +75 -0
  102. data/test/authlete/model/request/test_device-complete-request.rb +102 -0
  103. data/test/authlete/model/request/test_device-verification-request.rb +57 -0
  104. data/test/authlete/model/request/test_granted-scopes-request.rb +57 -0
  105. data/test/authlete/model/request/test_introspection-request.rb +79 -0
  106. data/test/authlete/model/request/test_pushed-auth-req-request.rb +75 -0
  107. data/test/authlete/model/request/test_revocation-request.rb +67 -0
  108. data/test/authlete/model/request/test_standard-introspection-request.rb +57 -0
  109. data/test/authlete/model/request/test_token-create-request.rb +110 -0
  110. data/test/authlete/model/request/test_token-fail-request.rb +63 -0
  111. data/test/authlete/model/request/test_token-issue-request.rb +70 -0
  112. data/test/authlete/model/request/test_token-request.rb +94 -0
  113. data/test/authlete/model/request/test_token-update-request.rb +82 -0
  114. data/test/authlete/model/request/test_user-info-issue-request.rb +67 -0
  115. data/test/authlete/model/request/test_user-info-request.rb +75 -0
  116. data/test/authlete/model/response/test_access-token.rb +101 -0
  117. data/test/authlete/model/response/test_authorization-fail-response.rb +68 -0
  118. data/test/authlete/model/response/test_authorization-issue-response.rb +92 -0
  119. data/test/authlete/model/response/test_authorization-response.rb +145 -0
  120. data/test/authlete/model/response/test_authorized-client-list-response.rb +83 -0
  121. data/test/authlete/model/response/test_backchannel-authentication-complete-response.rb +132 -0
  122. data/test/authlete/model/response/test_backchannel-authentication-fail-response.rb +68 -0
  123. data/test/authlete/model/response/test_backchannel-authentication-issue-response.rb +80 -0
  124. data/test/authlete/model/response/test_backchannel-authentication-response.rb +156 -0
  125. data/test/authlete/model/response/test_client-list-response.rb +79 -0
  126. data/test/authlete/model/response/test_client-secret-refresh-response.rb +68 -0
  127. data/test/authlete/model/response/test_client-secret-update-response.rb +68 -0
  128. data/test/authlete/model/response/test_device-authorization-response.rb +140 -0
  129. data/test/authlete/model/response/test_device-complete-response.rb +64 -0
  130. data/test/authlete/model/response/test_device-verification-response.rb +112 -0
  131. data/test/authlete/model/response/test_granted-scopes-get-response.rb +84 -0
  132. data/test/authlete/model/response/test_introspection-response.rb +127 -0
  133. data/test/authlete/model/response/test_pushed-auth-req-response.rb +76 -0
  134. data/test/authlete/model/response/test_revocation-response.rb +68 -0
  135. data/test/authlete/model/response/test_service-list-response.rb +72 -0
  136. data/test/authlete/model/response/test_standard-introspection-response.rb +68 -0
  137. data/test/authlete/model/response/test_token-create-response.rb +107 -0
  138. data/test/authlete/model/response/test_token-fail-response.rb +68 -0
  139. data/test/authlete/model/response/test_token-issue-response.rb +127 -0
  140. data/test/authlete/model/response/test_token-list-response.rb +84 -0
  141. data/test/authlete/model/response/test_token-response.rb +147 -0
  142. data/test/authlete/model/response/test_token-update-response.rb +87 -0
  143. data/test/authlete/model/response/test_user-info-issue-response.rb +68 -0
  144. data/test/authlete/model/response/test_user-info-response.rb +107 -0
  145. data/test/authlete/model/test_client-extension.rb +95 -0
  146. data/test/authlete/model/test_client.rb +461 -0
  147. data/test/authlete/model/test_named-uri.rb +85 -0
  148. data/test/authlete/model/test_pair.rb +85 -0
  149. data/test/authlete/model/test_property.rb +90 -0
  150. data/test/authlete/model/test_result.rb +68 -0
  151. data/test/authlete/model/test_scope.rb +106 -0
  152. data/test/authlete/model/test_service-owner.rb +80 -0
  153. data/test/authlete/model/test_service.rb +614 -0
  154. data/test/authlete/model/test_sns-credentials.rb +88 -0
  155. data/test/authlete/model/test_tagged-value.rb +83 -0
  156. data/test/authlete/test_exception.rb +70 -0
  157. metadata +173 -13
  158. data/lib/authlete/model/client-list.rb +0 -129
  159. data/lib/authlete/model/response/client-authorization-get-list-response.rb +0 -60
  160. data/lib/authlete/model/response/service-creatable-response.rb +0 -51
  161. data/lib/authlete/model/service-list.rb +0 -128
@@ -1,830 +1,660 @@
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
- private
562
-
563
- # Integer attributes.
564
- INTEGER_ATTRIBUTES = ::Set.new([
565
- :accessTokenDuration, :allowableClockSkew, :apiKey, :authorizationResponseDuration,
566
- :backchannelAuthReqIdDuration, :backchannelPollingInterval, :clientsPerDeveloper,
567
- :createdAt, :deviceFlowCodeDuration, :deviceFlowPollingInterval,
568
- :idTokenDuration, :modifiedAt, :number, :refreshTokenDuration,
569
- :serviceOwnerNumber, :userCodeLength, :pushedAuthReqDuration
570
- ])
571
-
572
- # Boolean attributes.
573
- BOOLEAN_ATTRIBUTES = ::Set.new([
574
- :backchannelBindingMessageRequiredInFapi, :backchannelUserCodeParameterSupported,
575
- :clientIdAliasEnabled,
576
- :directAuthorizationEndpointEnabled, :directIntrospectionEndpointEnabled,
577
- :directJwksEndpointEnabled, :directRevocationEndpointEnabled, :directTokenEndpointEnabled,
578
- :directUserInfoEndpointEnabled, :errorDescriptionOmitted, :errorUriOmitted,
579
- :mutualTlsValidatePkiCertChain, :pkceRequired, :pkceS256Required, :refreshTokenKept,
580
- :singleAccessTokenPerSubject, :tlsClientCertificateBoundAccessTokens,
581
- :dynamicRegistrationSupported
582
- ])
583
-
584
- # String attributes.
585
- STRING_ATTRIBUTES = ::Set.new([
586
- :accessTokenSignAlg, :accessTokenSignatureKeyId, :accessTokenType,
587
- :apiSecret, :authenticationCallbackApiKey, :authenticationCallbackApiSecret,
588
- :authenticationCallbackEndpoint, :authorizationEndpoint, :authorizationSignatureKeyId,
589
- :backchannelAuthenticationEndpoint, :description, :developerAuthenticationCallbackApiKey,
590
- :developerAuthenticationCallbackApiSecret, :developerAuthenticationCallbackEndpoint,
591
- :deviceAuthorizationEndpoint, :deviceVerificationUri, :deviceVerificationUriComplete,
592
- :idTokenSignatureKeyId, :introspectionEndpoint, :issuer, :jwks, :jwksUri,
593
- :policyUri, :registrationEndpoint, :registrationManagementEndpoint,
594
- :requestObjectEndpoint, :revocationEndpoint, :serviceDocumentation, :serviceName,
595
- :tokenEndpoint, :tosUri, :userCodeCharset, :userInfoEndpoint, :userInfoSignatureKeyId,
596
- :pushedAuthReqEndpoint
597
- ])
598
-
599
- # String array attributes.
600
- STRING_ARRAY_ATTRIBUTES = ::Set.new([
601
- :supportedAcrs, :supportedBackchannelTokenDeliveryModes, :supportedClaimLocales,
602
- :supportedClaims, :supportedClaimTypes, :supportedDeveloperSnses,
603
- :supportedDisplays, :supportedGrantTypes, :supportedResponseTypes,
604
- :supportedServiceProfiles, :supportedSnses, :supportedTokenAuthMethods,
605
- :supportedUiLocales, :trustedRootCertificates, :supportedAuthorizationDataTypes,
606
- :supportedTrustFrameworks, :supportedEvidence, :supportedIdentityDocuments,
607
- :supportedVerificationMethods, :supportedVerifiedClaims
608
- ])
609
-
610
- # SNS credentials array attributes.
611
- SNS_CREDENTIALS_ARRAY_ATTRIBUTES = ::Set.new([
612
- :developerSnsCredentials, :snsCredentials
613
- ])
614
-
615
- # Mapping from snake cases to camel cases.
616
- SNAKE_TO_CAMEL = {
617
- :access_token_duration => :accessTokenDuration,
618
- :access_token_sign_alg => :accessTokenSignAlg,
619
- :access_token_signature_key_id => :accessTokenSignatureKeyId,
620
- :access_token_type => :accessTokenType,
621
- :allowable_clock_skew => :allowableClockSkew,
622
- :api_key => :apiKey,
623
- :api_secret => :apiSecret,
624
- :authentication_callback_api_key => :authenticationCallbackApiKey,
625
- :authentication_callback_api_secret => :authenticationCallbackApiSecret,
626
- :authentication_callback_endpoint => :authenticationCallbackEndpoint,
627
- :authorization_endpoint => :authorizationEndpoint,
628
- :authorization_response_duration => :authorizationResponseDuration,
629
- :authorization_signature_key_id => :authorizationSignatureKeyId,
630
- :backchannel_authentication_endpoint => :backchannelAuthenticationEndpoint,
631
- :backchannel_binding_message_required_in_fapi => :backchannelBindingMessageRequiredInFapi,
632
- :backchannel_auth_req_id_duration => :backchannelAuthReqIdDuration,
633
- :backchannel_polling_interval => :backchannelPollingInterval,
634
- :backchannel_user_code_parameter_supported => :backchannelUserCodeParameterSupported,
635
- :developer_authentication_callback_api_key => :developerAuthenticationCallbackApiKey,
636
- :developer_authentication_callback_api_secret => :developerAuthenticationCallbackApiSecret,
637
- :developer_authentication_callback_endpoint => :developerAuthenticationCallbackEndpoint,
638
- :developer_sns_credentials => :developerSnsCredentials,
639
- :device_authorization_endpoint => :deviceAuthorizationEndpoint,
640
- :device_flow_code_duration => :deviceFlowCodeDuration,
641
- :device_flow_polling_interval => :deviceFlowPollingInterval,
642
- :device_verification_uri => :deviceVerificationUri,
643
- :device_verification_uri_complete => :deviceVerificationUriComplete,
644
- :client_id_alias_enabled => :clientIdAliasEnabled,
645
- :clients_per_developer => :clientsPerDeveloper,
646
- :created_at => :createdAt,
647
- :direct_authorization_endpoint_enabled => :directAuthorizationEndpointEnabled,
648
- :direct_introspection_endpoint_enabled => :directIntrospectionEndpointEnabled,
649
- :direct_jwks_endpoint_enabled => :directJwksEndpointEnabled,
650
- :direct_revocation_endpoint_enabled => :directRevocationEndpointEnabled,
651
- :direct_token_endpoint_enabled => :directTokenEndpointEnabled,
652
- :direct_user_info_endpoint_enabled => :directUserInfoEndpointEnabled,
653
- :dynamic_registration_supported => :dynamicRegistrationSupported,
654
- :error_description_omitted => :errorDescriptionOmitted,
655
- :error_uri_omitted => :errorUriOmitted,
656
- :id_token_duration => :idTokenDuration,
657
- :id_token_signature_key_id => :idTokenSignatureKeyId,
658
- :introspection_endpoint => :introspectionEndpoint,
659
- :jwks_uri => :jwksUri,
660
- :modified_at => :modifiedAt,
661
- :mutual_tls_validate_pki_cert_chain => :mutualTlsValidatePkiCertChain,
662
- :pkce_required => :pkceRequired,
663
- :pkce_s256_required => :pkceS256Required,
664
- :policy_uri => :policyUri,
665
- :refresh_token_duration => :refreshTokenDuration,
666
- :refresh_token_kept => :refreshTokenKept,
667
- :registration_endpoint => :registrationEndpoint,
668
- :registration_management_endpoint => :registrationManagementEndpoint,
669
- :revocation_endpoint => :revocationEndpoint,
670
- :request_object_endpoint => :requestObjectEndpoint,
671
- :service_documentation => :serviceDocumentation,
672
- :service_name => :serviceName,
673
- :service_owner_number => :serviceOwnerNumber,
674
- :single_access_token_per_subject => :singleAccessTokenPerSubject,
675
- :sns_credentials => :snsCredentials,
676
- :supported_acrs => :supportedAcrs,
677
- :supported_backchannel_token_delivery_modes => :supportedBackchannelTokenDeliveryModes,
678
- :supported_claim_locales => :supportedClaimLocales,
679
- :supported_claims => :supportedClaims,
680
- :supported_claim_types => :supportedClaimTypes,
681
- :supported_developer_snses => :supportedDeveloperSnses,
682
- :supported_displays => :supportedDisplays,
683
- :supported_grant_types => :supportedGrantTypes,
684
- :supported_response_types => :supportedResponseTypes,
685
- :supported_scopes => :supportedScopes,
686
- :supported_service_profiles => :supportedServiceProfiles,
687
- :supported_snses => :supportedSnses,
688
- :supported_token_auth_methods => :supportedTokenAuthMethods,
689
- :supported_ui_locales => :supportedUiLocales,
690
- :tls_client_certificate_bound_access_tokens => :tlsClientCertificateBoundAccessTokens,
691
- :token_endpoint => :tokenEndpoint,
692
- :tos_uri => :tosUri,
693
- :trusted_root_certificates => :trustedRootCertificates,
694
- :user_code_charset => :userCodeCharset,
695
- :user_code_length => :userCodeLength,
696
- :user_info_endpoint => :userInfoEndpoint,
697
- :user_info_signature_key_id => :userInfoSignatureKeyId,
698
- :mtls_endpoint_aliases => :mtlsEndpointAliases,
699
- :pushed_auth_req_endpoint => :pushedAuthReqEndpoint,
700
- :pushed_auth_req_duration => :pushedAuthReqDuration,
701
- :supported_authorization_data_types => :supportedAuthorizationDataTypes,
702
- :supported_trust_frameworks => :supportedTrustFrameworks,
703
- :supported_evidence => :supportedEvidence,
704
- :supported_identity_documents => :supportedIdentityDocuments,
705
- :supported_verification_methods => :supportedVerificationMethods,
706
- :supported_verified_claims => :supportedVerifiedClaims
707
- }
708
-
709
- # The constructor
710
- def initialize(hash = nil)
711
- # Set default values to integer attributes.
712
- INTEGER_ATTRIBUTES.each do |attr|
713
- send("#{attr}=", 0)
714
- end
715
-
716
- # Set default values to boolean attributes.
717
- BOOLEAN_ATTRIBUTES.each do |attr|
718
- send("#{attr}=", false)
719
- end
720
-
721
- # Set default values to string attributes.
722
- STRING_ATTRIBUTES.each do |attr|
723
- send("#{attr}=", nil)
724
- end
725
-
726
- # Set default values to string array attributes.
727
- STRING_ARRAY_ATTRIBUTES.each do |attr|
728
- send("#{attr}=", nil)
729
- end
730
-
731
- # Set default values to sns credentials array attributes.
732
- SNS_CREDENTIALS_ARRAY_ATTRIBUTES.each do |attr|
733
- send("#{attr}=", nil)
734
- end
735
-
736
- # Set default values to special objects.
737
- @metadata = nil
738
- @supportedScopes = nil
739
- @mtlsEndpointAliases = nil
740
-
741
- # Set attribute values using the given hash.
742
- authlete_model_update(hash)
743
- end
744
-
745
- def authlete_model_convert_key(key)
746
- key = key.to_sym
747
-
748
- # Convert snakecase to camelcase, if necessary.
749
- if SNAKE_TO_CAMEL.has_key?(key)
750
- key = SNAKE_TO_CAMEL[key]
751
- end
752
-
753
- key
754
- end
755
-
756
- def authlete_model_simple_attribute?(key)
757
- INTEGER_ATTRIBUTES.include?(key) or
758
- BOOLEAN_ATTRIBUTES.include?(key) or
759
- STRING_ATTRIBUTES.include?(key) or
760
- STRING_ARRAY_ATTRIBUTES.include?(key)
761
- end
762
-
763
- def authlete_model_update(hash)
764
- return if hash.nil?
765
-
766
- hash.each do |key, value|
767
- key = authlete_model_convert_key(key)
768
-
769
- if authlete_model_simple_attribute?(key)
770
- send("#{key}=", value)
771
- elsif SNS_CREDENTIALS_ARRAY_ATTRIBUTES.include?(key)
772
- # Get an array consisting of "SnsCredentials" objects.
773
- parsed = get_parsed_array(value) do |element|
774
- Authlete::Model::SnsCredentials.parse(element)
775
- end
776
-
777
- send("#{key}=", parsed)
778
- elsif key == :metadata
779
- @metadata = get_parsed_array(value) do |element|
780
- Authlete::Model::Pair.parse(element)
781
- end
782
- elsif key == :supportedScopes
783
- @supportedScopes = get_parsed_array(value) do |element|
784
- Authlete::Model::Scope.parse(element)
785
- end
786
- elsif key == :mtlsEndpointAliases
787
- @mtlsEndpointAliases = get_parsed_array(value) do |element|
788
- Authlete::Model::NamedUri.parse(element)
789
- end
790
- end
791
- end
792
-
793
- self
794
- end
795
-
796
- public
797
-
798
- # Construct an instance from the given hash.
799
- #
800
- # If the given argument is nil or is not a Hash, nil is returned.
801
- # Otherwise, Service.new(hash) is returned.
802
- def self.parse(hash)
803
- if hash.nil? or (hash.kind_of?(Hash) == false)
804
- return nil
805
- end
806
-
807
- Service.new(hash)
808
- end
809
-
810
- # Convert this object into a hash.
811
- def to_hash
812
- hash = {}
813
-
814
- instance_variables.each do |var|
815
- key = var.to_s.delete("@").to_sym
816
- val = instance_variable_get(var)
817
-
818
- if authlete_model_simple_attribute?(key) or val.nil?
819
- hash[key] = val
820
- elsif key == :developerSnsCredentials or key == :snsCredentials or
821
- key == :supportedScopes or key == :metadata or key == :mtlsEndpointAliases
822
- hash[key] = val.map { |element| element.to_hash }
823
- end
824
- end
825
-
826
- hash
827
- end
828
- end
829
- end
830
- end
1
+ # :nodoc:
2
+ #
3
+ # Copyright (C) 2014-2020 Authlete, Inc.
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+
17
+
18
+ module Authlete
19
+ module Model
20
+ class Service < Authlete::Model::Base
21
+ include Authlete::Model::Hashable
22
+ include Authlete::Utility
23
+
24
+ attr_accessor :number
25
+
26
+ attr_accessor :serviceOwnerNumber
27
+ alias_method :service_owner_number, :serviceOwnerNumber
28
+ alias_method :service_owner_number=, :serviceOwnerNumber=
29
+
30
+ attr_accessor :serviceName
31
+ alias_method :service_name, :serviceName
32
+ alias_method :service_name=, :serviceName=
33
+
34
+ attr_accessor :apiKey
35
+ alias_method :api_key, :apiKey
36
+ alias_method :api_key=, :apiKey=
37
+
38
+ attr_accessor :apiSecret
39
+ alias_method :api_secret, :apiSecret
40
+ alias_method :api_secret=, :apiSecret=
41
+
42
+ attr_accessor :issuer
43
+
44
+ attr_accessor :authorizationEndpoint
45
+ alias_method :authorization_endpoint, :authorizationEndpoint
46
+ alias_method :authorization_endpoint=, :authorizationEndpoint=
47
+
48
+ attr_accessor :tokenEndpoint
49
+ alias_method :token_endpoint, :tokenEndpoint
50
+ alias_method :token_endpoint=, :tokenEndpoint=
51
+
52
+ attr_accessor :revocationEndpoint
53
+ alias_method :revocation_endpoint, :revocationEndpoint
54
+ alias_method :revocation_endpoint=, :revocationEndpoint=
55
+
56
+ attr_accessor :supportedRevocationAuthMethods
57
+ alias_method :supported_revocation_auth_methods, :supportedRevocationAuthMethods
58
+ alias_method :supported_revocation_auth_methods=, :supportedRevocationAuthMethods=
59
+
60
+ attr_accessor :userInfoEndpoint
61
+ alias_method :user_info_endpoint, :userInfoEndpoint
62
+ alias_method :user_info_endpoint=, :userInfoEndpoint=
63
+
64
+ attr_accessor :jwksUri
65
+ alias_method :jwks_uri, :jwksUri
66
+ alias_method :jwks_uri=, :jwksUri=
67
+
68
+ attr_accessor :jwks
69
+
70
+ attr_accessor :registrationEndpoint
71
+ alias_method :registration_endpoint, :registrationEndpoint
72
+ alias_method :registration_endpoint=, :registrationEndpoint=
73
+
74
+ attr_accessor :registrationManagementEndpoint
75
+ alias_method :registration_management_endpoint, :registrationManagementEndpoint
76
+ alias_method :registration_management_endpoint=, :registrationManagementEndpoint=
77
+
78
+ attr_accessor :supportedScopes
79
+ alias_method :supported_scopes, :supportedScopes
80
+ alias_method :supported_scopes=, :supportedScopes=
81
+
82
+ attr_accessor :supportedResponseTypes
83
+ alias_method :supported_response_types, :supportedResponseTypes
84
+ alias_method :supported_response_types=, :supportedResponseTypes=
85
+
86
+ attr_accessor :supportedGrantTypes
87
+ alias_method :supported_grant_types, :supportedGrantTypes
88
+ alias_method :supported_grant_types=, :supportedGrantTypes=
89
+
90
+ attr_accessor :supportedAcrs
91
+ alias_method :supported_acrs, :supportedAcrs
92
+ alias_method :supported_acrs=, :supportedAcrs=
93
+
94
+ attr_accessor :supportedTokenAuthMethods
95
+ alias_method :supported_token_auth_methods, :supportedTokenAuthMethods
96
+ alias_method :supported_token_auth_methods=, :supportedTokenAuthMethods=
97
+
98
+ attr_accessor :supportedDisplays
99
+ alias_method :supported_displays, :supportedDisplays
100
+ alias_method :supported_displays=, :supportedDisplays=
101
+
102
+ attr_accessor :supportedClaimTypes
103
+ alias_method :supported_claim_types, :supportedClaimTypes
104
+ alias_method :supported_claim_types=, :supportedClaimTypes=
105
+
106
+ attr_accessor :supportedClaims
107
+ alias_method :supported_claims, :supportedClaims
108
+ alias_method :supported_claims=, :supportedClaims=
109
+
110
+ attr_accessor :serviceDocumentation
111
+ alias_method :service_documentation, :serviceDocumentation
112
+ alias_method :service_documentation=, :serviceDocumentation=
113
+
114
+ attr_accessor :supportedClaimLocales
115
+ alias_method :supported_claim_locales, :supportedClaimLocales
116
+ alias_method :supported_claim_locales=, :supportedClaimLocales=
117
+
118
+ attr_accessor :supportedUiLocales
119
+ alias_method :supported_ui_locales, :supportedUiLocales
120
+ alias_method :supported_ui_locales=, :supportedUiLocales=
121
+
122
+ attr_accessor :policyUri
123
+ alias_method :policy_uri, :policyUri
124
+ alias_method :policy_uri=, :policyUri=
125
+
126
+ attr_accessor :tosUri
127
+ alias_method :tos_uri, :tosUri
128
+ alias_method :tos_uri=, :tosUri=
129
+
130
+ attr_accessor :authenticationCallbackEndpoint
131
+ alias_method :authentication_callback_endpoint, :authenticationCallbackEndpoint
132
+ alias_method :authentication_callback_endpoint=, :authenticationCallbackEndpoint=
133
+
134
+ attr_accessor :authenticationCallbackApiKey
135
+ alias_method :authentication_callback_api_key, :authenticationCallbackApiKey
136
+ alias_method :authentication_callback_api_key=, :authenticationCallbackApiKey=
137
+
138
+ attr_accessor :authenticationCallbackApiSecret
139
+ alias_method :authentication_callback_api_secret, :authenticationCallbackApiSecret
140
+ alias_method :authentication_callback_api_secret=, :authenticationCallbackApiSecret=
141
+
142
+ attr_accessor :supportedSnses
143
+ alias_method :supported_snses, :supportedSnses
144
+ alias_method :supported_snses=, :supportedSnses=
145
+
146
+ attr_accessor :snsCredentials
147
+ alias_method :sns_credentials, :snsCredentials
148
+ alias_method :sns_credentials=, :snsCredentials=
149
+
150
+ attr_accessor :createdAt
151
+ alias_method :created_at, :createdAt
152
+ alias_method :created_at=, :createdAt=
153
+
154
+ attr_accessor :modifiedAt
155
+ alias_method :modified_at, :modifiedAt
156
+ alias_method :modified_at=, :modifiedAt=
157
+
158
+ attr_accessor :developerAuthenticationCallbackEndpoint
159
+ alias_method :developer_authentication_callback_endpoint, :developerAuthenticationCallbackEndpoint
160
+ alias_method :developer_authentication_callback_endpoint=, :developerAuthenticationCallbackEndpoint=
161
+
162
+ attr_accessor :developerAuthenticationCallbackApiKey
163
+ alias_method :developer_authentication_callback_api_key, :developerAuthenticationCallbackApiKey
164
+ alias_method :developer_authentication_callback_api_key=, :developerAuthenticationCallbackApiKey=
165
+
166
+ attr_accessor :developerAuthenticationCallbackApiSecret
167
+ alias_method :developer_authentication_callback_api_secret, :developerAuthenticationCallbackApiSecret
168
+ alias_method :developer_authentication_callback_api_secret=, :developerAuthenticationCallbackApiSecret=
169
+
170
+ attr_accessor :supportedDeveloperSnses
171
+ alias_method :supported_developer_snses, :supportedDeveloperSnses
172
+ alias_method :supported_developer_snses=, :supportedDeveloperSnses=
173
+
174
+ attr_accessor :developerSnsCredentials
175
+ alias_method :developer_sns_credentials, :developerSnsCredentials
176
+ alias_method :developer_sns_credentials=, :developerSnsCredentials=
177
+
178
+ attr_accessor :clientsPerDeveloper
179
+ alias_method :clients_per_developer, :clientsPerDeveloper
180
+ alias_method :clients_per_developer=, :clientsPerDeveloper=
181
+
182
+ attr_accessor :directAuthorizationEndpointEnabled
183
+ alias_method :direct_authorization_endpoint_enabled, :directAuthorizationEndpointEnabled
184
+ alias_method :direct_authorization_endpoint_enabled=, :directAuthorizationEndpointEnabled=
185
+
186
+ attr_accessor :directTokenEndpointEnabled
187
+ alias_method :direct_token_endpoint_enabled, :directTokenEndpointEnabled
188
+ alias_method :direct_token_endpoint_enabled=, :directTokenEndpointEnabled=
189
+
190
+ attr_accessor :directRevocationEndpointEnabled
191
+ alias_method :direct_revocation_endpoint_enabled, :directRevocationEndpointEnabled
192
+ alias_method :direct_revocation_endpoint_enabled=, :directRevocationEndpointEnabled=
193
+
194
+ attr_accessor :directUserInfoEndpointEnabled
195
+ alias_method :direct_user_info_endpoint_enabled, :directUserInfoEndpointEnabled
196
+ alias_method :direct_user_info_endpoint_enabled=, :directUserInfoEndpointEnabled=
197
+
198
+ attr_accessor :directJwksEndpointEnabled
199
+ alias_method :direct_jwks_endpoint_enabled, :directJwksEndpointEnabled
200
+ alias_method :direct_jwks_endpoint_enabled=, :directJwksEndpointEnabled=
201
+
202
+ attr_accessor :directIntrospectionEndpointEnabled
203
+ alias_method :direct_introspection_endpoint_enabled, :directIntrospectionEndpointEnabled
204
+ alias_method :direct_introspection_endpoint_enabled=, :directIntrospectionEndpointEnabled=
205
+
206
+ attr_accessor :singleAccessTokenPerSubject
207
+ alias_method :single_access_token_per_subject, :singleAccessTokenPerSubject
208
+ alias_method :single_access_token_per_subject=, :singleAccessTokenPerSubject=
209
+
210
+ attr_accessor :pkceRequired
211
+ alias_method :pkce_required, :pkceRequired
212
+ alias_method :pkce_required=, :pkceRequired=
213
+
214
+ attr_accessor :pkceS256Required
215
+ alias_method :pkce_s256_required, :pkceS256Required
216
+ alias_method :pkce_s256_required=, :pkceS256Required=
217
+
218
+ attr_accessor :refreshTokenKept
219
+ alias_method :refresh_token_kept, :refreshTokenKept
220
+ alias_method :refresh_token_kept=, :refreshTokenKept=
221
+
222
+ attr_accessor :refreshTokenDurationKept
223
+ alias_method :refresh_token_duration_kept, :refreshTokenDurationKept
224
+ alias_method :refresh_token_duration_kept=, :refreshTokenDurationKept=
225
+
226
+ attr_accessor :errorDescriptionOmitted
227
+ alias_method :error_description_omitted, :errorDescriptionOmitted
228
+ alias_method :error_description_omitted=, :errorDescriptionOmitted=
229
+
230
+ attr_accessor :errorUriOmitted
231
+ alias_method :error_uri_omitted, :errorUriOmitted
232
+ alias_method :error_uri_omitted=, :errorUriOmitted=
233
+
234
+ attr_accessor :clientIdAliasEnabled
235
+ alias_method :client_id_alias_enabled, :clientIdAliasEnabled
236
+ alias_method :client_id_alias_enabled=, :clientIdAliasEnabled=
237
+
238
+ attr_accessor :supportedServiceProfiles
239
+ alias_method :supported_service_profiles, :supportedServiceProfiles
240
+ alias_method :supported_service_profiles=, :supportedServiceProfiles=
241
+
242
+ attr_accessor :tlsClientCertificateBoundAccessTokens
243
+ alias_method :tls_client_certificate_bound_access_tokens, :tlsClientCertificateBoundAccessTokens
244
+ alias_method :tls_client_certificate_bound_access_tokens=, :tlsClientCertificateBoundAccessTokens=
245
+
246
+ attr_accessor :introspectionEndpoint
247
+ alias_method :introspection_endpoint, :introspectionEndpoint
248
+ alias_method :introspection_endpoint=, :introspectionEndpoint=
249
+
250
+ attr_accessor :supportedIntrospectionAuthMethods
251
+ alias_method :supported_introspection_auth_methods, :supportedIntrospectionAuthMethods
252
+ alias_method :supported_introspection_auth_methods=, :supportedIntrospectionAuthMethods=
253
+
254
+ attr_accessor :mutualTlsValidatePkiCertChain
255
+ alias_method :mutual_tls_validate_pki_cert_chain, :mutualTlsValidatePkiCertChain
256
+ alias_method :mutual_tls_validate_pki_cert_chain=, :mutualTlsValidatePkiCertChain=
257
+
258
+ attr_accessor :trustedRootCertificates
259
+ alias_method :trusted_root_certificates, :trustedRootCertificates
260
+ alias_method :trusted_root_certificates=, :trustedRootCertificates=
261
+
262
+ attr_accessor :dynamicRegistrationSupported
263
+ alias_method :dynamic_registration_supported, :dynamicRegistrationSupported
264
+ alias_method :dynamic_registration_supported=, :dynamicRegistrationSupported=
265
+
266
+ attr_accessor :endSessionEndpoint
267
+ alias_method :end_session_endpoint, :endSessionEndpoint
268
+ alias_method :end_session_endpoint=, :endSessionEndpoint=
269
+
270
+ attr_accessor :description
271
+
272
+ attr_accessor :accessTokenType
273
+ alias_method :access_token_type, :accessTokenType
274
+ alias_method :access_token_type=, :accessTokenType=
275
+
276
+ attr_accessor :accessTokenSignAlg
277
+ alias_method :access_token_sign_alg, :accessTokenSignAlg
278
+ alias_method :access_token_sign_alg=, :accessTokenSignAlg=
279
+
280
+ attr_accessor :accessTokenDuration
281
+ alias_method :access_token_duration, :accessTokenDuration
282
+ alias_method :access_token_duration=, :accessTokenDuration=
283
+
284
+ attr_accessor :refreshTokenDuration
285
+ alias_method :refresh_token_duration, :refreshTokenDuration
286
+ alias_method :refresh_token_duration=, :refreshTokenDuration=
287
+
288
+ attr_accessor :idTokenDuration
289
+ alias_method :id_token_duration, :idTokenDuration
290
+ alias_method :id_token_duration=, :idTokenDuration=
291
+
292
+ attr_accessor :authorizationResponseDuration
293
+ alias_method :authorization_response_duration, :authorizationResponseDuration
294
+ alias_method :authorization_response_duration=, :authorizationResponseDuration=
295
+
296
+ attr_accessor :pushedAuthReqDuration
297
+ alias_method :pushed_auth_req_duration, :pushedAuthReqDuration
298
+ alias_method :pushed_auth_req_duration=, :pushedAuthReqDuration=
299
+
300
+ attr_accessor :metadata
301
+
302
+ attr_accessor :accessTokenSignatureKeyId
303
+ alias_method :access_token_signature_key_id, :accessTokenSignatureKeyId
304
+ alias_method :access_token_signature_key_id=, :accessTokenSignatureKeyId=
305
+
306
+ attr_accessor :authorizationSignatureKeyId
307
+ alias_method :authorization_signature_key_id, :authorizationSignatureKeyId
308
+ alias_method :authorization_signature_key_id=, :authorizationSignatureKeyId=
309
+
310
+ attr_accessor :idTokenSignatureKeyId
311
+ alias_method :id_token_signature_key_id, :idTokenSignatureKeyId
312
+ alias_method :id_token_signature_key_id=, :idTokenSignatureKeyId=
313
+
314
+ attr_accessor :userInfoSignatureKeyId
315
+ alias_method :user_info_signature_key_id, :userInfoSignatureKeyId
316
+ alias_method :user_info_signature_key_id=, :userInfoSignatureKeyId=
317
+
318
+ attr_accessor :supportedBackchannelTokenDeliveryModes
319
+ alias_method :supported_backchannel_token_delivery_modes, :supportedBackchannelTokenDeliveryModes
320
+ alias_method :supported_backchannel_token_delivery_modes=, :supportedBackchannelTokenDeliveryModes=
321
+
322
+ attr_accessor :backchannelAuthenticationEndpoint
323
+ alias_method :backchannel_authentication_endpoint, :backchannelAuthenticationEndpoint
324
+ alias_method :backchannel_authentication_endpoint=, :backchannelAuthenticationEndpoint=
325
+
326
+ attr_accessor :backchannelUserCodeParameterSupported
327
+ alias_method :backchannel_user_code_parameter_supported, :backchannelUserCodeParameterSupported
328
+ alias_method :backchannel_user_code_parameter_supported=, :backchannelUserCodeParameterSupported=
329
+
330
+ attr_accessor :backchannelAuthReqIdDuration
331
+ alias_method :backchannel_auth_req_id_duration, :backchannelAuthReqIdDuration
332
+ alias_method :backchannel_auth_req_id_duration=, :backchannelAuthReqIdDuration=
333
+
334
+ attr_accessor :backchannelPollingInterval
335
+ alias_method :backchannel_polling_interval, :backchannelPollingInterval
336
+ alias_method :backchannel_polling_interval=, :backchannelPollingInterval=
337
+
338
+ attr_accessor :backchannelBindingMessageRequiredInFapi
339
+ alias_method :backchannel_binding_message_required_in_fapi, :backchannelBindingMessageRequiredInFapi
340
+ alias_method :backchannel_binding_message_required_in_fapi=, :backchannelBindingMessageRequiredInFapi=
341
+
342
+ attr_accessor :allowableClockSkew
343
+ alias_method :allowable_clock_skew, :allowableClockSkew
344
+ alias_method :allowable_clock_skew=, :allowableClockSkew=
345
+
346
+ attr_accessor :deviceAuthorizationEndpoint
347
+ alias_method :device_authorization_endpoint, :deviceAuthorizationEndpoint
348
+ alias_method :device_authorization_endpoint=, :deviceAuthorizationEndpoint=
349
+
350
+ attr_accessor :deviceVerificationUri
351
+ alias_method :device_verification_uri, :deviceVerificationUri
352
+ alias_method :device_verification_uri=, :deviceVerificationUri=
353
+
354
+ attr_accessor :deviceVerificationUriComplete
355
+ alias_method :device_verification_uri_complete, :deviceVerificationUriComplete
356
+ alias_method :device_verification_uri_complete=, :deviceVerificationUriComplete=
357
+
358
+ attr_accessor :deviceFlowCodeDuration
359
+ alias_method :device_flow_code_duration, :deviceFlowCodeDuration
360
+ alias_method :device_flow_code_duration=, :deviceFlowCodeDuration=
361
+
362
+ attr_accessor :deviceFlowPollingInterval
363
+ alias_method :device_flow_polling_interval, :deviceFlowPollingInterval
364
+ alias_method :device_flow_polling_interval=, :deviceFlowPollingInterval=
365
+
366
+ attr_accessor :userCodeCharset
367
+ alias_method :user_code_charset, :userCodeCharset
368
+ alias_method :user_code_charset=, :userCodeCharset=
369
+
370
+ attr_accessor :userCodeLength
371
+ alias_method :user_code_length, :userCodeLength
372
+ alias_method :user_code_length=, :userCodeLength=
373
+
374
+ attr_accessor :pushedAuthReqEndpoint
375
+ alias_method :pushed_auth_req_endpoint, :pushedAuthReqEndpoint
376
+ alias_method :pushed_auth_req_endpoint=, :pushedAuthReqEndpoint=
377
+
378
+ attr_accessor :mtlsEndpointAliases
379
+ alias_method :mtls_endpoint_aliases, :mtlsEndpointAliases
380
+ alias_method :mtls_endpoint_aliases=, :mtlsEndpointAliases=
381
+
382
+ attr_accessor :supportedAuthorizationDataTypes
383
+ alias_method :supported_authorization_data_types, :supportedAuthorizationDataTypes
384
+ alias_method :supported_authorization_data_types=, :supportedAuthorizationDataTypes=
385
+
386
+ attr_accessor :supportedTrustFrameworks
387
+ alias_method :supported_trust_frameworks, :supportedTrustFrameworks
388
+ alias_method :supported_trust_frameworks=, :supportedTrustFrameworks=
389
+
390
+ attr_accessor :supportedEvidence
391
+ alias_method :supported_evidence, :supportedEvidence
392
+ alias_method :supported_evidence=, :supportedEvidence=
393
+
394
+ attr_accessor :supportedIdentityDocuments
395
+ alias_method :supported_identity_documents, :supportedIdentityDocuments
396
+ alias_method :supported_identity_documents=, :supportedIdentityDocuments=
397
+
398
+ attr_accessor :supportedVerificationMethods
399
+ alias_method :supported_verification_methods, :supportedVerificationMethods
400
+ alias_method :supported_verification_methods=, :supportedVerificationMethods=
401
+
402
+ attr_accessor :supportedVerifiedClaims
403
+ alias_method :supported_verified_claims, :supportedVerifiedClaims
404
+ alias_method :supported_verified_claims=, :supportedVerifiedClaims=
405
+
406
+ attr_accessor :missingClientIdAllowed
407
+ alias_method :missing_client_id_allowed, :missingClientIdAllowed
408
+ alias_method :missing_client_id_allowed=, :missingClientIdAllowed=
409
+
410
+ attr_accessor :parRequired
411
+ alias_method :par_required, :parRequired
412
+ alias_method :par_required=, :parRequired=
413
+
414
+ attr_accessor :requestObjectRequired
415
+ alias_method :request_object_required, :requestObjectRequired
416
+ alias_method :request_object_required=, :requestObjectRequired=
417
+
418
+ attr_accessor :traditionalRequestObjectProcessingApplied
419
+ alias_method :traditional_request_object_processing_applied, :traditionalRequestObjectProcessingApplied
420
+ alias_method :traditional_request_object_processing_applied=, :traditionalRequestObjectProcessingApplied=
421
+
422
+ attr_accessor :claimShortcutRestrictive
423
+ alias_method :claim_shortcut_restrictive, :claimShortcutRestrictive
424
+ alias_method :claim_shortcut_restrictive=, :claimShortcutRestrictive=
425
+
426
+ attr_accessor :scopeRequired
427
+ alias_method :scope_required, :scopeRequired
428
+ alias_method :scope_required=, :scopeRequired=
429
+
430
+ private
431
+
432
+ def defaults
433
+ {
434
+ number: 0,
435
+ serviceOwnerNumber: 0,
436
+ serviceName: nil,
437
+ apiKey: 0,
438
+ apiSecret: nil,
439
+ issuer: nil,
440
+ authorizationEndpoint: nil,
441
+ tokenEndpoint: nil,
442
+ revocationEndpoint: nil,
443
+ supportedRevocationAuthMethods: nil,
444
+ userInfoEndpoint: nil,
445
+ jwksUri: nil,
446
+ jwks: nil,
447
+ registrationEndpoint: nil,
448
+ registrationManagementEndpoint: nil,
449
+ supportedScopes: nil,
450
+ supportedResponseTypes: nil,
451
+ supportedGrantTypes: nil,
452
+ supportedAcrs: nil,
453
+ supportedTokenAuthMethods: nil,
454
+ supportedDisplays: nil,
455
+ supportedClaimTypes: nil,
456
+ supportedClaims: nil,
457
+ serviceDocumentation: nil,
458
+ supportedClaimLocales: nil,
459
+ supportedUiLocales: nil,
460
+ policyUri: nil,
461
+ tosUri: nil,
462
+ authenticationCallbackEndpoint: nil,
463
+ authenticationCallbackApiKey: nil,
464
+ authenticationCallbackApiSecret: nil,
465
+ supportedSnses: nil,
466
+ snsCredentials: nil,
467
+ createdAt: 0,
468
+ modifiedAt: 0,
469
+ developerAuthenticationCallbackEndpoint: nil,
470
+ developerAuthenticationCallbackApiKey: nil,
471
+ developerAuthenticationCallbackApiSecret: nil,
472
+ supportedDeveloperSnses: nil,
473
+ developerSnsCredentials: nil,
474
+ clientsPerDeveloper: 0,
475
+ directAuthorizationEndpointEnabled: false,
476
+ directTokenEndpointEnabled: false,
477
+ directRevocationEndpointEnabled: false,
478
+ directUserInfoEndpointEnabled: false,
479
+ directJwksEndpointEnabled: false,
480
+ directIntrospectionEndpointEnabled: false,
481
+ singleAccessTokenPerSubject: false,
482
+ pkceRequired: false,
483
+ pkceS256Required: false,
484
+ refreshTokenKept: false,
485
+ refreshTokenDurationKept: false,
486
+ errorDescriptionOmitted: false,
487
+ errorUriOmitted: false,
488
+ clientIdAliasEnabled: false,
489
+ supportedServiceProfiles: nil,
490
+ tlsClientCertificateBoundAccessTokens: false,
491
+ introspectionEndpoint: nil,
492
+ supportedIntrospectionAuthMethods: nil,
493
+ mutualTlsValidatePkiCertChain: false,
494
+ trustedRootCertificates: nil,
495
+ dynamicRegistrationSupported: false,
496
+ endSessionEndpoint: nil,
497
+ description: nil,
498
+ accessTokenType: nil,
499
+ accessTokenSignAlg: nil,
500
+ accessTokenDuration: 0,
501
+ refreshTokenDuration: 0,
502
+ idTokenDuration: 0,
503
+ authorizationResponseDuration: 0,
504
+ pushedAuthReqDuration: 0,
505
+ metadata: nil,
506
+ accessTokenSignatureKeyId: nil,
507
+ authorizationSignatureKeyId: nil,
508
+ idTokenSignatureKeyId: nil,
509
+ userInfoSignatureKeyId: nil,
510
+ supportedBackchannelTokenDeliveryModes: nil,
511
+ backchannelAuthenticationEndpoint: nil,
512
+ backchannelUserCodeParameterSupported: false,
513
+ backchannelAuthReqIdDuration: 0,
514
+ backchannelPollingInterval: 0,
515
+ backchannelBindingMessageRequiredInFapi: false,
516
+ allowableClockSkew: 0,
517
+ deviceAuthorizationEndpoint: nil,
518
+ deviceVerificationUri: nil,
519
+ deviceVerificationUriComplete: nil,
520
+ deviceFlowCodeDuration: 0,
521
+ deviceFlowPollingInterval: 0,
522
+ userCodeCharset: nil,
523
+ userCodeLength: 0,
524
+ pushedAuthReqEndpoint: nil,
525
+ mtlsEndpointAliases: nil,
526
+ supportedAuthorizationDataTypes: nil,
527
+ supportedTrustFrameworks: nil,
528
+ supportedEvidence: nil,
529
+ supportedIdentityDocuments: nil,
530
+ supportedVerificationMethods: nil,
531
+ supportedVerifiedClaims: nil,
532
+ missingClientIdAllowed: false,
533
+ parRequired: false,
534
+ requestObjectRequired: false,
535
+ traditionalRequestObjectProcessingApplied: false,
536
+ claimShortcutRestrictive: false,
537
+ scopeRequired: false
538
+ }
539
+ end
540
+
541
+ def set_params(hash)
542
+ @number = hash[:number]
543
+ @serviceOwnerNumber = hash[:serviceOwnerNumber]
544
+ @serviceName = hash[:serviceName]
545
+ @apiKey = hash[:apiKey]
546
+ @apiSecret = hash[:apiSecret]
547
+ @issuer = hash[:issuer]
548
+ @authorizationEndpoint = hash[:authorizationEndpoint]
549
+ @tokenEndpoint = hash[:tokenEndpoint]
550
+ @revocationEndpoint = hash[:revocationEndpoint]
551
+ @supportedRevocationAuthMethods = hash[:supportedRevocationAuthMethods]
552
+ @userInfoEndpoint = hash[:userInfoEndpoint]
553
+ @jwksUri = hash[:jwksUri]
554
+ @jwks = hash[:jwks]
555
+ @registrationEndpoint = hash[:registrationEndpoint]
556
+ @registrationManagementEndpoint = hash[:registrationManagementEndpoint]
557
+ @supportedScopes = get_parsed_array(hash[:supportedScopes]) { |e| Authlete::Model::Scope.parse(e) }
558
+ @supportedResponseTypes = hash[:supportedResponseTypes]
559
+ @supportedGrantTypes = hash[:supportedGrantTypes]
560
+ @supportedAcrs = hash[:supportedAcrs]
561
+ @supportedTokenAuthMethods = hash[:supportedTokenAuthMethods]
562
+ @supportedDisplays = hash[:supportedDisplays]
563
+ @supportedClaimTypes = hash[:supportedClaimTypes]
564
+ @supportedClaims = hash[:supportedClaims]
565
+ @serviceDocumentation = hash[:serviceDocumentation]
566
+ @supportedClaimLocales = hash[:supportedClaimLocales]
567
+ @supportedUiLocales = hash[:supportedUiLocales]
568
+ @policyUri = hash[:policyUri]
569
+ @tosUri = hash[:tosUri]
570
+ @authenticationCallbackEndpoint = hash[:authenticationCallbackEndpoint]
571
+ @authenticationCallbackApiKey = hash[:authenticationCallbackApiKey]
572
+ @authenticationCallbackApiSecret = hash[:authenticationCallbackApiSecret]
573
+ @supportedSnses = hash[:supportedSnses]
574
+ @snsCredentials = get_parsed_array(hash[:snsCredentials]) { |e| Authlete::Model::SnsCredentials.parse(e) }
575
+ @createdAt = hash[:createdAt]
576
+ @modifiedAt = hash[:modifiedAt]
577
+ @developerAuthenticationCallbackEndpoint = hash[:developerAuthenticationCallbackEndpoint]
578
+ @developerAuthenticationCallbackApiKey = hash[:developerAuthenticationCallbackApiKey]
579
+ @developerAuthenticationCallbackApiSecret = hash[:developerAuthenticationCallbackApiSecret]
580
+ @supportedDeveloperSnses = hash[:supportedDeveloperSnses]
581
+ @developerSnsCredentials = get_parsed_array(hash[:developerSnsCredentials]) { |e| Authlete::Model::SnsCredentials.parse(e) }
582
+ @clientsPerDeveloper = hash[:clientsPerDeveloper]
583
+ @directAuthorizationEndpointEnabled = hash[:directAuthorizationEndpointEnabled]
584
+ @directTokenEndpointEnabled = hash[:directTokenEndpointEnabled]
585
+ @directRevocationEndpointEnabled = hash[:directRevocationEndpointEnabled]
586
+ @directUserInfoEndpointEnabled = hash[:directUserInfoEndpointEnabled]
587
+ @directJwksEndpointEnabled = hash[:directJwksEndpointEnabled]
588
+ @directIntrospectionEndpointEnabled = hash[:directIntrospectionEndpointEnabled]
589
+ @singleAccessTokenPerSubject = hash[:singleAccessTokenPerSubject]
590
+ @pkceRequired = hash[:pkceRequired]
591
+ @pkceS256Required = hash[:pkceS256Required]
592
+ @refreshTokenKept = hash[:refreshTokenKept]
593
+ @refreshTokenDurationKept = hash[:refreshTokenDurationKept]
594
+ @errorDescriptionOmitted = hash[:errorDescriptionOmitted]
595
+ @errorUriOmitted = hash[:errorUriOmitted]
596
+ @clientIdAliasEnabled = hash[:clientIdAliasEnabled]
597
+ @supportedServiceProfiles = hash[:supportedServiceProfiles]
598
+ @tlsClientCertificateBoundAccessTokens = hash[:tlsClientCertificateBoundAccessTokens]
599
+ @introspectionEndpoint = hash[:introspectionEndpoint]
600
+ @supportedIntrospectionAuthMethods = hash[:supportedIntrospectionAuthMethods]
601
+ @mutualTlsValidatePkiCertChain = hash[:mutualTlsValidatePkiCertChain]
602
+ @trustedRootCertificates = hash[:trustedRootCertificates]
603
+ @dynamicRegistrationSupported = hash[:dynamicRegistrationSupported]
604
+ @endSessionEndpoint = hash[:endSessionEndpoint]
605
+ @description = hash[:description]
606
+ @accessTokenType = hash[:accessTokenType]
607
+ @accessTokenSignAlg = hash[:accessTokenSignAlg]
608
+ @accessTokenDuration = hash[:accessTokenDuration]
609
+ @refreshTokenDuration = hash[:refreshTokenDuration]
610
+ @idTokenDuration = hash[:idTokenDuration]
611
+ @authorizationResponseDuration = hash[:authorizationResponseDuration]
612
+ @pushedAuthReqDuration = hash[:pushedAuthReqDuration]
613
+ @metadata = get_parsed_array(hash[:metadata]) { |e| Authlete::Model::Pair.parse(e) }
614
+ @accessTokenSignatureKeyId = hash[:accessTokenSignatureKeyId]
615
+ @authorizationSignatureKeyId = hash[:authorizationSignatureKeyId]
616
+ @idTokenSignatureKeyId = hash[:idTokenSignatureKeyId]
617
+ @userInfoSignatureKeyId = hash[:userInfoSignatureKeyId]
618
+ @supportedBackchannelTokenDeliveryModes = hash[:supportedBackchannelTokenDeliveryModes]
619
+ @backchannelAuthenticationEndpoint = hash[:backchannelAuthenticationEndpoint]
620
+ @backchannelUserCodeParameterSupported = hash[:backchannelUserCodeParameterSupported]
621
+ @backchannelAuthReqIdDuration = hash[:backchannelAuthReqIdDuration]
622
+ @backchannelPollingInterval = hash[:backchannelPollingInterval]
623
+ @backchannelBindingMessageRequiredInFapi = hash[:backchannelBindingMessageRequiredInFapi]
624
+ @allowableClockSkew = hash[:allowableClockSkew]
625
+ @deviceAuthorizationEndpoint = hash[:deviceAuthorizationEndpoint]
626
+ @deviceVerificationUri = hash[:deviceVerificationUri]
627
+ @deviceVerificationUriComplete = hash[:deviceVerificationUriComplete]
628
+ @deviceFlowCodeDuration = hash[:deviceFlowCodeDuration]
629
+ @deviceFlowPollingInterval = hash[:deviceFlowPollingInterval]
630
+ @userCodeCharset = hash[:userCodeCharset]
631
+ @userCodeLength = hash[:userCodeLength]
632
+ @pushedAuthReqEndpoint = hash[:pushedAuthReqEndpoint]
633
+ @mtlsEndpointAliases = get_parsed_array(hash[:mtlsEndpointAliases]) { |e| Authlete::Model::NamedUri.parse(e) }
634
+ @supportedAuthorizationDataTypes = hash[:supportedAuthorizationDataTypes]
635
+ @supportedTrustFrameworks = hash[:supportedTrustFrameworks]
636
+ @supportedEvidence = hash[:supportedEvidence]
637
+ @supportedIdentityDocuments = hash[:supportedIdentityDocuments]
638
+ @supportedVerificationMethods = hash[:supportedVerificationMethods]
639
+ @supportedVerifiedClaims = hash[:supportedVerifiedClaims]
640
+ @missingClientIdAllowed = hash[:missingClientIdAllowed]
641
+ @parRequired = hash[:parRequired]
642
+ @requestObjectRequired = hash[:requestObjectRequired]
643
+ @traditionalRequestObjectProcessingApplied = hash[:traditionalRequestObjectProcessingApplied]
644
+ @claimShortcutRestrictive = hash[:claimShortcutRestrictive]
645
+ @scopeRequired = hash[:scopeRequired]
646
+ end
647
+
648
+ def to_hash_value(key, var)
649
+ raw_val = instance_variable_get(var)
650
+
651
+ case key
652
+ when :snsCredentials, :developerSnsCredentials, :supportedScopes, :metadata, :mtlsEndpointAliases
653
+ raw_val&.map { |e| e.to_hash }
654
+ else
655
+ raw_val
656
+ end
657
+ end
658
+ end
659
+ end
660
+ end