authlete_ruby_sdk 0.0.3.pre.beta → 1.0.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 (617) hide show
  1. checksums.yaml +4 -4
  2. data/lib/authlete/authorization.rb +24 -563
  3. data/lib/authlete/authorization_management.rb +15 -7
  4. data/lib/authlete/ciba.rb +35 -414
  5. data/lib/authlete/client.rb +3 -3
  6. data/lib/authlete/client_management.rb +133 -87
  7. data/lib/authlete/clients.rb +43 -23
  8. data/lib/authlete/device_flow.rb +24 -147
  9. data/lib/authlete/dynamic_client_registration.rb +31 -283
  10. data/lib/authlete/federation.rb +17 -66
  11. data/lib/authlete/grant_management.rb +10 -5
  12. data/lib/authlete/hardware_security_keys.rb +24 -10
  13. data/lib/authlete/introspection.rb +17 -195
  14. data/lib/authlete/jose_object.rb +10 -5
  15. data/lib/authlete/jwk_set_endpoint.rb +12 -7
  16. data/lib/authlete/lifecycle.rb +10 -5
  17. data/lib/authlete/models/components/access_token.rb +9 -9
  18. data/lib/authlete/models/components/access_token.rbi +1 -1
  19. data/lib/authlete/models/components/application_type.rb +1 -1
  20. data/lib/authlete/models/components/application_type.rbi +1 -1
  21. data/lib/authlete/models/components/attachment_type.rb +1 -1
  22. data/lib/authlete/models/components/attachment_type.rbi +1 -1
  23. data/lib/authlete/models/components/authorization_details_element.rb +16 -16
  24. data/lib/authlete/models/components/authorization_details_element.rbi +1 -1
  25. data/lib/authlete/models/components/authorization_fail_request.rb +4 -4
  26. data/lib/authlete/models/components/authorization_fail_request.rbi +1 -1
  27. data/lib/authlete/models/components/authorization_fail_request_reason.rb +1 -1
  28. data/lib/authlete/models/components/authorization_fail_request_reason.rbi +1 -1
  29. data/lib/authlete/models/components/authorization_fail_response.rb +2 -2
  30. data/lib/authlete/models/components/authorization_fail_response.rbi +1 -1
  31. data/lib/authlete/models/components/authorization_fail_response_action.rbi +1 -1
  32. data/lib/authlete/models/components/authorization_issue_request.rb +19 -83
  33. data/lib/authlete/models/components/authorization_issue_request.rbi +1 -1
  34. data/lib/authlete/models/components/authorization_issue_response.rb +8 -8
  35. data/lib/authlete/models/components/authorization_issue_response.rbi +1 -1
  36. data/lib/authlete/models/components/authorization_issue_response_action.rbi +1 -1
  37. data/lib/authlete/models/components/authorization_request.rb +7 -7
  38. data/lib/authlete/models/components/authorization_request.rbi +1 -1
  39. data/lib/authlete/models/components/authorization_response.rb +84 -176
  40. data/lib/authlete/models/components/authorization_response.rbi +1 -1
  41. data/lib/authlete/models/components/authorization_response_action.rbi +1 -1
  42. data/lib/authlete/models/components/authorization_ticket_info.rb +1 -1
  43. data/lib/authlete/models/components/authorization_ticket_info.rbi +1 -1
  44. data/lib/authlete/models/components/authorization_ticket_info_request.rbi +1 -1
  45. data/lib/authlete/models/components/authorization_ticket_info_response.rb +1 -1
  46. data/lib/authlete/models/components/authorization_ticket_info_response.rbi +1 -1
  47. data/lib/authlete/models/components/authorization_ticket_info_response_action.rbi +1 -1
  48. data/lib/authlete/models/components/authorization_ticket_update_request.rbi +1 -1
  49. data/lib/authlete/models/components/authorization_ticket_update_response.rb +1 -1
  50. data/lib/authlete/models/components/authorization_ticket_update_response.rbi +1 -1
  51. data/lib/authlete/models/components/authorization_ticket_update_response_action.rbi +1 -1
  52. data/lib/authlete/models/components/authz_details.rb +2 -2
  53. data/lib/authlete/models/components/authz_details.rbi +1 -1
  54. data/lib/authlete/models/components/backchannel_authentication_complete_request.rb +23 -23
  55. data/lib/authlete/models/components/backchannel_authentication_complete_request.rbi +1 -1
  56. data/lib/authlete/models/components/backchannel_authentication_complete_request_result.rb +1 -1
  57. data/lib/authlete/models/components/backchannel_authentication_complete_request_result.rbi +1 -1
  58. data/lib/authlete/models/components/backchannel_authentication_complete_response.rb +30 -30
  59. data/lib/authlete/models/components/backchannel_authentication_complete_response.rbi +1 -1
  60. data/lib/authlete/models/components/backchannel_authentication_complete_response_action.rb +1 -1
  61. data/lib/authlete/models/components/backchannel_authentication_complete_response_action.rbi +1 -1
  62. data/lib/authlete/models/components/backchannel_authentication_fail_request.rb +5 -5
  63. data/lib/authlete/models/components/backchannel_authentication_fail_request.rbi +1 -1
  64. data/lib/authlete/models/components/backchannel_authentication_fail_request_reason.rb +1 -1
  65. data/lib/authlete/models/components/backchannel_authentication_fail_request_reason.rbi +1 -1
  66. data/lib/authlete/models/components/backchannel_authentication_fail_response.rb +2 -2
  67. data/lib/authlete/models/components/backchannel_authentication_fail_response.rbi +1 -1
  68. data/lib/authlete/models/components/backchannel_authentication_fail_response_action.rbi +1 -1
  69. data/lib/authlete/models/components/backchannel_authentication_issue_request.rb +1 -1
  70. data/lib/authlete/models/components/backchannel_authentication_issue_request.rbi +1 -1
  71. data/lib/authlete/models/components/backchannel_authentication_issue_response.rb +5 -5
  72. data/lib/authlete/models/components/backchannel_authentication_issue_response.rbi +1 -1
  73. data/lib/authlete/models/components/backchannel_authentication_issue_response_action.rbi +1 -1
  74. data/lib/authlete/models/components/backchannel_authentication_request.rb +12 -12
  75. data/lib/authlete/models/components/backchannel_authentication_request.rbi +1 -1
  76. data/lib/authlete/models/components/backchannel_authentication_response.rb +47 -56
  77. data/lib/authlete/models/components/backchannel_authentication_response.rbi +1 -1
  78. data/lib/authlete/models/components/backchannel_authentication_response_action.rbi +1 -1
  79. data/lib/authlete/models/components/cimd_options.rb +15 -15
  80. data/lib/authlete/models/components/cimd_options.rbi +1 -1
  81. data/lib/authlete/models/components/claim_type.rbi +1 -1
  82. data/lib/authlete/models/components/client.rb +159 -308
  83. data/lib/authlete/models/components/client.rbi +1 -1
  84. data/lib/authlete/models/components/client_auth_method.rb +1 -1
  85. data/lib/authlete/models/components/client_auth_method.rbi +1 -1
  86. data/lib/authlete/models/components/client_authorization_delete_response.rb +4 -4
  87. data/lib/authlete/models/components/client_authorization_delete_response.rbi +1 -1
  88. data/lib/authlete/models/components/client_authorization_get_list_request.rbi +1 -1
  89. data/lib/authlete/models/components/client_authorization_get_list_response.rb +6 -6
  90. data/lib/authlete/models/components/client_authorization_get_list_response.rbi +1 -1
  91. data/lib/authlete/models/components/client_authorization_update_request.rb +2 -2
  92. data/lib/authlete/models/components/client_authorization_update_request.rbi +1 -1
  93. data/lib/authlete/models/components/client_authorization_update_response.rbi +1 -1
  94. data/lib/authlete/models/components/client_clientsource.rb +1 -1
  95. data/lib/authlete/models/components/client_clientsource.rbi +1 -1
  96. data/lib/authlete/models/components/client_extension.rb +9 -19
  97. data/lib/authlete/models/components/client_extension.rbi +1 -1
  98. data/lib/authlete/models/components/client_extension_requestable_scopes_get_response.rb +1 -1
  99. data/lib/authlete/models/components/client_extension_requestable_scopes_get_response.rbi +1 -1
  100. data/lib/authlete/models/components/client_extension_requestable_scopes_update_request.rb +4 -4
  101. data/lib/authlete/models/components/client_extension_requestable_scopes_update_request.rbi +1 -1
  102. data/lib/authlete/models/components/client_extension_requestable_scopes_update_response.rbi +1 -1
  103. data/lib/authlete/models/components/client_flag_update_request.rb +1 -1
  104. data/lib/authlete/models/components/client_flag_update_request.rbi +1 -1
  105. data/lib/authlete/models/components/client_flag_update_response.rbi +1 -1
  106. data/lib/authlete/models/components/client_get_list_response.rb +4 -4
  107. data/lib/authlete/models/components/client_get_list_response.rbi +1 -1
  108. data/lib/authlete/models/components/client_granted_scopes_delete_response.rbi +1 -1
  109. data/lib/authlete/models/components/client_input.rb +154 -293
  110. data/lib/authlete/models/components/client_input.rbi +1 -1
  111. data/lib/authlete/models/components/client_limited.rb +7 -7
  112. data/lib/authlete/models/components/client_limited.rbi +1 -1
  113. data/lib/authlete/models/components/client_limited_authorization.rb +57 -106
  114. data/lib/authlete/models/components/client_limited_authorization.rbi +1 -1
  115. data/lib/authlete/models/components/client_limited_authorization_clientsource.rb +1 -1
  116. data/lib/authlete/models/components/client_limited_authorization_clientsource.rbi +1 -1
  117. data/lib/authlete/models/components/client_registration_response.rb +3 -3
  118. data/lib/authlete/models/components/client_registration_response.rbi +1 -1
  119. data/lib/authlete/models/components/client_registration_response_action.rb +1 -1
  120. data/lib/authlete/models/components/client_registration_response_action.rbi +1 -1
  121. data/lib/authlete/models/components/client_registration_type.rb +1 -1
  122. data/lib/authlete/models/components/client_registration_type.rbi +1 -1
  123. data/lib/authlete/models/components/client_secret_refresh_response.rb +2 -2
  124. data/lib/authlete/models/components/client_secret_refresh_response.rbi +1 -1
  125. data/lib/authlete/models/components/client_secret_update_request.rb +1 -1
  126. data/lib/authlete/models/components/client_secret_update_request.rbi +1 -1
  127. data/lib/authlete/models/components/client_secret_update_response.rb +2 -2
  128. data/lib/authlete/models/components/client_secret_update_response.rbi +1 -1
  129. data/lib/authlete/models/components/client_type.rb +1 -1
  130. data/lib/authlete/models/components/client_type.rbi +1 -1
  131. data/lib/authlete/models/components/credential_issuance_order.rb +1 -1
  132. data/lib/authlete/models/components/credential_issuance_order.rbi +1 -1
  133. data/lib/authlete/models/components/credential_issuer_metadata.rb +5 -5
  134. data/lib/authlete/models/components/credential_issuer_metadata.rbi +1 -1
  135. data/lib/authlete/models/components/credential_offer_info.rb +12 -20
  136. data/lib/authlete/models/components/credential_offer_info.rbi +1 -1
  137. data/lib/authlete/models/components/credential_request_info.rbi +1 -1
  138. data/lib/authlete/models/components/delivery_mode.rbi +1 -1
  139. data/lib/authlete/models/components/device_authorization_request.rb +12 -12
  140. data/lib/authlete/models/components/device_authorization_request.rbi +1 -1
  141. data/lib/authlete/models/components/device_authorization_response.rb +39 -48
  142. data/lib/authlete/models/components/device_authorization_response.rbi +1 -1
  143. data/lib/authlete/models/components/device_authorization_response_action.rbi +1 -1
  144. data/lib/authlete/models/components/device_complete_request.rb +22 -22
  145. data/lib/authlete/models/components/device_complete_request.rbi +1 -1
  146. data/lib/authlete/models/components/device_complete_request_result.rb +1 -1
  147. data/lib/authlete/models/components/device_complete_request_result.rbi +1 -1
  148. data/lib/authlete/models/components/device_complete_response.rb +2 -2
  149. data/lib/authlete/models/components/device_complete_response.rbi +1 -1
  150. data/lib/authlete/models/components/device_complete_response_action.rb +1 -1
  151. data/lib/authlete/models/components/device_complete_response_action.rbi +1 -1
  152. data/lib/authlete/models/components/device_verification_request.rb +1 -1
  153. data/lib/authlete/models/components/device_verification_request.rbi +1 -1
  154. data/lib/authlete/models/components/device_verification_response.rb +32 -32
  155. data/lib/authlete/models/components/device_verification_response.rbi +1 -1
  156. data/lib/authlete/models/components/device_verification_response_action.rbi +1 -1
  157. data/lib/authlete/models/components/display.rb +3 -3
  158. data/lib/authlete/models/components/display.rbi +1 -1
  159. data/lib/authlete/models/components/dynamic_scope.rbi +1 -1
  160. data/lib/authlete/models/components/fapi_mode.rbi +1 -1
  161. data/lib/authlete/models/components/federation_configuration_response.rb +2 -2
  162. data/lib/authlete/models/components/federation_configuration_response.rbi +1 -1
  163. data/lib/authlete/models/components/federation_configuration_response_action.rbi +1 -1
  164. data/lib/authlete/models/components/federation_registration_request.rb +2 -2
  165. data/lib/authlete/models/components/federation_registration_request.rbi +1 -1
  166. data/lib/authlete/models/components/federation_registration_response.rb +2 -2
  167. data/lib/authlete/models/components/federation_registration_response.rbi +1 -1
  168. data/lib/authlete/models/components/federation_registration_response_action.rbi +1 -1
  169. data/lib/authlete/models/components/g_m_request.rb +13 -13
  170. data/lib/authlete/models/components/g_m_request.rbi +1 -1
  171. data/lib/authlete/models/components/g_m_response.rb +3 -3
  172. data/lib/authlete/models/components/g_m_response.rbi +1 -1
  173. data/lib/authlete/models/components/g_m_response_action.rbi +1 -1
  174. data/lib/authlete/models/components/grant.rb +2 -2
  175. data/lib/authlete/models/components/grant.rbi +1 -1
  176. data/lib/authlete/models/components/grant_management_action.rb +2 -2
  177. data/lib/authlete/models/components/grant_management_action.rbi +1 -1
  178. data/lib/authlete/models/components/grant_scope.rb +2 -2
  179. data/lib/authlete/models/components/grant_scope.rbi +1 -1
  180. data/lib/authlete/models/components/grant_type.rb +1 -1
  181. data/lib/authlete/models/components/grant_type.rbi +1 -1
  182. data/lib/authlete/models/components/hsk.rb +8 -8
  183. data/lib/authlete/models/components/hsk.rbi +1 -1
  184. data/lib/authlete/models/components/hsk_create_request.rb +6 -6
  185. data/lib/authlete/models/components/hsk_create_request.rbi +1 -1
  186. data/lib/authlete/models/components/hsk_create_response.rb +2 -2
  187. data/lib/authlete/models/components/hsk_create_response.rbi +1 -1
  188. data/lib/authlete/models/components/hsk_create_response_action.rbi +1 -1
  189. data/lib/authlete/models/components/hsk_delete_response.rb +2 -2
  190. data/lib/authlete/models/components/hsk_delete_response.rbi +1 -1
  191. data/lib/authlete/models/components/hsk_delete_response_action.rbi +1 -1
  192. data/lib/authlete/models/components/hsk_get_list_response.rb +1 -1
  193. data/lib/authlete/models/components/hsk_get_list_response.rbi +1 -1
  194. data/lib/authlete/models/components/hsk_get_list_response_action.rbi +1 -1
  195. data/lib/authlete/models/components/hsk_get_response.rb +2 -2
  196. data/lib/authlete/models/components/hsk_get_response.rbi +1 -1
  197. data/lib/authlete/models/components/hsk_get_response_action.rbi +1 -1
  198. data/lib/authlete/models/components/idtoken_reissue_request.rb +7 -7
  199. data/lib/authlete/models/components/idtoken_reissue_request.rbi +1 -1
  200. data/lib/authlete/models/components/idtoken_reissue_response.rb +3 -3
  201. data/lib/authlete/models/components/idtoken_reissue_response.rbi +1 -1
  202. data/lib/authlete/models/components/idtoken_reissue_response_action.rbi +1 -1
  203. data/lib/authlete/models/components/introspection_request.rb +24 -40
  204. data/lib/authlete/models/components/introspection_request.rbi +1 -1
  205. data/lib/authlete/models/components/introspection_response.rb +36 -45
  206. data/lib/authlete/models/components/introspection_response.rbi +1 -1
  207. data/lib/authlete/models/components/introspection_response_action.rbi +1 -1
  208. data/lib/authlete/models/components/jose_verify_request.rb +5 -5
  209. data/lib/authlete/models/components/jose_verify_request.rbi +1 -1
  210. data/lib/authlete/models/components/jose_verify_response.rb +5 -5
  211. data/lib/authlete/models/components/jose_verify_response.rbi +1 -1
  212. data/lib/authlete/models/components/jwe_alg.rb +2 -2
  213. data/lib/authlete/models/components/jwe_alg.rbi +1 -1
  214. data/lib/authlete/models/components/jwe_enc.rb +1 -1
  215. data/lib/authlete/models/components/jwe_enc.rbi +1 -1
  216. data/lib/authlete/models/components/jws_alg.rb +2 -2
  217. data/lib/authlete/models/components/jws_alg.rbi +1 -1
  218. data/lib/authlete/models/components/named_uri.rbi +1 -1
  219. data/lib/authlete/models/components/native_sso_logout_request.rb +1 -1
  220. data/lib/authlete/models/components/native_sso_logout_request.rbi +1 -1
  221. data/lib/authlete/models/components/native_sso_logout_response.rb +3 -3
  222. data/lib/authlete/models/components/native_sso_logout_response.rbi +1 -1
  223. data/lib/authlete/models/components/native_sso_logout_response_action.rb +1 -1
  224. data/lib/authlete/models/components/native_sso_logout_response_action.rbi +1 -1
  225. data/lib/authlete/models/components/native_sso_request.rb +8 -24
  226. data/lib/authlete/models/components/native_sso_request.rbi +1 -1
  227. data/lib/authlete/models/components/native_sso_response.rb +4 -4
  228. data/lib/authlete/models/components/native_sso_response.rbi +1 -1
  229. data/lib/authlete/models/components/native_sso_response_action.rb +1 -1
  230. data/lib/authlete/models/components/native_sso_response_action.rbi +1 -1
  231. data/lib/authlete/models/components/pair.rbi +1 -1
  232. data/lib/authlete/models/components/prompt.rb +3 -3
  233. data/lib/authlete/models/components/prompt.rbi +1 -1
  234. data/lib/authlete/models/components/property.rb +1 -1
  235. data/lib/authlete/models/components/property.rbi +1 -1
  236. data/lib/authlete/models/components/pushed_authorization_request.rb +11 -11
  237. data/lib/authlete/models/components/pushed_authorization_request.rbi +1 -1
  238. data/lib/authlete/models/components/pushed_authorization_response.rb +6 -6
  239. data/lib/authlete/models/components/pushed_authorization_response.rbi +1 -1
  240. data/lib/authlete/models/components/pushed_authorization_response_action.rbi +1 -1
  241. data/lib/authlete/models/components/pushed_authorization_response_clientauthmethod.rb +1 -1
  242. data/lib/authlete/models/components/pushed_authorization_response_clientauthmethod.rbi +1 -1
  243. data/lib/authlete/models/components/response_type.rbi +1 -1
  244. data/lib/authlete/models/components/responsemode.rbi +1 -1
  245. data/lib/authlete/models/components/revocation_request.rb +10 -10
  246. data/lib/authlete/models/components/revocation_request.rbi +1 -1
  247. data/lib/authlete/models/components/revocation_response.rb +2 -2
  248. data/lib/authlete/models/components/revocation_response.rbi +1 -1
  249. data/lib/authlete/models/components/revocation_response_action.rbi +1 -1
  250. data/lib/authlete/models/components/scope.rbi +1 -1
  251. data/lib/authlete/models/components/security.rbi +1 -1
  252. data/lib/authlete/models/components/service.rb +248 -599
  253. data/lib/authlete/models/components/service.rbi +1 -1
  254. data/lib/authlete/models/components/service_get_list_response.rb +4 -4
  255. data/lib/authlete/models/components/service_get_list_response.rbi +1 -1
  256. data/lib/authlete/models/components/service_input.rb +242 -593
  257. data/lib/authlete/models/components/service_input.rbi +1 -1
  258. data/lib/authlete/models/components/service_jwks_get_response.rbi +1 -1
  259. data/lib/authlete/models/components/service_profile.rbi +1 -1
  260. data/lib/authlete/models/components/sns_credentials.rbi +1 -1
  261. data/lib/authlete/models/components/standard_introspection_request.rb +22 -22
  262. data/lib/authlete/models/components/standard_introspection_request.rbi +1 -1
  263. data/lib/authlete/models/components/standard_introspection_response.rb +2 -2
  264. data/lib/authlete/models/components/standard_introspection_response.rbi +1 -1
  265. data/lib/authlete/models/components/standard_introspection_response_action.rbi +1 -1
  266. data/lib/authlete/models/components/subject_type.rb +2 -2
  267. data/lib/authlete/models/components/subject_type.rbi +1 -1
  268. data/lib/authlete/models/components/supportedsnse.rbi +1 -1
  269. data/lib/authlete/models/components/tagged_value.rbi +1 -1
  270. data/lib/authlete/models/components/token_create_request.rb +27 -59
  271. data/lib/authlete/models/components/token_create_request.rbi +1 -1
  272. data/lib/authlete/models/components/token_create_response.rb +18 -18
  273. data/lib/authlete/models/components/token_create_response.rbi +1 -1
  274. data/lib/authlete/models/components/token_create_response_action.rbi +1 -1
  275. data/lib/authlete/models/components/token_fail_request.rb +3 -3
  276. data/lib/authlete/models/components/token_fail_request.rbi +1 -1
  277. data/lib/authlete/models/components/token_fail_request_reason.rb +1 -1
  278. data/lib/authlete/models/components/token_fail_request_reason.rbi +1 -1
  279. data/lib/authlete/models/components/token_fail_response.rb +2 -2
  280. data/lib/authlete/models/components/token_fail_response.rbi +1 -1
  281. data/lib/authlete/models/components/token_fail_response_action.rbi +1 -1
  282. data/lib/authlete/models/components/token_get_list_response.rb +5 -5
  283. data/lib/authlete/models/components/token_get_list_response.rbi +1 -1
  284. data/lib/authlete/models/components/token_info.rb +6 -6
  285. data/lib/authlete/models/components/token_info.rbi +1 -1
  286. data/lib/authlete/models/components/token_issue_request.rb +9 -9
  287. data/lib/authlete/models/components/token_issue_request.rbi +1 -1
  288. data/lib/authlete/models/components/token_issue_response.rb +21 -21
  289. data/lib/authlete/models/components/token_issue_response.rbi +1 -1
  290. data/lib/authlete/models/components/token_issue_response_action.rbi +1 -1
  291. data/lib/authlete/models/components/token_request.rb +27 -27
  292. data/lib/authlete/models/components/token_request.rbi +1 -1
  293. data/lib/authlete/models/components/token_response.rb +49 -61
  294. data/lib/authlete/models/components/token_response.rbi +1 -1
  295. data/lib/authlete/models/components/token_response_action.rbi +1 -1
  296. data/lib/authlete/models/components/token_revoke_request.rb +7 -7
  297. data/lib/authlete/models/components/token_revoke_request.rbi +1 -1
  298. data/lib/authlete/models/components/token_revoke_response.rbi +1 -1
  299. data/lib/authlete/models/components/token_type.rb +1 -1
  300. data/lib/authlete/models/components/token_type.rbi +1 -1
  301. data/lib/authlete/models/components/token_update_request.rb +16 -16
  302. data/lib/authlete/models/components/token_update_request.rbi +1 -1
  303. data/lib/authlete/models/components/token_update_response.rb +9 -9
  304. data/lib/authlete/models/components/token_update_response.rbi +1 -1
  305. data/lib/authlete/models/components/token_update_response_action.rbi +1 -1
  306. data/lib/authlete/models/components/trust_anchor.rb +2 -2
  307. data/lib/authlete/models/components/trust_anchor.rbi +1 -1
  308. data/lib/authlete/models/components/user_code_charset.rb +1 -1
  309. data/lib/authlete/models/components/user_code_charset.rbi +1 -1
  310. data/lib/authlete/models/components/userinfo_issue_request.rb +7 -67
  311. data/lib/authlete/models/components/userinfo_issue_request.rbi +1 -1
  312. data/lib/authlete/models/components/userinfo_issue_response.rb +5 -5
  313. data/lib/authlete/models/components/userinfo_issue_response.rbi +1 -1
  314. data/lib/authlete/models/components/userinfo_issue_response_action.rbi +1 -1
  315. data/lib/authlete/models/components/userinfo_request.rb +15 -40
  316. data/lib/authlete/models/components/userinfo_request.rbi +1 -1
  317. data/lib/authlete/models/components/userinfo_response.rb +46 -89
  318. data/lib/authlete/models/components/userinfo_response.rbi +1 -1
  319. data/lib/authlete/models/components/userinfo_response_action.rbi +1 -1
  320. data/lib/authlete/models/components/vci_batch_issue_request.rbi +1 -1
  321. data/lib/authlete/models/components/vci_batch_issue_response.rb +3 -3
  322. data/lib/authlete/models/components/vci_batch_issue_response.rbi +1 -1
  323. data/lib/authlete/models/components/vci_batch_issue_response_action.rb +1 -1
  324. data/lib/authlete/models/components/vci_batch_issue_response_action.rbi +1 -1
  325. data/lib/authlete/models/components/vci_batch_parse_request.rbi +1 -1
  326. data/lib/authlete/models/components/vci_batch_parse_response.rb +2 -2
  327. data/lib/authlete/models/components/vci_batch_parse_response.rbi +1 -1
  328. data/lib/authlete/models/components/vci_batch_parse_response_action.rbi +1 -1
  329. data/lib/authlete/models/components/vci_deferred_issue_request.rbi +1 -1
  330. data/lib/authlete/models/components/vci_deferred_issue_response.rb +3 -3
  331. data/lib/authlete/models/components/vci_deferred_issue_response.rbi +1 -1
  332. data/lib/authlete/models/components/vci_deferred_issue_response_action.rb +1 -1
  333. data/lib/authlete/models/components/vci_deferred_issue_response_action.rbi +1 -1
  334. data/lib/authlete/models/components/vci_deferred_parse_request.rbi +1 -1
  335. data/lib/authlete/models/components/vci_deferred_parse_response.rb +1 -1
  336. data/lib/authlete/models/components/vci_deferred_parse_response.rbi +1 -1
  337. data/lib/authlete/models/components/vci_deferred_parse_response_action.rbi +1 -1
  338. data/lib/authlete/models/components/vci_jwks_request.rb +1 -1
  339. data/lib/authlete/models/components/vci_jwks_request.rbi +1 -1
  340. data/lib/authlete/models/components/vci_jwks_response.rb +3 -3
  341. data/lib/authlete/models/components/vci_jwks_response.rbi +1 -1
  342. data/lib/authlete/models/components/vci_jwks_response_action.rb +1 -1
  343. data/lib/authlete/models/components/vci_jwks_response_action.rbi +1 -1
  344. data/lib/authlete/models/components/vci_jwtissuer_request.rb +1 -1
  345. data/lib/authlete/models/components/vci_jwtissuer_request.rbi +1 -1
  346. data/lib/authlete/models/components/vci_jwtissuer_response.rb +3 -3
  347. data/lib/authlete/models/components/vci_jwtissuer_response.rbi +1 -1
  348. data/lib/authlete/models/components/vci_jwtissuer_response_action.rb +1 -1
  349. data/lib/authlete/models/components/vci_jwtissuer_response_action.rbi +1 -1
  350. data/lib/authlete/models/components/vci_metadata_request.rb +1 -1
  351. data/lib/authlete/models/components/vci_metadata_request.rbi +1 -1
  352. data/lib/authlete/models/components/vci_metadata_response.rb +3 -3
  353. data/lib/authlete/models/components/vci_metadata_response.rbi +1 -1
  354. data/lib/authlete/models/components/vci_metadata_response_action.rb +1 -1
  355. data/lib/authlete/models/components/vci_metadata_response_action.rbi +1 -1
  356. data/lib/authlete/models/components/vci_offer_create_request.rb +10 -79
  357. data/lib/authlete/models/components/vci_offer_create_request.rbi +1 -1
  358. data/lib/authlete/models/components/vci_offer_create_response.rb +1 -1
  359. data/lib/authlete/models/components/vci_offer_create_response.rbi +1 -1
  360. data/lib/authlete/models/components/vci_offer_create_response_action.rbi +1 -1
  361. data/lib/authlete/models/components/vci_offer_info_request.rbi +1 -1
  362. data/lib/authlete/models/components/vci_offer_info_response.rb +1 -1
  363. data/lib/authlete/models/components/vci_offer_info_response.rbi +1 -1
  364. data/lib/authlete/models/components/vci_offer_info_response_action.rbi +1 -1
  365. data/lib/authlete/models/components/vci_single_issue_request.rbi +1 -1
  366. data/lib/authlete/models/components/vci_single_issue_response.rb +4 -4
  367. data/lib/authlete/models/components/vci_single_issue_response.rbi +1 -1
  368. data/lib/authlete/models/components/vci_single_issue_response_action.rb +1 -1
  369. data/lib/authlete/models/components/vci_single_issue_response_action.rbi +1 -1
  370. data/lib/authlete/models/components/vci_single_parse_request.rbi +1 -1
  371. data/lib/authlete/models/components/vci_single_parse_response.rb +1 -1
  372. data/lib/authlete/models/components/vci_single_parse_response.rbi +1 -1
  373. data/lib/authlete/models/components/vci_single_parse_response_action.rbi +1 -1
  374. data/lib/authlete/models/components/verified_claims_validation_schema.rb +1 -1
  375. data/lib/authlete/models/components/verified_claims_validation_schema.rbi +1 -1
  376. data/lib/authlete/models/components.rb +0 -5
  377. data/lib/authlete/models/errors/apierror.rbi +2 -1
  378. data/lib/authlete/models/errors/result_error.rbi +1 -1
  379. data/lib/authlete/models/operations/auth_authorization_api_request.rbi +1 -1
  380. data/lib/authlete/models/operations/auth_authorization_api_response.rbi +1 -1
  381. data/lib/authlete/models/operations/auth_authorization_fail_api_request.rbi +1 -1
  382. data/lib/authlete/models/operations/auth_authorization_fail_api_response.rbi +1 -1
  383. data/lib/authlete/models/operations/auth_authorization_issue_api_request.rbi +1 -1
  384. data/lib/authlete/models/operations/auth_authorization_issue_api_response.rbi +1 -1
  385. data/lib/authlete/models/operations/auth_introspection_api_request.rbi +1 -1
  386. data/lib/authlete/models/operations/auth_introspection_api_response.rbi +1 -1
  387. data/lib/authlete/models/operations/auth_introspection_standard_api_request.rbi +1 -1
  388. data/lib/authlete/models/operations/auth_introspection_standard_api_response.rbi +1 -1
  389. data/lib/authlete/models/operations/auth_revocation_api_request.rbi +1 -1
  390. data/lib/authlete/models/operations/auth_revocation_api_response.rbi +1 -1
  391. data/lib/authlete/models/operations/auth_token_api_request.rbi +1 -1
  392. data/lib/authlete/models/operations/auth_token_api_response.rbi +1 -1
  393. data/lib/authlete/models/operations/auth_token_create_api_request.rbi +1 -1
  394. data/lib/authlete/models/operations/auth_token_create_api_response.rbi +1 -1
  395. data/lib/authlete/models/operations/auth_token_delete_api_request.rb +1 -1
  396. data/lib/authlete/models/operations/auth_token_delete_api_request.rbi +1 -1
  397. data/lib/authlete/models/operations/auth_token_delete_api_response.rbi +1 -1
  398. data/lib/authlete/models/operations/auth_token_fail_api_request.rbi +1 -1
  399. data/lib/authlete/models/operations/auth_token_fail_api_response.rbi +1 -1
  400. data/lib/authlete/models/operations/auth_token_get_list_api_request.rb +3 -3
  401. data/lib/authlete/models/operations/auth_token_get_list_api_request.rbi +1 -1
  402. data/lib/authlete/models/operations/auth_token_get_list_api_response.rbi +1 -1
  403. data/lib/authlete/models/operations/auth_token_issue_api_request.rbi +1 -1
  404. data/lib/authlete/models/operations/auth_token_issue_api_response.rbi +1 -1
  405. data/lib/authlete/models/operations/auth_token_revoke_api_request.rbi +1 -1
  406. data/lib/authlete/models/operations/auth_token_revoke_api_response.rbi +1 -1
  407. data/lib/authlete/models/operations/auth_token_update_api_request.rbi +1 -1
  408. data/lib/authlete/models/operations/auth_token_update_api_response.rbi +1 -1
  409. data/lib/authlete/models/operations/auth_userinfo_api_request.rbi +1 -1
  410. data/lib/authlete/models/operations/auth_userinfo_api_response.rbi +1 -1
  411. data/lib/authlete/models/operations/auth_userinfo_issue_api_request.rbi +1 -1
  412. data/lib/authlete/models/operations/auth_userinfo_issue_api_response.rbi +1 -1
  413. data/lib/authlete/models/operations/authorization_ticket_info_post_api_request.rbi +1 -1
  414. data/lib/authlete/models/operations/authorization_ticket_info_post_api_response.rbi +1 -1
  415. data/lib/authlete/models/operations/backchannel_authentication_api_request.rbi +1 -1
  416. data/lib/authlete/models/operations/backchannel_authentication_api_response.rbi +1 -1
  417. data/lib/authlete/models/operations/backchannel_authentication_complete_api_request.rbi +1 -1
  418. data/lib/authlete/models/operations/backchannel_authentication_complete_api_response.rbi +1 -1
  419. data/lib/authlete/models/operations/backchannel_authentication_fail_api_request.rbi +1 -1
  420. data/lib/authlete/models/operations/backchannel_authentication_fail_api_response.rbi +1 -1
  421. data/lib/authlete/models/operations/backchannel_authentication_issue_api_request.rbi +1 -1
  422. data/lib/authlete/models/operations/backchannel_authentication_issue_api_response.rbi +1 -1
  423. data/lib/authlete/models/operations/client_authorization_delete_api_post_request.rb +1 -1
  424. data/lib/authlete/models/operations/client_authorization_delete_api_post_request.rbi +1 -1
  425. data/lib/authlete/models/operations/client_authorization_delete_api_post_requestbody.rbi +1 -1
  426. data/lib/authlete/models/operations/client_authorization_delete_api_post_response.rbi +1 -1
  427. data/lib/authlete/models/operations/client_authorization_delete_api_request.rb +2 -2
  428. data/lib/authlete/models/operations/client_authorization_delete_api_request.rbi +1 -1
  429. data/lib/authlete/models/operations/client_authorization_delete_api_response.rbi +1 -1
  430. data/lib/authlete/models/operations/client_authorization_delete_by_subject_api_request.rb +2 -2
  431. data/lib/authlete/models/operations/client_authorization_delete_by_subject_api_request.rbi +1 -1
  432. data/lib/authlete/models/operations/client_authorization_delete_by_subject_api_response.rbi +1 -1
  433. data/lib/authlete/models/operations/client_authorization_get_list_api_post_request.rbi +1 -1
  434. data/lib/authlete/models/operations/client_authorization_get_list_api_post_response.rbi +1 -1
  435. data/lib/authlete/models/operations/client_authorization_get_list_api_request.rb +3 -3
  436. data/lib/authlete/models/operations/client_authorization_get_list_api_request.rbi +1 -1
  437. data/lib/authlete/models/operations/client_authorization_get_list_api_response.rbi +1 -1
  438. data/lib/authlete/models/operations/client_authorization_get_list_by_subject_api_request.rb +3 -3
  439. data/lib/authlete/models/operations/client_authorization_get_list_by_subject_api_request.rbi +1 -1
  440. data/lib/authlete/models/operations/client_authorization_get_list_by_subject_api_response.rbi +1 -1
  441. data/lib/authlete/models/operations/client_authorization_update_api_request.rb +1 -1
  442. data/lib/authlete/models/operations/client_authorization_update_api_request.rbi +1 -1
  443. data/lib/authlete/models/operations/client_authorization_update_api_response.rbi +1 -1
  444. data/lib/authlete/models/operations/client_create_api_request.rbi +1 -1
  445. data/lib/authlete/models/operations/client_create_api_response.rbi +1 -1
  446. data/lib/authlete/models/operations/client_delete_api_request.rbi +1 -1
  447. data/lib/authlete/models/operations/client_delete_api_response.rbi +1 -1
  448. data/lib/authlete/models/operations/client_extension_requestables_scopes_delete_api_request.rb +1 -1
  449. data/lib/authlete/models/operations/client_extension_requestables_scopes_delete_api_request.rbi +1 -1
  450. data/lib/authlete/models/operations/client_extension_requestables_scopes_delete_api_response.rbi +1 -1
  451. data/lib/authlete/models/operations/client_extension_requestables_scopes_get_api_request.rb +1 -1
  452. data/lib/authlete/models/operations/client_extension_requestables_scopes_get_api_request.rbi +1 -1
  453. data/lib/authlete/models/operations/client_extension_requestables_scopes_get_api_response.rbi +1 -1
  454. data/lib/authlete/models/operations/client_extension_requestables_scopes_update_api_post_request.rb +1 -1
  455. data/lib/authlete/models/operations/client_extension_requestables_scopes_update_api_post_request.rbi +1 -1
  456. data/lib/authlete/models/operations/client_extension_requestables_scopes_update_api_post_response.rbi +1 -1
  457. data/lib/authlete/models/operations/client_extension_requestables_scopes_update_api_request.rb +1 -1
  458. data/lib/authlete/models/operations/client_extension_requestables_scopes_update_api_request.rbi +1 -1
  459. data/lib/authlete/models/operations/client_extension_requestables_scopes_update_api_response.rbi +1 -1
  460. data/lib/authlete/models/operations/client_flag_update_api_request.rbi +1 -1
  461. data/lib/authlete/models/operations/client_flag_update_api_response.rbi +1 -1
  462. data/lib/authlete/models/operations/client_get_api_request.rbi +1 -1
  463. data/lib/authlete/models/operations/client_get_api_response.rbi +1 -1
  464. data/lib/authlete/models/operations/client_get_list_api_request.rb +1 -1
  465. data/lib/authlete/models/operations/client_get_list_api_request.rbi +1 -1
  466. data/lib/authlete/models/operations/client_get_list_api_response.rbi +1 -1
  467. data/lib/authlete/models/operations/client_granted_scopes_delete_api_request.rb +2 -2
  468. data/lib/authlete/models/operations/client_granted_scopes_delete_api_request.rbi +1 -1
  469. data/lib/authlete/models/operations/client_granted_scopes_delete_api_response.rbi +1 -1
  470. data/lib/authlete/models/operations/client_granted_scopes_delete_by_subject_api_request.rb +2 -2
  471. data/lib/authlete/models/operations/client_granted_scopes_delete_by_subject_api_request.rbi +1 -1
  472. data/lib/authlete/models/operations/client_granted_scopes_delete_by_subject_api_response.rbi +1 -1
  473. data/lib/authlete/models/operations/client_granted_scopes_get_api_post_request.rb +1 -1
  474. data/lib/authlete/models/operations/client_granted_scopes_get_api_post_request.rbi +1 -1
  475. data/lib/authlete/models/operations/client_granted_scopes_get_api_post_requestbody.rbi +1 -1
  476. data/lib/authlete/models/operations/client_granted_scopes_get_api_post_response.rbi +1 -1
  477. data/lib/authlete/models/operations/client_granted_scopes_get_api_request.rb +2 -2
  478. data/lib/authlete/models/operations/client_granted_scopes_get_api_request.rbi +1 -1
  479. data/lib/authlete/models/operations/client_granted_scopes_get_api_response.rbi +1 -1
  480. data/lib/authlete/models/operations/client_granted_scopes_get_by_subject_api_request.rb +2 -2
  481. data/lib/authlete/models/operations/client_granted_scopes_get_by_subject_api_request.rbi +1 -1
  482. data/lib/authlete/models/operations/client_granted_scopes_get_by_subject_api_response.rbi +1 -1
  483. data/lib/authlete/models/operations/client_registration_api_request.rbi +1 -1
  484. data/lib/authlete/models/operations/client_registration_api_requestbody.rb +3 -3
  485. data/lib/authlete/models/operations/client_registration_api_requestbody.rbi +1 -1
  486. data/lib/authlete/models/operations/client_registration_api_response.rbi +1 -1
  487. data/lib/authlete/models/operations/client_registration_delete_api_request.rbi +1 -1
  488. data/lib/authlete/models/operations/client_registration_delete_api_requestbody.rb +3 -3
  489. data/lib/authlete/models/operations/client_registration_delete_api_requestbody.rbi +1 -1
  490. data/lib/authlete/models/operations/client_registration_delete_api_response.rbi +1 -1
  491. data/lib/authlete/models/operations/client_registration_get_api_request.rbi +1 -1
  492. data/lib/authlete/models/operations/client_registration_get_api_requestbody.rb +3 -3
  493. data/lib/authlete/models/operations/client_registration_get_api_requestbody.rbi +1 -1
  494. data/lib/authlete/models/operations/client_registration_get_api_response.rbi +1 -1
  495. data/lib/authlete/models/operations/client_registration_update_api_request.rbi +1 -1
  496. data/lib/authlete/models/operations/client_registration_update_api_requestbody.rb +3 -3
  497. data/lib/authlete/models/operations/client_registration_update_api_requestbody.rbi +1 -1
  498. data/lib/authlete/models/operations/client_registration_update_api_response.rbi +1 -1
  499. data/lib/authlete/models/operations/client_secret_refresh_api_request.rb +1 -1
  500. data/lib/authlete/models/operations/client_secret_refresh_api_request.rbi +1 -1
  501. data/lib/authlete/models/operations/client_secret_refresh_api_response.rbi +1 -1
  502. data/lib/authlete/models/operations/client_secret_update_api_request.rb +1 -1
  503. data/lib/authlete/models/operations/client_secret_update_api_request.rbi +1 -1
  504. data/lib/authlete/models/operations/client_secret_update_api_response.rbi +1 -1
  505. data/lib/authlete/models/operations/client_update_api_form_request.rbi +1 -1
  506. data/lib/authlete/models/operations/client_update_api_form_response.rbi +1 -1
  507. data/lib/authlete/models/operations/client_update_api_request.rbi +1 -1
  508. data/lib/authlete/models/operations/client_update_api_response.rbi +1 -1
  509. data/lib/authlete/models/operations/device_authorization_api_request.rbi +1 -1
  510. data/lib/authlete/models/operations/device_authorization_api_response.rbi +1 -1
  511. data/lib/authlete/models/operations/device_complete_api_request.rbi +1 -1
  512. data/lib/authlete/models/operations/device_complete_api_response.rbi +1 -1
  513. data/lib/authlete/models/operations/device_verification_api_request.rbi +1 -1
  514. data/lib/authlete/models/operations/device_verification_api_response.rbi +1 -1
  515. data/lib/authlete/models/operations/federation_configuration_api_request.rbi +1 -1
  516. data/lib/authlete/models/operations/federation_configuration_api_requestbody.rbi +1 -1
  517. data/lib/authlete/models/operations/federation_configuration_api_response.rbi +1 -1
  518. data/lib/authlete/models/operations/federation_registration_api_request.rbi +1 -1
  519. data/lib/authlete/models/operations/federation_registration_api_response.rbi +1 -1
  520. data/lib/authlete/models/operations/get_api_lifecycle_healthcheck_request.rb +1 -1
  521. data/lib/authlete/models/operations/get_api_lifecycle_healthcheck_request.rbi +1 -1
  522. data/lib/authlete/models/operations/get_api_lifecycle_healthcheck_response.rbi +1 -1
  523. data/lib/authlete/models/operations/grant_m_api_request.rbi +1 -1
  524. data/lib/authlete/models/operations/grant_m_api_response.rbi +1 -1
  525. data/lib/authlete/models/operations/hsk_create_api_request.rbi +1 -1
  526. data/lib/authlete/models/operations/hsk_create_api_response.rbi +1 -1
  527. data/lib/authlete/models/operations/hsk_delete_api_request.rbi +1 -1
  528. data/lib/authlete/models/operations/hsk_delete_api_response.rbi +1 -1
  529. data/lib/authlete/models/operations/hsk_get_api_request.rbi +1 -1
  530. data/lib/authlete/models/operations/hsk_get_api_response.rbi +1 -1
  531. data/lib/authlete/models/operations/hsk_get_list_api_request.rbi +1 -1
  532. data/lib/authlete/models/operations/hsk_get_list_api_response.rbi +1 -1
  533. data/lib/authlete/models/operations/idtoken_reissue_api_request.rbi +1 -1
  534. data/lib/authlete/models/operations/idtoken_reissue_api_response.rbi +1 -1
  535. data/lib/authlete/models/operations/jose_verify_api_request.rbi +1 -1
  536. data/lib/authlete/models/operations/jose_verify_api_response.rbi +1 -1
  537. data/lib/authlete/models/operations/native_sso_api_request.rbi +1 -1
  538. data/lib/authlete/models/operations/native_sso_api_response.rbi +1 -1
  539. data/lib/authlete/models/operations/native_sso_logout_api_request.rbi +1 -1
  540. data/lib/authlete/models/operations/native_sso_logout_api_response.rbi +1 -1
  541. data/lib/authlete/models/operations/pushed_auth_req_api_request.rbi +1 -1
  542. data/lib/authlete/models/operations/pushed_auth_req_api_response.rbi +1 -1
  543. data/lib/authlete/models/operations/service_configuration_api_request.rbi +1 -1
  544. data/lib/authlete/models/operations/service_configuration_api_response.rbi +1 -1
  545. data/lib/authlete/models/operations/service_create_api_response.rbi +1 -1
  546. data/lib/authlete/models/operations/service_delete_api_request.rbi +1 -1
  547. data/lib/authlete/models/operations/service_delete_api_response.rbi +1 -1
  548. data/lib/authlete/models/operations/service_get_api_request.rbi +1 -1
  549. data/lib/authlete/models/operations/service_get_api_response.rbi +1 -1
  550. data/lib/authlete/models/operations/service_get_list_api_request.rbi +1 -1
  551. data/lib/authlete/models/operations/service_get_list_api_response.rbi +1 -1
  552. data/lib/authlete/models/operations/service_jwks_get_api_request.rbi +1 -1
  553. data/lib/authlete/models/operations/service_jwks_get_api_response.rbi +1 -1
  554. data/lib/authlete/models/operations/service_update_api_request.rbi +1 -1
  555. data/lib/authlete/models/operations/service_update_api_response.rbi +1 -1
  556. data/lib/authlete/models/operations/updateauthorizationticket_request.rbi +1 -1
  557. data/lib/authlete/models/operations/updateauthorizationticket_response.rbi +1 -1
  558. data/lib/authlete/models/operations/vci_batch_issue_api_request.rbi +1 -1
  559. data/lib/authlete/models/operations/vci_batch_issue_api_response.rbi +1 -1
  560. data/lib/authlete/models/operations/vci_batch_parse_api_request.rbi +1 -1
  561. data/lib/authlete/models/operations/vci_batch_parse_api_response.rbi +1 -1
  562. data/lib/authlete/models/operations/vci_deferred_issue_api_request.rbi +1 -1
  563. data/lib/authlete/models/operations/vci_deferred_issue_api_response.rbi +1 -1
  564. data/lib/authlete/models/operations/vci_deferred_parse_api_request.rbi +1 -1
  565. data/lib/authlete/models/operations/vci_deferred_parse_api_response.rbi +1 -1
  566. data/lib/authlete/models/operations/vci_jwks_api_request.rbi +1 -1
  567. data/lib/authlete/models/operations/vci_jwks_api_response.rbi +1 -1
  568. data/lib/authlete/models/operations/vci_jwtissuer_api_request.rbi +1 -1
  569. data/lib/authlete/models/operations/vci_jwtissuer_api_response.rbi +1 -1
  570. data/lib/authlete/models/operations/vci_metadata_api_request.rbi +1 -1
  571. data/lib/authlete/models/operations/vci_metadata_api_response.rbi +1 -1
  572. data/lib/authlete/models/operations/vci_offer_create_api_request.rbi +1 -1
  573. data/lib/authlete/models/operations/vci_offer_create_api_response.rbi +1 -1
  574. data/lib/authlete/models/operations/vci_offer_info_api_request.rbi +1 -1
  575. data/lib/authlete/models/operations/vci_offer_info_api_response.rbi +1 -1
  576. data/lib/authlete/models/operations/vci_single_issue_api_request.rbi +1 -1
  577. data/lib/authlete/models/operations/vci_single_issue_api_response.rbi +1 -1
  578. data/lib/authlete/models/operations/vci_single_parse_api_request.rbi +1 -1
  579. data/lib/authlete/models/operations/vci_single_parse_api_response.rbi +1 -1
  580. data/lib/authlete/models/operations.rb +0 -4
  581. data/lib/authlete/native_sso.rb +17 -69
  582. data/lib/authlete/pushed_authorization.rb +10 -5
  583. data/lib/authlete/revocation.rb +10 -98
  584. data/lib/authlete/sdkconfiguration.rb +5 -6
  585. data/lib/authlete/services.rb +47 -27
  586. data/lib/authlete/token_management.rb +43 -23
  587. data/lib/authlete/tokens.rb +24 -454
  588. data/lib/authlete/userinfo.rb +17 -224
  589. data/lib/authlete/utils/request_bodies.rb +8 -3
  590. data/lib/authlete/utils/security.rb +32 -11
  591. data/lib/authlete/utils/url.rb +11 -5
  592. data/lib/authlete/utils/utils.rb +33 -3
  593. data/lib/authlete/verifiable_credentials.rb +69 -34
  594. data/lib/authlete_ruby_sdk.rb +0 -1
  595. data/lib/crystalline/metadata_fields.rb +66 -9
  596. data/lib/crystalline/module.rb +3 -3
  597. data/lib/crystalline/types.rb +11 -3
  598. metadata +18 -23
  599. data/lib/authlete/models/components/batchkind.rb +0 -18
  600. data/lib/authlete/models/components/batchkind.rbi +0 -11
  601. data/lib/authlete/models/components/token_batch_status.rb +0 -61
  602. data/lib/authlete/models/components/token_batch_status.rbi +0 -27
  603. data/lib/authlete/models/components/token_batch_status_result.rb +0 -19
  604. data/lib/authlete/models/components/token_batch_status_result.rbi +0 -11
  605. data/lib/authlete/models/components/token_create_batch_response.rb +0 -41
  606. data/lib/authlete/models/components/token_create_batch_response.rbi +0 -17
  607. data/lib/authlete/models/components/token_create_batch_status_response.rb +0 -42
  608. data/lib/authlete/models/components/token_create_batch_status_response.rbi +0 -17
  609. data/lib/authlete/models/operations/auth_token_create_batch_api_request.rb +0 -41
  610. data/lib/authlete/models/operations/auth_token_create_batch_api_request.rbi +0 -17
  611. data/lib/authlete/models/operations/auth_token_create_batch_api_response.rb +0 -44
  612. data/lib/authlete/models/operations/auth_token_create_batch_api_response.rbi +0 -19
  613. data/lib/authlete/models/operations/auth_token_create_batch_status_api_request.rb +0 -37
  614. data/lib/authlete/models/operations/auth_token_create_batch_status_api_request.rbi +0 -15
  615. data/lib/authlete/models/operations/auth_token_create_batch_status_api_response.rb +0 -44
  616. data/lib/authlete/models/operations/auth_token_create_batch_status_api_response.rbi +0 -19
  617. data/lib/authlete/token_operations.rb +0 -344
