authlete 1.0.21 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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 +672 -837
  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 +624 -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,837 +1,672 @@
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
- private
568
-
569
- # Integer attributes.
570
- INTEGER_ATTRIBUTES = ::Set.new([
571
- :accessTokenDuration, :allowableClockSkew, :apiKey, :authorizationResponseDuration,
572
- :backchannelAuthReqIdDuration, :backchannelPollingInterval, :clientsPerDeveloper,
573
- :createdAt, :deviceFlowCodeDuration, :deviceFlowPollingInterval,
574
- :idTokenDuration, :modifiedAt, :number, :refreshTokenDuration,
575
- :serviceOwnerNumber, :userCodeLength, :pushedAuthReqDuration
576
- ])
577
-
578
- # Boolean attributes.
579
- BOOLEAN_ATTRIBUTES = ::Set.new([
580
- :backchannelBindingMessageRequiredInFapi, :backchannelUserCodeParameterSupported,
581
- :clientIdAliasEnabled,
582
- :directAuthorizationEndpointEnabled, :directIntrospectionEndpointEnabled,
583
- :directJwksEndpointEnabled, :directRevocationEndpointEnabled, :directTokenEndpointEnabled,
584
- :directUserInfoEndpointEnabled, :errorDescriptionOmitted, :errorUriOmitted,
585
- :mutualTlsValidatePkiCertChain, :pkceRequired, :pkceS256Required, :refreshTokenKept,
586
- :singleAccessTokenPerSubject, :tlsClientCertificateBoundAccessTokens,
587
- :dynamicRegistrationSupported, :missingClientIdAllowed
588
- ])
589
-
590
- # String attributes.
591
- STRING_ATTRIBUTES = ::Set.new([
592
- :accessTokenSignAlg, :accessTokenSignatureKeyId, :accessTokenType,
593
- :apiSecret, :authenticationCallbackApiKey, :authenticationCallbackApiSecret,
594
- :authenticationCallbackEndpoint, :authorizationEndpoint, :authorizationSignatureKeyId,
595
- :backchannelAuthenticationEndpoint, :description, :developerAuthenticationCallbackApiKey,
596
- :developerAuthenticationCallbackApiSecret, :developerAuthenticationCallbackEndpoint,
597
- :deviceAuthorizationEndpoint, :deviceVerificationUri, :deviceVerificationUriComplete,
598
- :idTokenSignatureKeyId, :introspectionEndpoint, :issuer, :jwks, :jwksUri,
599
- :policyUri, :registrationEndpoint, :registrationManagementEndpoint,
600
- :requestObjectEndpoint, :revocationEndpoint, :serviceDocumentation, :serviceName,
601
- :tokenEndpoint, :tosUri, :userCodeCharset, :userInfoEndpoint, :userInfoSignatureKeyId,
602
- :pushedAuthReqEndpoint
603
- ])
604
-
605
- # String array attributes.
606
- STRING_ARRAY_ATTRIBUTES = ::Set.new([
607
- :supportedAcrs, :supportedBackchannelTokenDeliveryModes, :supportedClaimLocales,
608
- :supportedClaims, :supportedClaimTypes, :supportedDeveloperSnses,
609
- :supportedDisplays, :supportedGrantTypes, :supportedResponseTypes,
610
- :supportedServiceProfiles, :supportedSnses, :supportedTokenAuthMethods,
611
- :supportedUiLocales, :trustedRootCertificates, :supportedAuthorizationDataTypes,
612
- :supportedTrustFrameworks, :supportedEvidence, :supportedIdentityDocuments,
613
- :supportedVerificationMethods, :supportedVerifiedClaims
614
- ])
615
-
616
- # SNS credentials array attributes.
617
- SNS_CREDENTIALS_ARRAY_ATTRIBUTES = ::Set.new([
618
- :developerSnsCredentials, :snsCredentials
619
- ])
620
-
621
- # Mapping from snake cases to camel cases.
622
- SNAKE_TO_CAMEL = {
623
- :access_token_duration => :accessTokenDuration,
624
- :access_token_sign_alg => :accessTokenSignAlg,
625
- :access_token_signature_key_id => :accessTokenSignatureKeyId,
626
- :access_token_type => :accessTokenType,
627
- :allowable_clock_skew => :allowableClockSkew,
628
- :api_key => :apiKey,
629
- :api_secret => :apiSecret,
630
- :authentication_callback_api_key => :authenticationCallbackApiKey,
631
- :authentication_callback_api_secret => :authenticationCallbackApiSecret,
632
- :authentication_callback_endpoint => :authenticationCallbackEndpoint,
633
- :authorization_endpoint => :authorizationEndpoint,
634
- :authorization_response_duration => :authorizationResponseDuration,
635
- :authorization_signature_key_id => :authorizationSignatureKeyId,
636
- :backchannel_authentication_endpoint => :backchannelAuthenticationEndpoint,
637
- :backchannel_binding_message_required_in_fapi => :backchannelBindingMessageRequiredInFapi,
638
- :backchannel_auth_req_id_duration => :backchannelAuthReqIdDuration,
639
- :backchannel_polling_interval => :backchannelPollingInterval,
640
- :backchannel_user_code_parameter_supported => :backchannelUserCodeParameterSupported,
641
- :developer_authentication_callback_api_key => :developerAuthenticationCallbackApiKey,
642
- :developer_authentication_callback_api_secret => :developerAuthenticationCallbackApiSecret,
643
- :developer_authentication_callback_endpoint => :developerAuthenticationCallbackEndpoint,
644
- :developer_sns_credentials => :developerSnsCredentials,
645
- :device_authorization_endpoint => :deviceAuthorizationEndpoint,
646
- :device_flow_code_duration => :deviceFlowCodeDuration,
647
- :device_flow_polling_interval => :deviceFlowPollingInterval,
648
- :device_verification_uri => :deviceVerificationUri,
649
- :device_verification_uri_complete => :deviceVerificationUriComplete,
650
- :client_id_alias_enabled => :clientIdAliasEnabled,
651
- :clients_per_developer => :clientsPerDeveloper,
652
- :created_at => :createdAt,
653
- :direct_authorization_endpoint_enabled => :directAuthorizationEndpointEnabled,
654
- :direct_introspection_endpoint_enabled => :directIntrospectionEndpointEnabled,
655
- :direct_jwks_endpoint_enabled => :directJwksEndpointEnabled,
656
- :direct_revocation_endpoint_enabled => :directRevocationEndpointEnabled,
657
- :direct_token_endpoint_enabled => :directTokenEndpointEnabled,
658
- :direct_user_info_endpoint_enabled => :directUserInfoEndpointEnabled,
659
- :dynamic_registration_supported => :dynamicRegistrationSupported,
660
- :error_description_omitted => :errorDescriptionOmitted,
661
- :error_uri_omitted => :errorUriOmitted,
662
- :id_token_duration => :idTokenDuration,
663
- :id_token_signature_key_id => :idTokenSignatureKeyId,
664
- :introspection_endpoint => :introspectionEndpoint,
665
- :jwks_uri => :jwksUri,
666
- :modified_at => :modifiedAt,
667
- :mutual_tls_validate_pki_cert_chain => :mutualTlsValidatePkiCertChain,
668
- :pkce_required => :pkceRequired,
669
- :pkce_s256_required => :pkceS256Required,
670
- :policy_uri => :policyUri,
671
- :refresh_token_duration => :refreshTokenDuration,
672
- :refresh_token_kept => :refreshTokenKept,
673
- :registration_endpoint => :registrationEndpoint,
674
- :registration_management_endpoint => :registrationManagementEndpoint,
675
- :revocation_endpoint => :revocationEndpoint,
676
- :request_object_endpoint => :requestObjectEndpoint,
677
- :service_documentation => :serviceDocumentation,
678
- :service_name => :serviceName,
679
- :service_owner_number => :serviceOwnerNumber,
680
- :single_access_token_per_subject => :singleAccessTokenPerSubject,
681
- :sns_credentials => :snsCredentials,
682
- :supported_acrs => :supportedAcrs,
683
- :supported_backchannel_token_delivery_modes => :supportedBackchannelTokenDeliveryModes,
684
- :supported_claim_locales => :supportedClaimLocales,
685
- :supported_claims => :supportedClaims,
686
- :supported_claim_types => :supportedClaimTypes,
687
- :supported_developer_snses => :supportedDeveloperSnses,
688
- :supported_displays => :supportedDisplays,
689
- :supported_grant_types => :supportedGrantTypes,
690
- :supported_response_types => :supportedResponseTypes,
691
- :supported_scopes => :supportedScopes,
692
- :supported_service_profiles => :supportedServiceProfiles,
693
- :supported_snses => :supportedSnses,
694
- :supported_token_auth_methods => :supportedTokenAuthMethods,
695
- :supported_ui_locales => :supportedUiLocales,
696
- :tls_client_certificate_bound_access_tokens => :tlsClientCertificateBoundAccessTokens,
697
- :token_endpoint => :tokenEndpoint,
698
- :tos_uri => :tosUri,
699
- :trusted_root_certificates => :trustedRootCertificates,
700
- :user_code_charset => :userCodeCharset,
701
- :user_code_length => :userCodeLength,
702
- :user_info_endpoint => :userInfoEndpoint,
703
- :user_info_signature_key_id => :userInfoSignatureKeyId,
704
- :mtls_endpoint_aliases => :mtlsEndpointAliases,
705
- :pushed_auth_req_endpoint => :pushedAuthReqEndpoint,
706
- :pushed_auth_req_duration => :pushedAuthReqDuration,
707
- :supported_authorization_data_types => :supportedAuthorizationDataTypes,
708
- :supported_trust_frameworks => :supportedTrustFrameworks,
709
- :supported_evidence => :supportedEvidence,
710
- :supported_identity_documents => :supportedIdentityDocuments,
711
- :supported_verification_methods => :supportedVerificationMethods,
712
- :supported_verified_claims => :supportedVerifiedClaims,
713
- :missing_client_id_allowed => :missingClientIdAllowed
714
- }
715
-
716
- # The constructor
717
- def initialize(hash = nil)
718
- # Set default values to integer attributes.
719
- INTEGER_ATTRIBUTES.each do |attr|
720
- send("#{attr}=", 0)
721
- end
722
-
723
- # Set default values to boolean attributes.
724
- BOOLEAN_ATTRIBUTES.each do |attr|
725
- send("#{attr}=", false)
726
- end
727
-
728
- # Set default values to string attributes.
729
- STRING_ATTRIBUTES.each do |attr|
730
- send("#{attr}=", nil)
731
- end
732
-
733
- # Set default values to string array attributes.
734
- STRING_ARRAY_ATTRIBUTES.each do |attr|
735
- send("#{attr}=", nil)
736
- end
737
-
738
- # Set default values to sns credentials array attributes.
739
- SNS_CREDENTIALS_ARRAY_ATTRIBUTES.each do |attr|
740
- send("#{attr}=", nil)
741
- end
742
-
743
- # Set default values to special objects.
744
- @metadata = nil
745
- @supportedScopes = nil
746
- @mtlsEndpointAliases = nil
747
-
748
- # Set attribute values using the given hash.
749
- authlete_model_update(hash)
750
- end
751
-
752
- def authlete_model_convert_key(key)
753
- key = key.to_sym
754
-
755
- # Convert snakecase to camelcase, if necessary.
756
- if SNAKE_TO_CAMEL.has_key?(key)
757
- key = SNAKE_TO_CAMEL[key]
758
- end
759
-
760
- key
761
- end
762
-
763
- def authlete_model_simple_attribute?(key)
764
- INTEGER_ATTRIBUTES.include?(key) or
765
- BOOLEAN_ATTRIBUTES.include?(key) or
766
- STRING_ATTRIBUTES.include?(key) or
767
- STRING_ARRAY_ATTRIBUTES.include?(key)
768
- end
769
-
770
- def authlete_model_update(hash)
771
- return if hash.nil?
772
-
773
- hash.each do |key, value|
774
- key = authlete_model_convert_key(key)
775
-
776
- if authlete_model_simple_attribute?(key)
777
- send("#{key}=", value)
778
- elsif SNS_CREDENTIALS_ARRAY_ATTRIBUTES.include?(key)
779
- # Get an array consisting of "SnsCredentials" objects.
780
- parsed = get_parsed_array(value) do |element|
781
- Authlete::Model::SnsCredentials.parse(element)
782
- end
783
-
784
- send("#{key}=", parsed)
785
- elsif key == :metadata
786
- @metadata = get_parsed_array(value) do |element|
787
- Authlete::Model::Pair.parse(element)
788
- end
789
- elsif key == :supportedScopes
790
- @supportedScopes = get_parsed_array(value) do |element|
791
- Authlete::Model::Scope.parse(element)
792
- end
793
- elsif key == :mtlsEndpointAliases
794
- @mtlsEndpointAliases = get_parsed_array(value) do |element|
795
- Authlete::Model::NamedUri.parse(element)
796
- end
797
- end
798
- end
799
-
800
- self
801
- end
802
-
803
- public
804
-
805
- # Construct an instance from the given hash.
806
- #
807
- # If the given argument is nil or is not a Hash, nil is returned.
808
- # Otherwise, Service.new(hash) is returned.
809
- def self.parse(hash)
810
- if hash.nil? or (hash.kind_of?(Hash) == false)
811
- return nil
812
- end
813
-
814
- Service.new(hash)
815
- end
816
-
817
- # Convert this object into a hash.
818
- def to_hash
819
- hash = {}
820
-
821
- instance_variables.each do |var|
822
- key = var.to_s.delete("@").to_sym
823
- val = instance_variable_get(var)
824
-
825
- if authlete_model_simple_attribute?(key) or val.nil?
826
- hash[key] = val
827
- elsif key == :developerSnsCredentials or key == :snsCredentials or
828
- key == :supportedScopes or key == :metadata or key == :mtlsEndpointAliases
829
- hash[key] = val.map { |element| element.to_hash }
830
- end
831
- end
832
-
833
- hash
834
- end
835
- end
836
- end
837
- 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
+ attr_accessor :nbfOptional
431
+ alias_method :nbf_optional, :nbfOptional
432
+ alias_method :nbf_optional=, :nbfOptional=
433
+
434
+ attr_accessor :issSuppressed
435
+ alias_method :iss_suppressed, :issSuppressed
436
+ alias_method :iss_suppressed=, :issSuppressed=
437
+
438
+ private
439
+
440
+ def defaults
441
+ {
442
+ number: 0,
443
+ serviceOwnerNumber: 0,
444
+ serviceName: nil,
445
+ apiKey: 0,
446
+ apiSecret: nil,
447
+ issuer: nil,
448
+ authorizationEndpoint: nil,
449
+ tokenEndpoint: nil,
450
+ revocationEndpoint: nil,
451
+ supportedRevocationAuthMethods: nil,
452
+ userInfoEndpoint: nil,
453
+ jwksUri: nil,
454
+ jwks: nil,
455
+ registrationEndpoint: nil,
456
+ registrationManagementEndpoint: nil,
457
+ supportedScopes: nil,
458
+ supportedResponseTypes: nil,
459
+ supportedGrantTypes: nil,
460
+ supportedAcrs: nil,
461
+ supportedTokenAuthMethods: nil,
462
+ supportedDisplays: nil,
463
+ supportedClaimTypes: nil,
464
+ supportedClaims: nil,
465
+ serviceDocumentation: nil,
466
+ supportedClaimLocales: nil,
467
+ supportedUiLocales: nil,
468
+ policyUri: nil,
469
+ tosUri: nil,
470
+ authenticationCallbackEndpoint: nil,
471
+ authenticationCallbackApiKey: nil,
472
+ authenticationCallbackApiSecret: nil,
473
+ supportedSnses: nil,
474
+ snsCredentials: nil,
475
+ createdAt: 0,
476
+ modifiedAt: 0,
477
+ developerAuthenticationCallbackEndpoint: nil,
478
+ developerAuthenticationCallbackApiKey: nil,
479
+ developerAuthenticationCallbackApiSecret: nil,
480
+ supportedDeveloperSnses: nil,
481
+ developerSnsCredentials: nil,
482
+ clientsPerDeveloper: 0,
483
+ directAuthorizationEndpointEnabled: false,
484
+ directTokenEndpointEnabled: false,
485
+ directRevocationEndpointEnabled: false,
486
+ directUserInfoEndpointEnabled: false,
487
+ directJwksEndpointEnabled: false,
488
+ directIntrospectionEndpointEnabled: false,
489
+ singleAccessTokenPerSubject: false,
490
+ pkceRequired: false,
491
+ pkceS256Required: false,
492
+ refreshTokenKept: false,
493
+ refreshTokenDurationKept: false,
494
+ errorDescriptionOmitted: false,
495
+ errorUriOmitted: false,
496
+ clientIdAliasEnabled: false,
497
+ supportedServiceProfiles: nil,
498
+ tlsClientCertificateBoundAccessTokens: false,
499
+ introspectionEndpoint: nil,
500
+ supportedIntrospectionAuthMethods: nil,
501
+ mutualTlsValidatePkiCertChain: false,
502
+ trustedRootCertificates: nil,
503
+ dynamicRegistrationSupported: false,
504
+ endSessionEndpoint: nil,
505
+ description: nil,
506
+ accessTokenType: nil,
507
+ accessTokenSignAlg: nil,
508
+ accessTokenDuration: 0,
509
+ refreshTokenDuration: 0,
510
+ idTokenDuration: 0,
511
+ authorizationResponseDuration: 0,
512
+ pushedAuthReqDuration: 0,
513
+ metadata: nil,
514
+ accessTokenSignatureKeyId: nil,
515
+ authorizationSignatureKeyId: nil,
516
+ idTokenSignatureKeyId: nil,
517
+ userInfoSignatureKeyId: nil,
518
+ supportedBackchannelTokenDeliveryModes: nil,
519
+ backchannelAuthenticationEndpoint: nil,
520
+ backchannelUserCodeParameterSupported: false,
521
+ backchannelAuthReqIdDuration: 0,
522
+ backchannelPollingInterval: 0,
523
+ backchannelBindingMessageRequiredInFapi: false,
524
+ allowableClockSkew: 0,
525
+ deviceAuthorizationEndpoint: nil,
526
+ deviceVerificationUri: nil,
527
+ deviceVerificationUriComplete: nil,
528
+ deviceFlowCodeDuration: 0,
529
+ deviceFlowPollingInterval: 0,
530
+ userCodeCharset: nil,
531
+ userCodeLength: 0,
532
+ pushedAuthReqEndpoint: nil,
533
+ mtlsEndpointAliases: nil,
534
+ supportedAuthorizationDataTypes: nil,
535
+ supportedTrustFrameworks: nil,
536
+ supportedEvidence: nil,
537
+ supportedIdentityDocuments: nil,
538
+ supportedVerificationMethods: nil,
539
+ supportedVerifiedClaims: nil,
540
+ missingClientIdAllowed: false,
541
+ parRequired: false,
542
+ requestObjectRequired: false,
543
+ traditionalRequestObjectProcessingApplied: false,
544
+ claimShortcutRestrictive: false,
545
+ scopeRequired: false,
546
+ nbfOptional: false,
547
+ issSuppressed: false
548
+ }
549
+ end
550
+
551
+ def set_params(hash)
552
+ @number = hash[:number]
553
+ @serviceOwnerNumber = hash[:serviceOwnerNumber]
554
+ @serviceName = hash[:serviceName]
555
+ @apiKey = hash[:apiKey]
556
+ @apiSecret = hash[:apiSecret]
557
+ @issuer = hash[:issuer]
558
+ @authorizationEndpoint = hash[:authorizationEndpoint]
559
+ @tokenEndpoint = hash[:tokenEndpoint]
560
+ @revocationEndpoint = hash[:revocationEndpoint]
561
+ @supportedRevocationAuthMethods = hash[:supportedRevocationAuthMethods]
562
+ @userInfoEndpoint = hash[:userInfoEndpoint]
563
+ @jwksUri = hash[:jwksUri]
564
+ @jwks = hash[:jwks]
565
+ @registrationEndpoint = hash[:registrationEndpoint]
566
+ @registrationManagementEndpoint = hash[:registrationManagementEndpoint]
567
+ @supportedScopes = get_parsed_array(hash[:supportedScopes]) { |e| Authlete::Model::Scope.parse(e) }
568
+ @supportedResponseTypes = hash[:supportedResponseTypes]
569
+ @supportedGrantTypes = hash[:supportedGrantTypes]
570
+ @supportedAcrs = hash[:supportedAcrs]
571
+ @supportedTokenAuthMethods = hash[:supportedTokenAuthMethods]
572
+ @supportedDisplays = hash[:supportedDisplays]
573
+ @supportedClaimTypes = hash[:supportedClaimTypes]
574
+ @supportedClaims = hash[:supportedClaims]
575
+ @serviceDocumentation = hash[:serviceDocumentation]
576
+ @supportedClaimLocales = hash[:supportedClaimLocales]
577
+ @supportedUiLocales = hash[:supportedUiLocales]
578
+ @policyUri = hash[:policyUri]
579
+ @tosUri = hash[:tosUri]
580
+ @authenticationCallbackEndpoint = hash[:authenticationCallbackEndpoint]
581
+ @authenticationCallbackApiKey = hash[:authenticationCallbackApiKey]
582
+ @authenticationCallbackApiSecret = hash[:authenticationCallbackApiSecret]
583
+ @supportedSnses = hash[:supportedSnses]
584
+ @snsCredentials = get_parsed_array(hash[:snsCredentials]) { |e| Authlete::Model::SnsCredentials.parse(e) }
585
+ @createdAt = hash[:createdAt]
586
+ @modifiedAt = hash[:modifiedAt]
587
+ @developerAuthenticationCallbackEndpoint = hash[:developerAuthenticationCallbackEndpoint]
588
+ @developerAuthenticationCallbackApiKey = hash[:developerAuthenticationCallbackApiKey]
589
+ @developerAuthenticationCallbackApiSecret = hash[:developerAuthenticationCallbackApiSecret]
590
+ @supportedDeveloperSnses = hash[:supportedDeveloperSnses]
591
+ @developerSnsCredentials = get_parsed_array(hash[:developerSnsCredentials]) { |e| Authlete::Model::SnsCredentials.parse(e) }
592
+ @clientsPerDeveloper = hash[:clientsPerDeveloper]
593
+ @directAuthorizationEndpointEnabled = hash[:directAuthorizationEndpointEnabled]
594
+ @directTokenEndpointEnabled = hash[:directTokenEndpointEnabled]
595
+ @directRevocationEndpointEnabled = hash[:directRevocationEndpointEnabled]
596
+ @directUserInfoEndpointEnabled = hash[:directUserInfoEndpointEnabled]
597
+ @directJwksEndpointEnabled = hash[:directJwksEndpointEnabled]
598
+ @directIntrospectionEndpointEnabled = hash[:directIntrospectionEndpointEnabled]
599
+ @singleAccessTokenPerSubject = hash[:singleAccessTokenPerSubject]
600
+ @pkceRequired = hash[:pkceRequired]
601
+ @pkceS256Required = hash[:pkceS256Required]
602
+ @refreshTokenKept = hash[:refreshTokenKept]
603
+ @refreshTokenDurationKept = hash[:refreshTokenDurationKept]
604
+ @errorDescriptionOmitted = hash[:errorDescriptionOmitted]
605
+ @errorUriOmitted = hash[:errorUriOmitted]
606
+ @clientIdAliasEnabled = hash[:clientIdAliasEnabled]
607
+ @supportedServiceProfiles = hash[:supportedServiceProfiles]
608
+ @tlsClientCertificateBoundAccessTokens = hash[:tlsClientCertificateBoundAccessTokens]
609
+ @introspectionEndpoint = hash[:introspectionEndpoint]
610
+ @supportedIntrospectionAuthMethods = hash[:supportedIntrospectionAuthMethods]
611
+ @mutualTlsValidatePkiCertChain = hash[:mutualTlsValidatePkiCertChain]
612
+ @trustedRootCertificates = hash[:trustedRootCertificates]
613
+ @dynamicRegistrationSupported = hash[:dynamicRegistrationSupported]
614
+ @endSessionEndpoint = hash[:endSessionEndpoint]
615
+ @description = hash[:description]
616
+ @accessTokenType = hash[:accessTokenType]
617
+ @accessTokenSignAlg = hash[:accessTokenSignAlg]
618
+ @accessTokenDuration = hash[:accessTokenDuration]
619
+ @refreshTokenDuration = hash[:refreshTokenDuration]
620
+ @idTokenDuration = hash[:idTokenDuration]
621
+ @authorizationResponseDuration = hash[:authorizationResponseDuration]
622
+ @pushedAuthReqDuration = hash[:pushedAuthReqDuration]
623
+ @metadata = get_parsed_array(hash[:metadata]) { |e| Authlete::Model::Pair.parse(e) }
624
+ @accessTokenSignatureKeyId = hash[:accessTokenSignatureKeyId]
625
+ @authorizationSignatureKeyId = hash[:authorizationSignatureKeyId]
626
+ @idTokenSignatureKeyId = hash[:idTokenSignatureKeyId]
627
+ @userInfoSignatureKeyId = hash[:userInfoSignatureKeyId]
628
+ @supportedBackchannelTokenDeliveryModes = hash[:supportedBackchannelTokenDeliveryModes]
629
+ @backchannelAuthenticationEndpoint = hash[:backchannelAuthenticationEndpoint]
630
+ @backchannelUserCodeParameterSupported = hash[:backchannelUserCodeParameterSupported]
631
+ @backchannelAuthReqIdDuration = hash[:backchannelAuthReqIdDuration]
632
+ @backchannelPollingInterval = hash[:backchannelPollingInterval]
633
+ @backchannelBindingMessageRequiredInFapi = hash[:backchannelBindingMessageRequiredInFapi]
634
+ @allowableClockSkew = hash[:allowableClockSkew]
635
+ @deviceAuthorizationEndpoint = hash[:deviceAuthorizationEndpoint]
636
+ @deviceVerificationUri = hash[:deviceVerificationUri]
637
+ @deviceVerificationUriComplete = hash[:deviceVerificationUriComplete]
638
+ @deviceFlowCodeDuration = hash[:deviceFlowCodeDuration]
639
+ @deviceFlowPollingInterval = hash[:deviceFlowPollingInterval]
640
+ @userCodeCharset = hash[:userCodeCharset]
641
+ @userCodeLength = hash[:userCodeLength]
642
+ @pushedAuthReqEndpoint = hash[:pushedAuthReqEndpoint]
643
+ @mtlsEndpointAliases = get_parsed_array(hash[:mtlsEndpointAliases]) { |e| Authlete::Model::NamedUri.parse(e) }
644
+ @supportedAuthorizationDataTypes = hash[:supportedAuthorizationDataTypes]
645
+ @supportedTrustFrameworks = hash[:supportedTrustFrameworks]
646
+ @supportedEvidence = hash[:supportedEvidence]
647
+ @supportedIdentityDocuments = hash[:supportedIdentityDocuments]
648
+ @supportedVerificationMethods = hash[:supportedVerificationMethods]
649
+ @supportedVerifiedClaims = hash[:supportedVerifiedClaims]
650
+ @missingClientIdAllowed = hash[:missingClientIdAllowed]
651
+ @parRequired = hash[:parRequired]
652
+ @requestObjectRequired = hash[:requestObjectRequired]
653
+ @traditionalRequestObjectProcessingApplied = hash[:traditionalRequestObjectProcessingApplied]
654
+ @claimShortcutRestrictive = hash[:claimShortcutRestrictive]
655
+ @scopeRequired = hash[:scopeRequired]
656
+ @nbfOptional = hash[:nbfOptional]
657
+ @issSuppressed = hash[:issSuppressed]
658
+ end
659
+
660
+ def to_hash_value(key, var)
661
+ raw_val = instance_variable_get(var)
662
+
663
+ case key
664
+ when :snsCredentials, :developerSnsCredentials, :supportedScopes, :metadata, :mtlsEndpointAliases
665
+ raw_val&.map { |e| e.to_hash }
666
+ else
667
+ raw_val
668
+ end
669
+ end
670
+ end
671
+ end
672
+ end