@@ -39,365 +39,14 @@ module Authlete
39
39
  end
40
40
 
41
41
 
42
- sig { params(token_request: Models::Components::TokenRequest, service_id: ::String, timeout_ms: T.nilable(Integer)).returns(Models::Operations::AuthTokenApiResponse) }
43
- def process_request(token_request:, service_id:, timeout_ms: nil)
42
+
43
+
44
+ sig { params(token_request: Models::Components::TokenRequest, service_id: ::String, timeout_ms: T.nilable(Integer), http_headers: T.nilable(T::Hash[T.any(String, Symbol), String])).returns(Models::Operations::AuthTokenApiResponse) }
45
+ def process_request(token_request:, service_id:, timeout_ms: nil, http_headers: nil)
44
46
  # process_request - Process Token Request
45
47
  # This API parses request parameters of an authorization request and returns necessary data for the
46
48
  # authorization server implementation to process the authorization request further.
47
- # ### Description
48
- # This API is supposed to be called from with the implementation of the token endpoint of the service.
49
- # The endpoint implementation must extract the request parameters from the token request from the
50
- # client application and pass them as the value of parameters request parameter to Authlete's `/auth/token` API.
51
- # The value of parameters is the entire entity body (which is formatted in `application/x-www-form-urlencoded`)
52
- # of the token request.
53
- # In addition, if the token endpoint of the authorization server implementation supports basic authentication
54
- # as a means of [client authentication](https://datatracker.ietf.org/doc/html/rfc6749#section-2.3),
55
- # the client credentials must be extracted from `Authorization` header and they must be passed as
56
- # `clientId` request parameter and `clientSecret` request parameter to Authlete's `/auth/token` API.
57
- # The following code snippet is an example in JAX-RS showing how to extract request parameters from
58
- # the token request and client credentials from Authorization header.
59
- # ```java
60
- # @POST
61
- # @Consumes(MediaType.APPLICATION\_FORM\_URLENCODED)
62
- # public Response post(
63
- # @HeaderParam(HttpHeaders.AUTHORIZATION) String auth,
64
- # String parameters)
65
- # {
66
- # // Convert the value of Authorization header (credentials of
67
- # // the client application), if any, into BasicCredentials.
68
- # BasicCredentials credentials = BasicCredentials.parse(auth);
69
- # // The credentials of the client application extracted from
70
- # // 'Authorization' header. These may be null.
71
- # String clientId = credentials == null ? null
72
- # : credentials.getUserId();
73
- # String clientSecret = credentials == null ? null
74
- # : credentials.getPassword();
75
- # // Process the given parameters.
76
- # return process(parameters, clientId, clientSecret);
77
- # }
78
- # ```
79
- # The response from `/auth/token` API has some parameters. Among them, it is action parameter that
80
- # the service implementation should check first because it denotes the next action that the authorization
81
- # server implementation should take. According to the value of action, the authorization server
82
- # implementation must take the steps described below.
83
- # **INTERNAL\_SERVER\_ERROR**
84
- # When the value of `action` is `INTERNAL\_SERVER\_ERROR`, it means that the request from the authorization
85
- # server implementation was wrong or that an error occurred in Authlete.
86
- # In either case, from the viewpoint of the client application, it is an error on the server side.
87
- # Therefore, the service implementation should generate a response to the client application with
88
- # HTTP status of "500 Internal Server Error". Authlete recommends `application/json` as the content
89
- # type although OAuth 2.0 specification does not mention the format of the error response when the
90
- # redirect URI is not usable.
91
- # The value of `responseContent` is a JSON string which describes the error, so it can be
92
- # used as the entity body of the response.
93
- # The following illustrates the response which the service implementation should generate and return
94
- # to the client application.
95
- # ```
96
- # HTTP/1.1 500 Internal Server Error
97
- # Content-Type: application/json
98
- # Cache-Control: no-store
99
- # Pragma: no-cache
100
- # {responseContent}
101
- # ```
102
- # The endpoint implementation may return another different response to the client application
103
- # since "500 Internal Server Error" is not required by OAuth 2.0.
104
- # **INVALID\_CLIENT**
105
- # When the value of `action` is `INVALID\_CLIENT`, it means that authentication of the client failed.
106
- # In this case, the HTTP status of the response to the client application is either "400 Bad Request"
107
- # or "401 Unauthorized". This requirement comes from [RFC 6749, 5.2. Error Response](https://datatracker.ietf.org/doc/html/rfc6749#section-5.2).
108
- # The description about `invalid\_client` shown below is an excerpt from RFC 6749.
109
- # Client authentication failed (e.g., unknown client, no client authentication included, or unsupported
110
- # authentication method). The authorization server MAY return an HTTP 401 (Unauthorized) status code
111
- # to indicate which HTTP authentication schemes are supported. If the client attempted to authenticate
112
- # via the `Authorization` request header field, the authorization server MUST respond with an HTTP
113
- # 401 (Unauthorized) status code and include the `WWW-Authenticate` response header field matching
114
- # the authentication scheme used by the client.
115
- # In either case, the value of `responseContent` is a JSON string which can be used as the entity
116
- # body of the response to the client application.
117
- # The following illustrate responses which the service implementation must generate and return to
118
- # the client application.
119
- # ```
120
- # HTTP/1.1 400 Bad Request
121
- # Content-Type: application/json
122
- # Cache-Control: no-store
123
- # Pragma: no-cache
124
- # {responseContent}
125
- # ```
126
- # ```
127
- # HTTP/1.1 401 Unauthorized
128
- # WWW-Authenticate: {challenge}
129
- # Content-Type: application/json
130
- # Cache-Control: no-store
131
- # Pragma: no-cache
132
- # {responseContent}
133
- # ```
134
- # **BAD\_REQUEST**
135
- # When the value of `action` is `BAD\_REQUEST`, it means that the request from the client application
136
- # is invalid.
137
- # A response with HTTP status of "400 Bad Request" must be returned to the client application and
138
- # the content type must be `application/json`.
139
- # The value of `responseContent` is a JSON string which describes the error, so it can be used as
140
- # the entity body of the response.
141
- # The following illustrates the response which the service implementation should generate and return
142
- # to the client application.
143
- # ```
144
- # HTTP/1.1 400 Bad Request
145
- # Content-Type: application/json
146
- # Cache-Control: no-store
147
- # Pragma: no-cache
148
- # {responseContent}
149
- # ```
150
- # **PASSWORD**
151
- # When the value of `"action"` is `"PASSWORD"`, it means that
152
- # the request from the client application is valid and `grant\_type`
153
- # is `"password"`. That is, the flow is
154
- # ["Resource Owner
155
- # Password Credentials"](https://www.rfc-editor.org/rfc/rfc6749.html#section-4.3).
156
- # In this case, {@link #getUsername()} returns the value of `"username"`
157
- # request parameter and {@link #getPassword()} returns the value of {@code
158
- # "password"} request parameter which were contained in the token request
159
- # from the client application. The service implementation must validate the
160
- # credentials of the resource owner (= end-user) and take either of the
161
- # actions below according to the validation result.
162
- # 1. When the credentials are valid, call Authlete's /auth/token/issue} API to generate an access token for the client
163
- # application. The API requires `"ticket"` request parameter and
164
- # `"subject"` request parameter.
165
- # Use the value returned from {@link #getTicket()} method as the value
166
- # for `"ticket"` parameter.
167
- # 2. The response from `/auth/token/issue` API ({@link
168
- # TokenIssueResponse}) contains data (an access token and others)
169
- # which should be returned to the client application. Use the data
170
- # to generate a response to the client application.
171
- # 3. When the credentials are invalid, call Authlete's {@code
172
- # /auth/token/fail} API with `reason=`{@link
173
- # TokenFailRequest.Reason#INVALID\_RESOURCE\_OWNER\_CREDENTIALS
174
- # INVALID\_RESOURCE\_OWNER\_CREDENTIALS} to generate an error response
175
- # for the client application. The API requires `"ticket"`
176
- # request parameter. Use the value returned from {@link #getTicket()}
177
- # method as the value for `"ticket"` parameter.
178
- # 4. The response from `/auth/token/fail` API ({@link
179
- # TokenFailResponse}) contains error information which should be
180
- # returned to the client application. Use it to generate a response
181
- # to the client application.
182
- # **OK**
183
- # When the value of `action` is `OK`, it means that the request from the client application is valid
184
- # and an access token, and optionally an ID token, is ready to be issued.
185
- # The HTTP status of the response returned to the client application must be "200 OK" and the content
186
- # type must be `application/json`.
187
- # The value of `responseContent` is a JSON string which contains an access token (and optionally
188
- # an ID token), so it can be used as the entity body of the response.
189
- # The following illustrates the response which the service implementation must generate and return
190
- # to the client application.
191
- # ```
192
- # HTTP/1.1 200 OK
193
- # Content-Type: application/json
194
- # Cache-Control: no-store
195
- # Pragma: no-cache
196
- # {responseContent}
197
- # ```
198
- # **TOKEN\_EXCHANGE (Authlete 2.3 onwards)**
199
- # When the value of `"action"` is `"TOKEN\_EXCHANGE"`, it means
200
- # that the request from the client application is a valid token exchange
201
- # request (cf. [RFC
202
- # 8693 OAuth 2.0 Token Exchange](https://www.rfc-editor.org/rfc/rfc8693.html)) and that the request has already passed
203
- # the following validation steps.
204
- # 1. Confirm that the value of the `requested\_token\_type` request parameter
205
- # is one of the registered token type identifiers if the request parameter is
206
- # given and its value is not empty.
207
- # 2. Confirm that the `subject\_token` request parameter is given and its
208
- # value is not empty.
209
- # 3. Confirm that the `subject\_token\_type` request parameter is given and
210
- # its value is one of the registered token type identifiers.
211
- # 4. Confirm that the `actor\_token\_type` request parameter is given and
212
- # its value is one of the registered token type identifiers if the
213
- # `actor\_token` request parameter is given and its value is not empty.
214
- # 5. Confirm that the `actor\_token\_type` request parameter is not given
215
- # or its value is empty when the `actor\_token` request parameter is
216
- # not given or its value is empty.
217
- # Furthermore, Authlete performs additional validation on the tokens specified
218
- # by the `subject\_token` request parameter and the `actor\_token`
219
- # request parameter according to their respective token types as shown below.
220
- # **Token Validation Steps**
221
- # \*Token Type: `urn:ietf:params:oauth:token-type:jwt`\*
222
- # 1. Confirm that the format conforms to the JWT specification [RFC 7519][https://www.rfc-editor.org/rfc/rfc7519.html].
223
- # 2. Check if the JWT is encrypted and if it is encrypted, then (a) reject
224
- # the token exchange request when the {@link
225
- # Service#isTokenExchangeEncryptedJwtRejected()
226
- # tokenExchangeEncryptedJwtRejected} flag of the service is `true`
227
- # or (b) skip remaining validation steps when the flag is `false`.
228
- # Note that Authlete does not verify an encrypted JWT because there is
229
- # no standard way to obtain the key to decrypt the JWT with. This means
230
- # that you must verify an encrypted JWT by yourself when one is used as
231
- # an input token with the token type
232
- # { @code "urn:ietf:params:oauth:token-type:jwt" }.
233
- # 3. Confirm that the current time has not reached the time indicated by
234
- # the `exp` claim if the JWT contains the claim.
235
- # 4. Confirm that the current time is equal to or after the time indicated
236
- # by the `iat` claim if the JWT contains the claim.
237
- # 5.Confirm that the current time is equal to or after the time indicated
238
- # by the `nbf` claim if the JWT contains the claim.
239
- # 6. Check if the JWT is signed and if it is not signed, then (a) reject
240
- # the token exchange request when the {@link
241
- # Service#isTokenExchangeUnsignedJwtRejected()
242
- # tokenExchangeUnsignedJwtRejected} flag of the service is `true`
243
- # or (b) finish validation on the input token. Note that Authlete does
244
- # not verify the signature of the JWT because there is no standard way
245
- # to obtain the key to verify the signature of a JWT with. This means
246
- # that you must verify the signature by yourself when a signed JWT is
247
- # used as an input token with the token type
248
- # `"urn:ietf:params:oauth:token-type:jwt"`.
249
- # \*Token Type: `urn:ietf:params:oauth:token-type:access\_token`\*
250
- # 1. Confirm that the token is an access token that has been issued by
251
- # the Authlete server of your service. This implies that access
252
- # tokens issued by other systems cannot be used as a subject token
253
- # or an actor token with the token type
254
- # `urn:ietf:params:oauth:token-type:access_token`.
255
- # 2. Confirm that the access token has not expired.
256
- # 3. Confirm that the access token belongs to the service.
257
- # \*Token Type: `urn:ietf:params:oauth:token-type:refresh\_token`\*
258
- # 1. Confirm that the token is a refresh token that has been issued by
259
- # the Authlete server of your service. This implies that refresh
260
- # tokens issued by other systems cannot be used as a subject token
261
- # or an actor token with the token type
262
- # `urn:ietf:params:oauth:token-type:refresh_token`.
263
- # 2. Confirm that the refresh token has not expired.
264
- # 3. Confirm that the refresh token belongs to the service.
265
- # \*Token Type: `urn:ietf:params:oauth:token-type:id\_token`\*
266
- # 1. Confirm that the format conforms to the JWT specification ([RFC 7519](https://www.rfc-editor.org/rfc/rfc7519.html)).
267
- # 2. Check if the ID Token is encrypted and if it is encrypted, then (a)
268
- # reject the token exchange request when the {@link
269
- # Service#isTokenExchangeEncryptedJwtRejected()
270
- # tokenExchangeEncryptedJwtRejected} flag of the service is `true`
271
- # or (b) skip remaining validation steps when the flag is `false`.
272
- # Note that Authlete does not verify an encrypted ID Token because
273
- # there is no standard way to obtain the key to decrypt the ID Token
274
- # with in the context of token exchange where the client ID for the
275
- # encrypted ID Token cannot be determined. This means that you must
276
- # verify an encrypted ID Token by yourself when one is used as an
277
- # input token with the token type
278
- # `"urn:ietf:params:oauth:token-type:id\_token"`.
279
- # 3. Confirm that the ID Token contains the `exp` claim and the
280
- # current time has not reached the time indicated by the claim.
281
- # 4. Confirm that the ID Token contains the `iat` claim and the
282
- # current time is equal to or after the time indicated by the claim.
283
- # 5. Confirm that the current time is equal to or after the time indicated
284
- # by the `nbf` claim if the ID Token contains the claim.
285
- # 6. Confirm that the ID Token contains the `iss` claim and the
286
- # value is a valid URI. In addition, confirm that the URI has the
287
- # `https` scheme, no query component and no fragment component.
288
- # 7. Confirm that the ID Token contains the `aud` claim and its
289
- # value is a JSON string or an array of JSON strings.
290
- # 8. Confirm that the value of the `nonce` claim is a JSON string
291
- # if the ID Token contains the claim.
292
- # 9. Check if the ID Token is signed and if it is not signed, then (a)
293
- # reject the token exchange request when the {@link
294
- # Service#isTokenExchangeUnsignedJwtRejected()
295
- # tokenExchangeUnsignedJwtRejected} flag of the service is `true`
296
- # or (b) finish validation on the input token.
297
- # 10. Confirm that the signature algorithm is asymmetric. This implies that
298
- # ID Tokens whose signature algorithm is symmetric (`HS256`,
299
- # `HS384` or `HS512`) cannot be used as a subject token or
300
- # an actor token with the token type
301
- # `urn:ietf:params:oauth:token-type:id\_token`.
302
- # 11. Verify the signature of the ID Token. Signature verification is
303
- # performed even in the case where the issuer of the ID Token is not
304
- # your service. But in that case, the issuer must support the discovery
305
- # endpoint defined in [OpenID
306
- # Connect Discovery 1.0](https://openid.net/specs/openid-connect-discovery-1_0.html). Otherwise, signature verification fails.
307
- # \*Token Type: `urn:ietf:params:oauth:token-type:saml1`\*
308
- # (Authlete does not perform any validation for this token type.)
309
- # \*Token Type: `urn:ietf:params:oauth:token-type:saml2`\*
310
- # (Authlete does not perform any validation for this token type.)
311
- # The specification of Token Exchange ([RFC 8693](https://www.rfc-editor.org/rfc/rfc8693.html)) is very
312
- # flexible. In other words, the specification has abandoned the task of
313
- # determining details. Therefore, for secure token exchange, you have
314
- # to complement the specification with your own rules. For that purpose,
315
- # Authlete provides some configuration options as listed below.
316
- # Authorization server implementers may utilize them and/or implement
317
- # their own rules.
318
- # In the case of {@link Action#TOKEN\_EXCHANGE TOKEN\_EXCHANGE}, the {@link
319
- # #getResponseContent()} method returns `null`. You have to construct
320
- # the token response by yourself.
321
- # For example, you may generate an access token by calling Authlete's
322
- # `/api/auth/token/create` API and construct a token response like
323
- # below.
324
- # ```
325
- # HTTP/1.1 401 Unauthorized
326
- # WWW-Authenticate: {challenge}
327
- # Content-Type: application/json
328
- # Cache-Control: no-store
329
- # Pragma: no-cache
330
- # {responseContent}
331
- # ```
332
- # ```
333
- # HTTP/1.1 200 OK
334
- # Content-Type: application/json
335
- # Cache-Control: no-cache, no-store
336
- # {
337
- # "access\_token": "{@link TokenCreateResponse#getAccessToken()}",
338
- # "issued\_token\_type": "urn:ietf:params:oauth:token-type:access\_token",
339
- # "token\_type": "Bearer",
340
- # "expires\_in": { @link TokenCreateResponse#getExpiresIn() },
341
- # "scope": "String.join(" ", {@link TokenCreateResponse#getScopes()})"
342
- # }
343
- # ```
344
- # **JWT\_BEARER JWT\_BEARER (Authlete 2.3 onwards)**
345
- # When the value of `"action"` is `"JWT\_BEARER"`, it means that
346
- # the request from the client application is a valid token request with the
347
- # grant type `"urn:ietf:params:oauth:grant-type:jwt-bearer"` ([RFC 7523 JSON Web Token (JWT)
348
- # Profile for OAuth 2.0 Client Authentication and Authorization Grants](https://www.rfc-editor.org/rfc/rfc7523.html))
349
- # and that the request has already passed the following validation steps.
350
- # 1. Confirm that the `assertion` request parameter is given and its value
351
- # is not empty.
352
- # 2. Confirm that the format of the assertion conforms to the JWT specification
353
- # ([RFC 7519](https://www.rfc-editor.org/rfc/rfc7519.html)).
354
- # 3. Check if the JWT is encrypted and if it is encrypted, then (a) reject the
355
- # token request when the {@link Service#isJwtGrantEncryptedJwtRejected()
356
- # jwtGrantEncryptedJwtRejected} flag of the service is `true` or (b)
357
- # skip remaining validation steps when the flag is `false`. Note that
358
- # Authlete does not verify an encrypted JWT because there is no standard way
359
- # to obtain the key to decrypt the JWT with. This means that you must verify
360
- # an encrypted JWT by yourself.
361
- # 4. Confirm that the JWT contains the `iss` claim and its value is a
362
- # JSON string.
363
- # 5. Confirm that the JWT contains the `sub` claim and its value is a
364
- # JSON string.
365
- # 6. Confirm that the JWT contains the `aud` claim and its value is
366
- # either a JSON string or an array of JSON strings.
367
- # 7. Confirm that the issuer identifier of the service (cf. {@link Service#getIssuer()})
368
- # or the URL of the token endpoint (cf. {@link Service#getTokenEndpoint()})
369
- # is listed as audience in the `aud` claim.
370
- # 8. Confirm that the JWT contains the `exp` claim and the current time
371
- # has not reached the time indicated by the claim.
372
- # 9. Confirm that the current time is equal to or after the time indicated by
373
- # by the `iat` claim if the JWT contains the claim.
374
- # 10. Confirm that the current time is equal to or after the time indicated by
375
- # by the `nbf` claim if the JWT contains the claim.
376
- # 11. Check if the JWT is signed and if it is not signed, then (a) reject the
377
- # token request when the {@link Service#isJwtGrantUnsignedJwtRejected()
378
- # jwtGrantUnsignedJwtRejected} flag of the service is `true` or (b)
379
- # finish validation on the JWT. Note that Authlete does not verify the
380
- # signature of the JWT because there is no standard way to obtain the key
381
- # to verify the signature of a JWT with. This means that you must verify
382
- # the signature by yourself.
383
- # Authlete provides some configuration options for the grant type as listed
384
- # below. Authorization server implementers may utilize them and/or implement
385
- # their own rules.
386
- # ```
387
- # HTTP/1.1 200 OK
388
- # Content-Type: application/json
389
- # Cache-Control: no-cache, no-store
390
- # {
391
- # "access\_token": "{@link TokenCreateResponse#getAccessToken()}",
392
- # "token\_type": "Bearer",
393
- # "expires\_in": {@link TokenCreateResponse#getExpiresIn()},
394
- # "scope": "String.join(" ", {@link TokenCreateResponse#getScopes()})"
395
- # }
396
- # ```
397
- # Finally, note again that Authlete does not verify the signature of the JWT
398
- # specified by the `assertion` request parameter. You must verify the
399
- # signature by yourself.
400
- #
49
+ #
401
50
  request = Models::Operations::AuthTokenApiRequest.new(
402
51
  service_id: service_id,
403
52
  token_request: token_request
@@ -416,7 +65,7 @@ module Authlete
416
65
  headers['content-type'] = req_content_type
417
66
  raise StandardError, 'request body is required' if data.nil? && form.nil?
418
67
 
419
- if form
68
+ if form && !form.empty?
420
69
  body = Utils.encode_form(form)
421
70
  elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
422
71
  body = URI.encode_www_form(T.cast(data, T::Hash[Symbol, Object]))
@@ -452,6 +101,9 @@ module Authlete
452
101
  req.headers.merge!(headers)
453
102
  req.options.timeout = timeout unless timeout.nil?
454
103
  Utils.configure_request_security(req, security)
104
+ http_headers&.each do |key, value|
105
+ req.headers[key.to_s] = value
106
+ end
455
107
 
456
108
  @sdk_configuration.hooks.before_request(
457
109
  hook_ctx: SDKHooks::BeforeRequestHookContext.new(
@@ -549,56 +201,12 @@ module Authlete
549
201
  end
550
202
 
551
203
 
552
- sig { params(token_fail_request: Models::Components::TokenFailRequest, service_id: ::String, timeout_ms: T.nilable(Integer)).returns(Models::Operations::AuthTokenFailApiResponse) }
553
- def fail_request(token_fail_request:, service_id:, timeout_ms: nil)
204
+ sig { params(token_fail_request: Models::Components::TokenFailRequest, service_id: ::String, timeout_ms: T.nilable(Integer), http_headers: T.nilable(T::Hash[T.any(String, Symbol), String])).returns(Models::Operations::AuthTokenFailApiResponse) }
205
+ def fail_request(token_fail_request:, service_id:, timeout_ms: nil, http_headers: nil)
554
206
  # fail_request - Fail Token Request
555
207
  # This API generates a content of an error token response that the authorization server implementation
556
208
  # returns to the client application.
557
- # ### Description
558
- # This API is supposed to be called from within the implementation of the token endpoint of the service
559
- # in order to generate an error response to the client application.
560
- # The description of the `/auth/token` API describes the timing when this API should be called. See
561
- # the description for the case of `action=PASSWORD`.
562
- # The response from `/auth/token/fail` API has some parameters. Among them, it is `action` parameter
563
- # that the authorization server implementation should check first because it denotes the next action
564
- # that the authorization server implementation should take. According to the value of `action`, the
565
- # authorization server implementation must take the steps described below.
566
- # **INTERNAL\_SERVER\_ERROR**
567
- # When the value of `action` is `INTERNAL\_SERVER\_ERROR`, it means that the request from the authorization
568
- # server implementation was wrong or that an error occurred in Authlete.
569
- # In either case, from the viewpoint of the client application, it is an error on the server side.
570
- # Therefore, the service implementation should generate a response to the client application with
571
- # HTTP status of "500 Internal Server Error".
572
- # The value of `responseContent` is a JSON string which describes the error, so it can be used
573
- # as the entity body of the response.
574
- # The following illustrates the response which the service implementation should generate and return
575
- # to the client application.
576
- # ```
577
- # HTTP/1.1 500 Internal Server Error
578
- # Content-Type: application/json
579
- # Cache-Control: no-store
580
- # Pragma: no-cache
581
- # {responseContent}
582
- # ```
583
- # The endpoint implementation may return another different response to the client application
584
- # since "500 Internal Server Error" is not required by OAuth 2.0.
585
- # **BAD\_REQUEST**
586
- # When the value of `action` is `BAD\_REQUEST`, it means that Authlete's `/auth/token/fail` API successfully
587
- # generated an error response for the client application.
588
- # The HTTP status of the response returned to the client application must be "400 Bad Request" and
589
- # the content type must be `application/json`.
590
- # The value of `responseContent` is a JSON string which describes the error, so it can be used
591
- # as the entity body of the response.
592
- # The following illustrates the response which the service implementation should generate and return
593
- # to the client application.
594
- # ```
595
- # HTTP/1.1 400 Bad Request
596
- # Content-Type: application/json
597
- # Cache-Control: no-store
598
- # Pragma: no-cache
599
- # {responseContent}
600
- # ```
601
- #
209
+ #
602
210
  request = Models::Operations::AuthTokenFailApiRequest.new(
603
211
  service_id: service_id,
604
212
  token_fail_request: token_fail_request
@@ -617,7 +225,7 @@ module Authlete
617
225
  headers['content-type'] = req_content_type
618
226
  raise StandardError, 'request body is required' if data.nil? && form.nil?
619
227
 
620
- if form
228
+ if form && !form.empty?
621
229
  body = Utils.encode_form(form)
622
230
  elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
623
231
  body = URI.encode_www_form(T.cast(data, T::Hash[Symbol, Object]))
@@ -653,6 +261,9 @@ module Authlete
653
261
  req.headers.merge!(headers)
654
262
  req.options.timeout = timeout unless timeout.nil?
655
263
  Utils.configure_request_security(req, security)
264
+ http_headers&.each do |key, value|
265
+ req.headers[key.to_s] = value
266
+ end
656
267
 
657
268
  @sdk_configuration.hooks.before_request(
658
269
  hook_ctx: SDKHooks::BeforeRequestHookContext.new(
@@ -750,56 +361,12 @@ module Authlete
750
361
  end
751
362
 
752
363
 
753
- sig { params(token_issue_request: Models::Components::TokenIssueRequest, service_id: ::String, timeout_ms: T.nilable(Integer)).returns(Models::Operations::AuthTokenIssueApiResponse) }
754
- def issue_response(token_issue_request:, service_id:, timeout_ms: nil)
364
+ sig { params(token_issue_request: Models::Components::TokenIssueRequest, service_id: ::String, timeout_ms: T.nilable(Integer), http_headers: T.nilable(T::Hash[T.any(String, Symbol), String])).returns(Models::Operations::AuthTokenIssueApiResponse) }
365
+ def issue_response(token_issue_request:, service_id:, timeout_ms: nil, http_headers: nil)
755
366
  # issue_response - Issue Token Response
756
367
  # This API generates a content of a successful token response that the authorization server implementation
757
368
  # returns to the client application.
758
- # ### Description
759
- # This API is supposed to be called from within the implementation of the token endpoint of the service
760
- # in order to generate a successful response to the client application.
761
- # The description of the `/auth/token` API describes the timing when this API should be called. See
762
- # the description for the case of `action=PASSWORD`.
763
- # The response from `/auth/token/issue` API has some parameters. Among them, it is `action` parameter
764
- # that the authorization server implementation should check first because it denotes the next action
765
- # that the authorization server implementation should take. According to the value of `action`, the
766
- # authorization server implementation must take the steps described below.
767
- # **INTERNAL\_SERVER\_ERROR**
768
- # When the value of `action` is `INTERNAL\_SERVER\_ERROR`, it means that the request from the authorization
769
- # server implementation was wrong or that an error occurred in Authlete.
770
- # In either case, from the viewpoint of the client application, it is an error on the server side.
771
- # Therefore, the service implementation should generate a response to the client application with
772
- # HTTP status of "500 Internal Server Error".
773
- # The value of `responseContent` is a JSON string which describes the error, so it can be used
774
- # as the entity body of the response.
775
- # The following illustrates the response which the service implementation should generate and return
776
- # to the client application.
777
- # ```
778
- # HTTP/1.1 500 Internal Server Error
779
- # Content-Type: application/json
780
- # Cache-Control: no-store
781
- # Pragma: no-cache
782
- # {responseContent}
783
- # ```
784
- # The endpoint implementation may return another different response to the client application
785
- # since "500 Internal Server Error" is not required by OAuth 2.0.
786
- # **OK**
787
- # When the value of `action` is `OK`, it means that Authlete's `/auth/token/issue` API successfully
788
- # generated an access token.
789
- # The HTTP status of the response returned to the client application must be "200 OK" and the content
790
- # type must be`application/json`.
791
- # The value of `responseContent` is a JSON string which contains an access token, so it can be used
792
- # as the entity body of the response.
793
- # The following illustrates the response which the service implementation must generate and return
794
- # to the client application.
795
- # ```
796
- # HTTP/1.1 200 OK
797
- # Content-Type: application/json
798
- # Cache-Control: no-store
799
- # Pragma: no-cache
800
- # {responseContent}
801
- # ```
802
- #
369
+ #
803
370
  request = Models::Operations::AuthTokenIssueApiRequest.new(
804
371
  service_id: service_id,
805
372
  token_issue_request: token_issue_request
@@ -818,7 +385,7 @@ module Authlete
818
385
  headers['content-type'] = req_content_type
819
386
  raise StandardError, 'request body is required' if data.nil? && form.nil?
820
387
 
821
- if form
388
+ if form && !form.empty?
822
389
  body = Utils.encode_form(form)
823
390
  elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
824
391
  body = URI.encode_www_form(T.cast(data, T::Hash[Symbol, Object]))
@@ -854,6 +421,9 @@ module Authlete
854
421
  req.headers.merge!(headers)
855
422
  req.options.timeout = timeout unless timeout.nil?
856
423
  Utils.configure_request_security(req, security)
424
+ http_headers&.each do |key, value|
425
+ req.headers[key.to_s] = value
426
+ end
857
427
 
858
428
  @sdk_configuration.hooks.before_request(
859
429
  hook_ctx: SDKHooks::BeforeRequestHookContext.new(
@@ -949,5 +519,5 @@ module Authlete
949
519
 
950
520
  end
951
521
  end
952
- end
522
+ end
953
523
  end