ory-client 0.1.0.alpha12 → 0.2.0.alpha14

Sign up to get free protection for your applications and to get access to all the features.
Files changed (505) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +2 -2
  3. data/README.md +120 -23
  4. data/docs/AcceptOAuth2ConsentRequest.md +28 -0
  5. data/docs/AcceptOAuth2ConsentRequestSession.md +20 -0
  6. data/docs/AcceptOAuth2LoginRequest.md +30 -0
  7. data/docs/AdminApi.md +76 -0
  8. data/docs/AdminCreateJsonWebKeySetBody.md +22 -0
  9. data/docs/AdminTrustOAuth2JwtGrantIssuerBody.md +28 -0
  10. data/docs/AdminUpdateIdentityBody.md +2 -0
  11. data/docs/{IdentitySchemaLocation.md → GetManagedIdentitySchemaLocation.md} +2 -2
  12. data/docs/{InlineResponse2001.md → GetVersion200Response.md} +2 -2
  13. data/docs/HandledOAuth2ConsentRequest.md +18 -0
  14. data/docs/HandledOAuth2LoginRequest.md +18 -0
  15. data/docs/HandledOAuth2LogoutRequest.md +18 -0
  16. data/docs/Headers.md +18 -0
  17. data/docs/IDTokenClaims.md +44 -0
  18. data/docs/IdentitySchemaContainer.md +20 -0
  19. data/docs/IntrospectedOAuth2Token.md +44 -0
  20. data/docs/{InlineResponse200.md → IsReady200Response.md} +2 -2
  21. data/docs/{InlineResponse503.md → IsReady503Response.md} +2 -2
  22. data/docs/JsonPatch.md +4 -2
  23. data/docs/JsonWebKey.md +50 -0
  24. data/docs/JsonWebKeySet.md +18 -0
  25. data/docs/{IdentitySchema.md → ManagedIdentitySchema.md} +2 -4
  26. data/docs/{IdentitySchemaValidationResult.md → ManagedIdentitySchemaValidationResult.md} +2 -2
  27. data/docs/MetadataApi.md +12 -12
  28. data/docs/NormalizedProjectRevision.md +82 -0
  29. data/docs/NormalizedProjectRevisionIdentitySchema.md +1 -1
  30. data/docs/OAuth2AccessRequest.md +24 -0
  31. data/docs/OAuth2ApiError.md +24 -0
  32. data/docs/OAuth2Client.md +110 -0
  33. data/docs/OAuth2ConsentRequest.md +42 -0
  34. data/docs/OAuth2ConsentRequestOpenIDConnectContext.md +26 -0
  35. data/docs/OAuth2ConsentSession.md +36 -0
  36. data/docs/OAuth2LoginRequest.md +34 -0
  37. data/docs/OAuth2LogoutRequest.md +28 -0
  38. data/docs/OAuth2TokenResponse.md +28 -0
  39. data/docs/OidcConfiguration.md +74 -0
  40. data/docs/OidcUserInfo.md +54 -0
  41. data/docs/Pagination.md +5 -1
  42. data/docs/PaginationHeaders.md +20 -0
  43. data/docs/PreviousOAuth2ConsentSession.md +30 -0
  44. data/docs/ProjectServiceOAuth2.md +18 -0
  45. data/docs/ProjectServices.md +2 -0
  46. data/docs/RefreshTokenHookRequest.md +28 -0
  47. data/docs/RefreshTokenHookResponse.md +18 -0
  48. data/docs/RejectOAuth2Request.md +26 -0
  49. data/docs/SubmitSelfServiceLoginFlowWithWebAuthnMethodBody.md +1 -1
  50. data/docs/Subscription.md +2 -2
  51. data/docs/SuccessfulOAuth2RequestResponse.md +18 -0
  52. data/docs/TokenPagination.md +20 -0
  53. data/docs/TokenPaginationHeaders.md +20 -0
  54. data/docs/TrustedOAuth2JwtGrantIssuer.md +32 -0
  55. data/docs/TrustedOAuth2JwtGrantJsonWebKey.md +20 -0
  56. data/docs/UiNodeInputAttributes.md +3 -1
  57. data/docs/UpdateOAuth2ClientLifespans.md +40 -0
  58. data/docs/V0alpha2Api.md +3304 -245
  59. data/docs/VerifiableIdentityAddress.md +1 -1
  60. data/lib/ory-client/api/admin_api.rb +90 -0
  61. data/lib/ory-client/api/metadata_api.rb +11 -11
  62. data/lib/ory-client/api/read_api.rb +2 -2
  63. data/lib/ory-client/api/v0alpha2_api.rb +3162 -275
  64. data/lib/ory-client/api/write_api.rb +2 -2
  65. data/lib/ory-client/api_client.rb +5 -3
  66. data/lib/ory-client/api_error.rb +2 -2
  67. data/lib/ory-client/configuration.rb +25 -3
  68. data/lib/ory-client/models/accept_o_auth2_consent_request.rb +270 -0
  69. data/lib/ory-client/models/accept_o_auth2_consent_request_session.rb +232 -0
  70. data/lib/ory-client/models/accept_o_auth2_login_request.rb +285 -0
  71. data/lib/ory-client/models/active_project.rb +3 -2
  72. data/lib/ory-client/models/admin_create_identity_body.rb +3 -2
  73. data/lib/ory-client/models/admin_create_identity_import_credentials_oidc.rb +3 -2
  74. data/lib/ory-client/models/admin_create_identity_import_credentials_oidc_config.rb +3 -2
  75. data/lib/ory-client/models/admin_create_identity_import_credentials_oidc_provider.rb +3 -2
  76. data/lib/ory-client/models/admin_create_identity_import_credentials_password.rb +3 -2
  77. data/lib/ory-client/models/admin_create_identity_import_credentials_password_config.rb +3 -2
  78. data/lib/ory-client/models/admin_create_json_web_key_set_body.rb +255 -0
  79. data/lib/ory-client/models/admin_create_self_service_recovery_link_body.rb +3 -2
  80. data/lib/ory-client/models/admin_identity_import_credentials.rb +3 -2
  81. data/lib/ory-client/models/admin_trust_o_auth2_jwt_grant_issuer_body.rb +291 -0
  82. data/lib/ory-client/models/admin_update_identity_body.rb +13 -3
  83. data/lib/ory-client/models/api_token.rb +3 -2
  84. data/lib/ory-client/models/authenticator_assurance_level.rb +2 -2
  85. data/lib/ory-client/models/cloud_account.rb +3 -2
  86. data/lib/ory-client/models/cname_settings.rb +3 -2
  87. data/lib/ory-client/models/create_custom_hostname_body.rb +3 -2
  88. data/lib/ory-client/models/create_project_body.rb +3 -2
  89. data/lib/ory-client/models/create_subscription_payload.rb +3 -2
  90. data/lib/ory-client/models/error_authenticator_assurance_level_not_satisfied.rb +3 -2
  91. data/lib/ory-client/models/expand_tree.rb +3 -2
  92. data/lib/ory-client/models/generic_error.rb +3 -2
  93. data/lib/ory-client/models/generic_error_content.rb +3 -2
  94. data/lib/ory-client/models/get_check_response.rb +3 -2
  95. data/lib/ory-client/models/{identity_schema_location.rb → get_managed_identity_schema_location.rb} +6 -5
  96. data/lib/ory-client/models/get_relation_tuples_response.rb +3 -2
  97. data/lib/ory-client/models/{inline_response2001.rb → get_version200_response.rb} +6 -5
  98. data/lib/ory-client/models/handled_o_auth2_consent_request.rb +225 -0
  99. data/lib/ory-client/models/handled_o_auth2_login_request.rb +225 -0
  100. data/lib/ory-client/models/handled_o_auth2_logout_request.rb +225 -0
  101. data/lib/ory-client/models/headers.rb +222 -0
  102. data/lib/ory-client/models/health_not_ready_status.rb +3 -2
  103. data/lib/ory-client/models/health_status.rb +3 -2
  104. data/lib/ory-client/models/id_token_claims.rb +343 -0
  105. data/lib/ory-client/models/identity.rb +3 -2
  106. data/lib/ory-client/models/identity_credentials.rb +3 -2
  107. data/lib/ory-client/models/identity_credentials_oidc.rb +3 -2
  108. data/lib/ory-client/models/identity_credentials_oidc_provider.rb +3 -2
  109. data/lib/ory-client/models/identity_credentials_password.rb +3 -2
  110. data/lib/ory-client/models/identity_credentials_type.rb +2 -2
  111. data/lib/ory-client/models/identity_schema_container.rb +230 -0
  112. data/lib/ory-client/models/identity_schema_preset.rb +3 -2
  113. data/lib/ory-client/models/identity_state.rb +2 -2
  114. data/lib/ory-client/models/internal_relation_tuple.rb +3 -2
  115. data/lib/ory-client/models/introspected_o_auth2_token.rb +360 -0
  116. data/lib/ory-client/models/invite_payload.rb +3 -2
  117. data/lib/ory-client/models/is_owner_for_project_by_slug.rb +3 -2
  118. data/lib/ory-client/models/is_owner_for_project_by_slug_payload.rb +3 -2
  119. data/lib/ory-client/models/{inline_response200.rb → is_ready200_response.rb} +6 -5
  120. data/lib/ory-client/models/{inline_response503.rb → is_ready503_response.rb} +6 -5
  121. data/lib/ory-client/models/json_error.rb +3 -2
  122. data/lib/ory-client/models/json_patch.rb +14 -3
  123. data/lib/ory-client/models/json_web_key.rb +390 -0
  124. data/lib/ory-client/models/json_web_key_set.rb +223 -0
  125. data/lib/ory-client/models/keto_namespace.rb +3 -2
  126. data/lib/ory-client/models/{identity_schema.rb → managed_identity_schema.rb} +7 -16
  127. data/lib/ory-client/models/{identity_schema_validation_result.rb → managed_identity_schema_validation_result.rb} +6 -5
  128. data/lib/ory-client/models/needs_privileged_session_error.rb +3 -2
  129. data/lib/ory-client/models/normalized_project.rb +3 -2
  130. data/lib/ory-client/models/normalized_project_revision.rb +527 -3
  131. data/lib/ory-client/models/normalized_project_revision_hook.rb +3 -2
  132. data/lib/ory-client/models/normalized_project_revision_identity_schema.rb +4 -3
  133. data/lib/ory-client/models/normalized_project_revision_third_party_provider.rb +3 -2
  134. data/lib/ory-client/models/null_plan.rb +4 -2
  135. data/lib/ory-client/models/o_auth2_access_request.rb +256 -0
  136. data/lib/ory-client/models/o_auth2_api_error.rb +251 -0
  137. data/lib/ory-client/models/o_auth2_client.rb +890 -0
  138. data/lib/ory-client/models/o_auth2_consent_request.rb +345 -0
  139. data/lib/ory-client/models/o_auth2_consent_request_open_id_connect_context.rb +266 -0
  140. data/lib/ory-client/models/o_auth2_consent_session.rb +304 -0
  141. data/lib/ory-client/models/o_auth2_login_request.rb +335 -0
  142. data/lib/ory-client/models/o_auth2_logout_request.rb +269 -0
  143. data/lib/ory-client/models/o_auth2_token_response.rb +271 -0
  144. data/lib/ory-client/models/oidc_configuration.rb +572 -0
  145. data/lib/ory-client/models/oidc_user_info.rb +401 -0
  146. data/lib/ory-client/models/pagination.rb +59 -4
  147. data/lib/ory-client/models/pagination_headers.rb +230 -0
  148. data/lib/ory-client/models/patch_delta.rb +3 -2
  149. data/lib/ory-client/models/previous_o_auth2_consent_session.rb +280 -0
  150. data/lib/ory-client/models/project.rb +3 -2
  151. data/lib/ory-client/models/project_host.rb +3 -2
  152. data/lib/ory-client/models/project_invite.rb +3 -2
  153. data/lib/ory-client/models/project_metadata.rb +3 -2
  154. data/lib/ory-client/models/project_service_identity.rb +3 -2
  155. data/lib/ory-client/models/project_service_o_auth2.rb +224 -0
  156. data/lib/ory-client/models/project_service_permission.rb +3 -2
  157. data/lib/ory-client/models/project_services.rb +13 -3
  158. data/lib/ory-client/models/provision_mock_subscription_payload.rb +3 -2
  159. data/lib/ory-client/models/quota_custom_domains.rb +3 -2
  160. data/lib/ory-client/models/quota_project_member_seats.rb +3 -2
  161. data/lib/ory-client/models/recovery_address.rb +3 -2
  162. data/lib/ory-client/models/refresh_token_hook_request.rb +272 -0
  163. data/lib/ory-client/models/refresh_token_hook_response.rb +219 -0
  164. data/lib/ory-client/models/reject_o_auth2_request.rb +260 -0
  165. data/lib/ory-client/models/relation_query.rb +3 -2
  166. data/lib/ory-client/models/revoked_sessions.rb +3 -2
  167. data/lib/ory-client/models/schema_patch.rb +3 -2
  168. data/lib/ory-client/models/self_service_browser_location_change_required_error.rb +3 -2
  169. data/lib/ory-client/models/self_service_error.rb +3 -2
  170. data/lib/ory-client/models/self_service_flow_expired_error.rb +3 -2
  171. data/lib/ory-client/models/self_service_login_flow.rb +3 -2
  172. data/lib/ory-client/models/self_service_logout_url.rb +3 -2
  173. data/lib/ory-client/models/self_service_recovery_flow.rb +3 -2
  174. data/lib/ory-client/models/self_service_recovery_flow_state.rb +2 -2
  175. data/lib/ory-client/models/self_service_recovery_link.rb +3 -2
  176. data/lib/ory-client/models/self_service_registration_flow.rb +3 -2
  177. data/lib/ory-client/models/self_service_settings_flow.rb +3 -2
  178. data/lib/ory-client/models/self_service_settings_flow_state.rb +2 -2
  179. data/lib/ory-client/models/self_service_verification_flow.rb +3 -2
  180. data/lib/ory-client/models/self_service_verification_flow_state.rb +2 -2
  181. data/lib/ory-client/models/session.rb +3 -2
  182. data/lib/ory-client/models/session_authentication_method.rb +3 -2
  183. data/lib/ory-client/models/session_device.rb +3 -2
  184. data/lib/ory-client/models/settings_profile_form_config.rb +3 -2
  185. data/lib/ory-client/models/stripe_customer_response.rb +3 -2
  186. data/lib/ory-client/models/subject_set.rb +3 -2
  187. data/lib/ory-client/models/submit_self_service_flow_with_web_authn_registration_method.rb +3 -2
  188. data/lib/ory-client/models/submit_self_service_login_flow_body.rb +4 -4
  189. data/lib/ory-client/models/submit_self_service_login_flow_with_lookup_secret_method_body.rb +3 -2
  190. data/lib/ory-client/models/submit_self_service_login_flow_with_oidc_method_body.rb +3 -2
  191. data/lib/ory-client/models/submit_self_service_login_flow_with_password_method_body.rb +3 -2
  192. data/lib/ory-client/models/submit_self_service_login_flow_with_totp_method_body.rb +3 -2
  193. data/lib/ory-client/models/submit_self_service_login_flow_with_web_authn_method_body.rb +9 -3
  194. data/lib/ory-client/models/submit_self_service_logout_flow_without_browser_body.rb +3 -2
  195. data/lib/ory-client/models/submit_self_service_recovery_flow_body.rb +4 -4
  196. data/lib/ory-client/models/submit_self_service_recovery_flow_with_link_method_body.rb +3 -2
  197. data/lib/ory-client/models/submit_self_service_registration_flow_body.rb +4 -4
  198. data/lib/ory-client/models/submit_self_service_registration_flow_with_oidc_method_body.rb +3 -2
  199. data/lib/ory-client/models/submit_self_service_registration_flow_with_password_method_body.rb +3 -2
  200. data/lib/ory-client/models/submit_self_service_registration_flow_with_web_authn_method_body.rb +3 -2
  201. data/lib/ory-client/models/submit_self_service_settings_flow_body.rb +4 -4
  202. data/lib/ory-client/models/submit_self_service_settings_flow_with_lookup_method_body.rb +3 -2
  203. data/lib/ory-client/models/submit_self_service_settings_flow_with_oidc_method_body.rb +3 -2
  204. data/lib/ory-client/models/submit_self_service_settings_flow_with_password_method_body.rb +3 -2
  205. data/lib/ory-client/models/submit_self_service_settings_flow_with_profile_method_body.rb +3 -2
  206. data/lib/ory-client/models/submit_self_service_settings_flow_with_totp_method_body.rb +3 -2
  207. data/lib/ory-client/models/submit_self_service_settings_flow_with_web_authn_method_body.rb +3 -2
  208. data/lib/ory-client/models/submit_self_service_verification_flow_body.rb +4 -4
  209. data/lib/ory-client/models/submit_self_service_verification_flow_with_link_method_body.rb +3 -2
  210. data/lib/ory-client/models/subscription.rb +7 -5
  211. data/lib/ory-client/models/successful_o_auth2_request_response.rb +225 -0
  212. data/lib/ory-client/models/successful_project_update.rb +3 -2
  213. data/lib/ory-client/models/successful_self_service_login_without_browser.rb +3 -2
  214. data/lib/ory-client/models/successful_self_service_registration_without_browser.rb +3 -2
  215. data/lib/ory-client/models/token_pagination.rb +264 -0
  216. data/lib/ory-client/models/token_pagination_headers.rb +230 -0
  217. data/lib/ory-client/models/trusted_o_auth2_jwt_grant_issuer.rb +290 -0
  218. data/lib/ory-client/models/trusted_o_auth2_jwt_grant_json_web_key.rb +230 -0
  219. data/lib/ory-client/models/ui_container.rb +3 -2
  220. data/lib/ory-client/models/ui_node.rb +3 -2
  221. data/lib/ory-client/models/ui_node_anchor_attributes.rb +3 -2
  222. data/lib/ory-client/models/ui_node_attributes.rb +4 -4
  223. data/lib/ory-client/models/ui_node_image_attributes.rb +3 -2
  224. data/lib/ory-client/models/ui_node_input_attributes.rb +49 -3
  225. data/lib/ory-client/models/ui_node_meta.rb +3 -2
  226. data/lib/ory-client/models/ui_node_script_attributes.rb +3 -2
  227. data/lib/ory-client/models/ui_node_text_attributes.rb +3 -2
  228. data/lib/ory-client/models/ui_text.rb +3 -2
  229. data/lib/ory-client/models/update_custom_hostname_body.rb +3 -2
  230. data/lib/ory-client/models/update_o_auth2_client_lifespans.rb +535 -0
  231. data/lib/ory-client/models/update_project.rb +3 -2
  232. data/lib/ory-client/models/update_subscription_payload.rb +3 -2
  233. data/lib/ory-client/models/verifiable_identity_address.rb +3 -7
  234. data/lib/ory-client/models/version.rb +3 -2
  235. data/lib/ory-client/models/warning.rb +3 -2
  236. data/lib/ory-client/version.rb +3 -3
  237. data/lib/ory-client.rb +46 -8
  238. data/ory-client.gemspec +2 -2
  239. data/spec/api/admin_api_spec.rb +47 -0
  240. data/spec/api/metadata_api_spec.rb +5 -5
  241. data/spec/api/read_api_spec.rb +2 -2
  242. data/spec/api/v0alpha2_api_spec.rb +555 -13
  243. data/spec/api/write_api_spec.rb +2 -2
  244. data/spec/api_client_spec.rb +2 -2
  245. data/spec/configuration_spec.rb +2 -2
  246. data/spec/models/accept_o_auth2_consent_request_session_spec.rb +40 -0
  247. data/spec/models/accept_o_auth2_consent_request_spec.rb +64 -0
  248. data/spec/models/accept_o_auth2_login_request_spec.rb +70 -0
  249. data/spec/models/active_project_spec.rb +2 -2
  250. data/spec/models/admin_create_identity_body_spec.rb +2 -2
  251. data/spec/models/admin_create_identity_import_credentials_oidc_config_spec.rb +2 -2
  252. data/spec/models/admin_create_identity_import_credentials_oidc_provider_spec.rb +2 -2
  253. data/spec/models/admin_create_identity_import_credentials_oidc_spec.rb +2 -2
  254. data/spec/models/admin_create_identity_import_credentials_password_config_spec.rb +2 -2
  255. data/spec/models/admin_create_identity_import_credentials_password_spec.rb +2 -2
  256. data/spec/models/admin_create_json_web_key_set_body_spec.rb +46 -0
  257. data/spec/models/admin_create_self_service_recovery_link_body_spec.rb +2 -2
  258. data/spec/models/admin_identity_import_credentials_spec.rb +2 -2
  259. data/spec/models/admin_trust_o_auth2_jwt_grant_issuer_body_spec.rb +64 -0
  260. data/spec/models/admin_update_identity_body_spec.rb +8 -2
  261. data/spec/models/api_token_spec.rb +2 -2
  262. data/spec/models/authenticator_assurance_level_spec.rb +2 -2
  263. data/spec/models/cloud_account_spec.rb +2 -2
  264. data/spec/models/cname_settings_spec.rb +2 -2
  265. data/spec/models/create_custom_hostname_body_spec.rb +2 -2
  266. data/spec/models/create_project_body_spec.rb +2 -2
  267. data/spec/models/create_subscription_payload_spec.rb +2 -2
  268. data/spec/models/error_authenticator_assurance_level_not_satisfied_spec.rb +2 -2
  269. data/spec/models/expand_tree_spec.rb +2 -2
  270. data/spec/models/generic_error_content_spec.rb +2 -2
  271. data/spec/models/generic_error_spec.rb +2 -2
  272. data/spec/models/get_check_response_spec.rb +2 -2
  273. data/spec/models/{identity_schema_location_spec.rb → get_managed_identity_schema_location_spec.rb} +8 -8
  274. data/spec/models/get_relation_tuples_response_spec.rb +2 -2
  275. data/spec/models/{inline_response2001_spec.rb → get_version200_response_spec.rb} +8 -8
  276. data/spec/models/handled_o_auth2_consent_request_spec.rb +34 -0
  277. data/spec/models/handled_o_auth2_login_request_spec.rb +34 -0
  278. data/spec/models/handled_o_auth2_logout_request_spec.rb +34 -0
  279. data/spec/models/headers_spec.rb +34 -0
  280. data/spec/models/health_not_ready_status_spec.rb +2 -2
  281. data/spec/models/health_status_spec.rb +2 -2
  282. data/spec/models/id_token_claims_spec.rb +112 -0
  283. data/spec/models/identity_credentials_oidc_provider_spec.rb +2 -2
  284. data/spec/models/identity_credentials_oidc_spec.rb +2 -2
  285. data/spec/models/identity_credentials_password_spec.rb +2 -2
  286. data/spec/models/identity_credentials_spec.rb +2 -2
  287. data/spec/models/identity_credentials_type_spec.rb +2 -2
  288. data/spec/models/{identity_schema_validation_result_spec.rb → identity_schema_container_spec.rb} +10 -10
  289. data/spec/models/identity_schema_preset_spec.rb +2 -2
  290. data/spec/models/identity_spec.rb +2 -2
  291. data/spec/models/identity_state_spec.rb +2 -2
  292. data/spec/models/internal_relation_tuple_spec.rb +2 -2
  293. data/spec/models/introspected_o_auth2_token_spec.rb +112 -0
  294. data/spec/models/invite_payload_spec.rb +2 -2
  295. data/spec/models/is_owner_for_project_by_slug_payload_spec.rb +2 -2
  296. data/spec/models/is_owner_for_project_by_slug_spec.rb +2 -2
  297. data/spec/models/{inline_response200_spec.rb → is_ready200_response_spec.rb} +8 -8
  298. data/spec/models/{inline_response503_spec.rb → is_ready503_response_spec.rb} +8 -8
  299. data/spec/models/json_error_spec.rb +2 -2
  300. data/spec/models/json_patch_spec.rb +8 -2
  301. data/spec/models/json_web_key_set_spec.rb +34 -0
  302. data/spec/models/json_web_key_spec.rb +130 -0
  303. data/spec/models/keto_namespace_spec.rb +2 -2
  304. data/spec/models/{identity_schema_spec.rb → managed_identity_schema_spec.rb} +8 -14
  305. data/spec/models/managed_identity_schema_validation_result_spec.rb +40 -0
  306. data/spec/models/needs_privileged_session_error_spec.rb +2 -2
  307. data/spec/models/normalized_project_revision_hook_spec.rb +2 -2
  308. data/spec/models/normalized_project_revision_identity_schema_spec.rb +2 -2
  309. data/spec/models/normalized_project_revision_spec.rb +248 -2
  310. data/spec/models/normalized_project_revision_third_party_provider_spec.rb +2 -2
  311. data/spec/models/normalized_project_spec.rb +2 -2
  312. data/spec/models/null_plan_spec.rb +2 -2
  313. data/spec/models/o_auth2_access_request_spec.rb +52 -0
  314. data/spec/models/o_auth2_api_error_spec.rb +52 -0
  315. data/spec/models/o_auth2_client_spec.rb +310 -0
  316. data/spec/models/o_auth2_consent_request_open_id_connect_context_spec.rb +58 -0
  317. data/spec/models/o_auth2_consent_request_spec.rb +106 -0
  318. data/spec/models/o_auth2_consent_session_spec.rb +88 -0
  319. data/spec/models/o_auth2_login_request_spec.rb +82 -0
  320. data/spec/models/o_auth2_logout_request_spec.rb +64 -0
  321. data/spec/models/o_auth2_token_response_spec.rb +64 -0
  322. data/spec/models/oidc_configuration_spec.rb +202 -0
  323. data/spec/models/oidc_user_info_spec.rb +142 -0
  324. data/spec/models/pagination_headers_spec.rb +40 -0
  325. data/spec/models/pagination_spec.rb +14 -2
  326. data/spec/models/patch_delta_spec.rb +2 -2
  327. data/spec/models/previous_o_auth2_consent_session_spec.rb +70 -0
  328. data/spec/models/project_host_spec.rb +2 -2
  329. data/spec/models/project_invite_spec.rb +2 -2
  330. data/spec/models/project_metadata_spec.rb +2 -2
  331. data/spec/models/project_service_identity_spec.rb +2 -2
  332. data/spec/models/project_service_o_auth2_spec.rb +34 -0
  333. data/spec/models/project_service_permission_spec.rb +2 -2
  334. data/spec/models/project_services_spec.rb +8 -2
  335. data/spec/models/project_spec.rb +2 -2
  336. data/spec/models/provision_mock_subscription_payload_spec.rb +2 -2
  337. data/spec/models/quota_custom_domains_spec.rb +2 -2
  338. data/spec/models/quota_project_member_seats_spec.rb +2 -2
  339. data/spec/models/recovery_address_spec.rb +2 -2
  340. data/spec/models/refresh_token_hook_request_spec.rb +64 -0
  341. data/spec/models/refresh_token_hook_response_spec.rb +34 -0
  342. data/spec/models/reject_o_auth2_request_spec.rb +58 -0
  343. data/spec/models/relation_query_spec.rb +2 -2
  344. data/spec/models/revoked_sessions_spec.rb +2 -2
  345. data/spec/models/schema_patch_spec.rb +2 -2
  346. data/spec/models/self_service_browser_location_change_required_error_spec.rb +2 -2
  347. data/spec/models/self_service_error_spec.rb +2 -2
  348. data/spec/models/self_service_flow_expired_error_spec.rb +2 -2
  349. data/spec/models/self_service_login_flow_spec.rb +2 -2
  350. data/spec/models/self_service_logout_url_spec.rb +2 -2
  351. data/spec/models/self_service_recovery_flow_spec.rb +2 -2
  352. data/spec/models/self_service_recovery_flow_state_spec.rb +2 -2
  353. data/spec/models/self_service_recovery_link_spec.rb +2 -2
  354. data/spec/models/self_service_registration_flow_spec.rb +2 -2
  355. data/spec/models/self_service_settings_flow_spec.rb +2 -2
  356. data/spec/models/self_service_settings_flow_state_spec.rb +2 -2
  357. data/spec/models/self_service_verification_flow_spec.rb +2 -2
  358. data/spec/models/self_service_verification_flow_state_spec.rb +2 -2
  359. data/spec/models/session_authentication_method_spec.rb +2 -2
  360. data/spec/models/session_device_spec.rb +2 -2
  361. data/spec/models/session_spec.rb +2 -2
  362. data/spec/models/settings_profile_form_config_spec.rb +2 -2
  363. data/spec/models/stripe_customer_response_spec.rb +2 -2
  364. data/spec/models/subject_set_spec.rb +2 -2
  365. data/spec/models/submit_self_service_flow_with_web_authn_registration_method_spec.rb +2 -2
  366. data/spec/models/submit_self_service_login_flow_body_spec.rb +2 -2
  367. data/spec/models/submit_self_service_login_flow_with_lookup_secret_method_body_spec.rb +2 -2
  368. data/spec/models/submit_self_service_login_flow_with_oidc_method_body_spec.rb +2 -2
  369. data/spec/models/submit_self_service_login_flow_with_password_method_body_spec.rb +2 -2
  370. data/spec/models/submit_self_service_login_flow_with_totp_method_body_spec.rb +2 -2
  371. data/spec/models/submit_self_service_login_flow_with_web_authn_method_body_spec.rb +2 -2
  372. data/spec/models/submit_self_service_logout_flow_without_browser_body_spec.rb +2 -2
  373. data/spec/models/submit_self_service_recovery_flow_body_spec.rb +2 -2
  374. data/spec/models/submit_self_service_recovery_flow_with_link_method_body_spec.rb +2 -2
  375. data/spec/models/submit_self_service_registration_flow_body_spec.rb +2 -2
  376. data/spec/models/submit_self_service_registration_flow_with_oidc_method_body_spec.rb +2 -2
  377. data/spec/models/submit_self_service_registration_flow_with_password_method_body_spec.rb +2 -2
  378. data/spec/models/submit_self_service_registration_flow_with_web_authn_method_body_spec.rb +2 -2
  379. data/spec/models/submit_self_service_settings_flow_body_spec.rb +2 -2
  380. data/spec/models/submit_self_service_settings_flow_with_lookup_method_body_spec.rb +2 -2
  381. data/spec/models/submit_self_service_settings_flow_with_oidc_method_body_spec.rb +2 -2
  382. data/spec/models/submit_self_service_settings_flow_with_password_method_body_spec.rb +2 -2
  383. data/spec/models/submit_self_service_settings_flow_with_profile_method_body_spec.rb +2 -2
  384. data/spec/models/submit_self_service_settings_flow_with_totp_method_body_spec.rb +2 -2
  385. data/spec/models/submit_self_service_settings_flow_with_web_authn_method_body_spec.rb +2 -2
  386. data/spec/models/submit_self_service_verification_flow_body_spec.rb +2 -2
  387. data/spec/models/submit_self_service_verification_flow_with_link_method_body_spec.rb +2 -2
  388. data/spec/models/subscription_spec.rb +3 -3
  389. data/spec/models/successful_o_auth2_request_response_spec.rb +34 -0
  390. data/spec/models/successful_project_update_spec.rb +2 -2
  391. data/spec/models/successful_self_service_login_without_browser_spec.rb +2 -2
  392. data/spec/models/successful_self_service_registration_without_browser_spec.rb +2 -2
  393. data/spec/models/token_pagination_headers_spec.rb +40 -0
  394. data/spec/models/token_pagination_spec.rb +40 -0
  395. data/spec/models/trusted_o_auth2_jwt_grant_issuer_spec.rb +76 -0
  396. data/spec/models/trusted_o_auth2_jwt_grant_json_web_key_spec.rb +40 -0
  397. data/spec/models/ui_container_spec.rb +2 -2
  398. data/spec/models/ui_node_anchor_attributes_spec.rb +2 -2
  399. data/spec/models/ui_node_attributes_spec.rb +2 -2
  400. data/spec/models/ui_node_image_attributes_spec.rb +2 -2
  401. data/spec/models/ui_node_input_attributes_spec.rb +12 -2
  402. data/spec/models/ui_node_meta_spec.rb +2 -2
  403. data/spec/models/ui_node_script_attributes_spec.rb +2 -2
  404. data/spec/models/ui_node_spec.rb +2 -2
  405. data/spec/models/ui_node_text_attributes_spec.rb +2 -2
  406. data/spec/models/ui_text_spec.rb +2 -2
  407. data/spec/models/update_custom_hostname_body_spec.rb +2 -2
  408. data/spec/models/update_o_auth2_client_lifespans_spec.rb +100 -0
  409. data/spec/models/update_project_spec.rb +2 -2
  410. data/spec/models/update_subscription_payload_spec.rb +2 -2
  411. data/spec/models/verifiable_identity_address_spec.rb +2 -2
  412. data/spec/models/version_spec.rb +2 -2
  413. data/spec/models/warning_spec.rb +2 -2
  414. data/spec/spec_helper.rb +2 -2
  415. data/vendor/bundle/ruby/2.5.0/cache/parser-3.1.2.1.gem +0 -0
  416. data/vendor/bundle/ruby/2.5.0/extensions/x86_64-linux/2.5.0/byebug-11.1.3/gem_make.out +2 -2
  417. data/vendor/bundle/ruby/2.5.0/extensions/x86_64-linux/2.5.0/ffi-1.15.5/gem_make.out +2 -2
  418. data/vendor/bundle/ruby/2.5.0/extensions/x86_64-linux/2.5.0/jaro_winkler-1.5.4/gem_make.out +2 -2
  419. data/vendor/bundle/ruby/2.5.0/extensions/x86_64-linux/2.5.0/psych-4.0.4/gem_make.out +2 -2
  420. data/vendor/bundle/ruby/2.5.0/extensions/x86_64-linux/2.5.0/stringio-3.0.2/gem_make.out +2 -2
  421. data/vendor/bundle/ruby/2.5.0/extensions/x86_64-linux/2.5.0/stringio-3.0.2/mkmf.log +1 -1
  422. data/vendor/bundle/ruby/2.5.0/gems/byebug-11.1.3/ext/byebug/Makefile +2 -2
  423. data/vendor/bundle/ruby/2.5.0/gems/ffi-1.15.5/ext/ffi_c/Makefile +2 -2
  424. data/vendor/bundle/ruby/2.5.0/gems/jaro_winkler-1.5.4/ext/jaro_winkler/Makefile +2 -2
  425. data/vendor/bundle/ruby/2.5.0/gems/{parser-3.1.2.0 → parser-3.1.2.1}/LICENSE.txt +0 -0
  426. data/vendor/bundle/ruby/2.5.0/gems/{parser-3.1.2.0 → parser-3.1.2.1}/bin/ruby-parse +0 -0
  427. data/vendor/bundle/ruby/2.5.0/gems/{parser-3.1.2.0 → parser-3.1.2.1}/bin/ruby-rewrite +0 -0
  428. data/vendor/bundle/ruby/2.5.0/gems/{parser-3.1.2.0 → parser-3.1.2.1}/lib/gauntlet_parser.rb +0 -0
  429. data/vendor/bundle/ruby/2.5.0/gems/{parser-3.1.2.0 → parser-3.1.2.1}/lib/parser/all.rb +0 -0
  430. data/vendor/bundle/ruby/2.5.0/gems/{parser-3.1.2.0 → parser-3.1.2.1}/lib/parser/ast/node.rb +0 -0
  431. data/vendor/bundle/ruby/2.5.0/gems/{parser-3.1.2.0 → parser-3.1.2.1}/lib/parser/ast/processor.rb +0 -0
  432. data/vendor/bundle/ruby/2.5.0/gems/{parser-3.1.2.0 → parser-3.1.2.1}/lib/parser/base.rb +0 -0
  433. data/vendor/bundle/ruby/2.5.0/gems/{parser-3.1.2.0 → parser-3.1.2.1}/lib/parser/builders/default.rb +0 -0
  434. data/vendor/bundle/ruby/2.5.0/gems/{parser-3.1.2.0 → parser-3.1.2.1}/lib/parser/clobbering_error.rb +0 -0
  435. data/vendor/bundle/ruby/2.5.0/gems/{parser-3.1.2.0 → parser-3.1.2.1}/lib/parser/color.rb +0 -0
  436. data/vendor/bundle/ruby/2.5.0/gems/{parser-3.1.2.0 → parser-3.1.2.1}/lib/parser/context.rb +0 -0
  437. data/vendor/bundle/ruby/2.5.0/gems/{parser-3.1.2.0 → parser-3.1.2.1}/lib/parser/current.rb +0 -0
  438. data/vendor/bundle/ruby/2.5.0/gems/{parser-3.1.2.0 → parser-3.1.2.1}/lib/parser/current_arg_stack.rb +0 -0
  439. data/vendor/bundle/ruby/2.5.0/gems/{parser-3.1.2.0 → parser-3.1.2.1}/lib/parser/deprecation.rb +0 -0
  440. data/vendor/bundle/ruby/2.5.0/gems/{parser-3.1.2.0 → parser-3.1.2.1}/lib/parser/diagnostic/engine.rb +0 -0
  441. data/vendor/bundle/ruby/2.5.0/gems/{parser-3.1.2.0 → parser-3.1.2.1}/lib/parser/diagnostic.rb +0 -0
  442. data/vendor/bundle/ruby/2.5.0/gems/{parser-3.1.2.0 → parser-3.1.2.1}/lib/parser/lexer/dedenter.rb +0 -0
  443. data/vendor/bundle/ruby/2.5.0/gems/{parser-3.1.2.0 → parser-3.1.2.1}/lib/parser/lexer/explanation.rb +0 -0
  444. data/vendor/bundle/ruby/2.5.0/gems/{parser-3.1.2.0 → parser-3.1.2.1}/lib/parser/lexer/literal.rb +0 -0
  445. data/vendor/bundle/ruby/2.5.0/gems/{parser-3.1.2.0 → parser-3.1.2.1}/lib/parser/lexer/stack_state.rb +0 -0
  446. data/vendor/bundle/ruby/2.5.0/gems/{parser-3.1.2.0 → parser-3.1.2.1}/lib/parser/lexer.rb +0 -0
  447. data/vendor/bundle/ruby/2.5.0/gems/{parser-3.1.2.0 → parser-3.1.2.1}/lib/parser/macruby.rb +0 -0
  448. data/vendor/bundle/ruby/2.5.0/gems/{parser-3.1.2.0 → parser-3.1.2.1}/lib/parser/max_numparam_stack.rb +0 -0
  449. data/vendor/bundle/ruby/2.5.0/gems/{parser-3.1.2.0 → parser-3.1.2.1}/lib/parser/messages.rb +0 -0
  450. data/vendor/bundle/ruby/2.5.0/gems/{parser-3.1.2.0 → parser-3.1.2.1}/lib/parser/meta.rb +0 -0
  451. data/vendor/bundle/ruby/2.5.0/gems/{parser-3.1.2.0 → parser-3.1.2.1}/lib/parser/rewriter.rb +0 -0
  452. data/vendor/bundle/ruby/2.5.0/gems/{parser-3.1.2.0 → parser-3.1.2.1}/lib/parser/ruby18.rb +0 -0
  453. data/vendor/bundle/ruby/2.5.0/gems/{parser-3.1.2.0 → parser-3.1.2.1}/lib/parser/ruby19.rb +0 -0
  454. data/vendor/bundle/ruby/2.5.0/gems/{parser-3.1.2.0 → parser-3.1.2.1}/lib/parser/ruby20.rb +0 -0
  455. data/vendor/bundle/ruby/2.5.0/gems/{parser-3.1.2.0 → parser-3.1.2.1}/lib/parser/ruby21.rb +0 -0
  456. data/vendor/bundle/ruby/2.5.0/gems/{parser-3.1.2.0 → parser-3.1.2.1}/lib/parser/ruby22.rb +0 -0
  457. data/vendor/bundle/ruby/2.5.0/gems/{parser-3.1.2.0 → parser-3.1.2.1}/lib/parser/ruby23.rb +0 -0
  458. data/vendor/bundle/ruby/2.5.0/gems/{parser-3.1.2.0 → parser-3.1.2.1}/lib/parser/ruby24.rb +0 -0
  459. data/vendor/bundle/ruby/2.5.0/gems/{parser-3.1.2.0 → parser-3.1.2.1}/lib/parser/ruby25.rb +0 -0
  460. data/vendor/bundle/ruby/2.5.0/gems/{parser-3.1.2.0 → parser-3.1.2.1}/lib/parser/ruby26.rb +0 -0
  461. data/vendor/bundle/ruby/2.5.0/gems/{parser-3.1.2.0 → parser-3.1.2.1}/lib/parser/ruby27.rb +0 -0
  462. data/vendor/bundle/ruby/2.5.0/gems/{parser-3.1.2.0 → parser-3.1.2.1}/lib/parser/ruby28.rb +0 -0
  463. data/vendor/bundle/ruby/2.5.0/gems/{parser-3.1.2.0 → parser-3.1.2.1}/lib/parser/ruby30.rb +0 -0
  464. data/vendor/bundle/ruby/2.5.0/gems/{parser-3.1.2.0 → parser-3.1.2.1}/lib/parser/ruby31.rb +4 -0
  465. data/vendor/bundle/ruby/2.5.0/gems/{parser-3.1.2.0 → parser-3.1.2.1}/lib/parser/ruby32.rb +4 -0
  466. data/vendor/bundle/ruby/2.5.0/gems/{parser-3.1.2.0 → parser-3.1.2.1}/lib/parser/rubymotion.rb +0 -0
  467. data/vendor/bundle/ruby/2.5.0/gems/{parser-3.1.2.0 → parser-3.1.2.1}/lib/parser/runner/ruby_parse.rb +0 -0
  468. data/vendor/bundle/ruby/2.5.0/gems/{parser-3.1.2.0 → parser-3.1.2.1}/lib/parser/runner/ruby_rewrite.rb +0 -0
  469. data/vendor/bundle/ruby/2.5.0/gems/{parser-3.1.2.0 → parser-3.1.2.1}/lib/parser/runner.rb +0 -0
  470. data/vendor/bundle/ruby/2.5.0/gems/{parser-3.1.2.0 → parser-3.1.2.1}/lib/parser/source/buffer.rb +0 -0
  471. data/vendor/bundle/ruby/2.5.0/gems/{parser-3.1.2.0 → parser-3.1.2.1}/lib/parser/source/comment/associator.rb +0 -0
  472. data/vendor/bundle/ruby/2.5.0/gems/{parser-3.1.2.0 → parser-3.1.2.1}/lib/parser/source/comment.rb +0 -0
  473. data/vendor/bundle/ruby/2.5.0/gems/{parser-3.1.2.0 → parser-3.1.2.1}/lib/parser/source/map/collection.rb +0 -0
  474. data/vendor/bundle/ruby/2.5.0/gems/{parser-3.1.2.0 → parser-3.1.2.1}/lib/parser/source/map/condition.rb +0 -0
  475. data/vendor/bundle/ruby/2.5.0/gems/{parser-3.1.2.0 → parser-3.1.2.1}/lib/parser/source/map/constant.rb +0 -0
  476. data/vendor/bundle/ruby/2.5.0/gems/{parser-3.1.2.0 → parser-3.1.2.1}/lib/parser/source/map/definition.rb +0 -0
  477. data/vendor/bundle/ruby/2.5.0/gems/{parser-3.1.2.0 → parser-3.1.2.1}/lib/parser/source/map/for.rb +0 -0
  478. data/vendor/bundle/ruby/2.5.0/gems/{parser-3.1.2.0 → parser-3.1.2.1}/lib/parser/source/map/heredoc.rb +0 -0
  479. data/vendor/bundle/ruby/2.5.0/gems/{parser-3.1.2.0 → parser-3.1.2.1}/lib/parser/source/map/index.rb +0 -0
  480. data/vendor/bundle/ruby/2.5.0/gems/{parser-3.1.2.0 → parser-3.1.2.1}/lib/parser/source/map/keyword.rb +0 -0
  481. data/vendor/bundle/ruby/2.5.0/gems/{parser-3.1.2.0 → parser-3.1.2.1}/lib/parser/source/map/method_definition.rb +0 -0
  482. data/vendor/bundle/ruby/2.5.0/gems/{parser-3.1.2.0 → parser-3.1.2.1}/lib/parser/source/map/objc_kwarg.rb +0 -0
  483. data/vendor/bundle/ruby/2.5.0/gems/{parser-3.1.2.0 → parser-3.1.2.1}/lib/parser/source/map/operator.rb +0 -0
  484. data/vendor/bundle/ruby/2.5.0/gems/{parser-3.1.2.0 → parser-3.1.2.1}/lib/parser/source/map/rescue_body.rb +0 -0
  485. data/vendor/bundle/ruby/2.5.0/gems/{parser-3.1.2.0 → parser-3.1.2.1}/lib/parser/source/map/send.rb +0 -0
  486. data/vendor/bundle/ruby/2.5.0/gems/{parser-3.1.2.0 → parser-3.1.2.1}/lib/parser/source/map/ternary.rb +0 -0
  487. data/vendor/bundle/ruby/2.5.0/gems/{parser-3.1.2.0 → parser-3.1.2.1}/lib/parser/source/map/variable.rb +0 -0
  488. data/vendor/bundle/ruby/2.5.0/gems/{parser-3.1.2.0 → parser-3.1.2.1}/lib/parser/source/map.rb +0 -0
  489. data/vendor/bundle/ruby/2.5.0/gems/{parser-3.1.2.0 → parser-3.1.2.1}/lib/parser/source/range.rb +0 -0
  490. data/vendor/bundle/ruby/2.5.0/gems/{parser-3.1.2.0 → parser-3.1.2.1}/lib/parser/source/rewriter/action.rb +0 -0
  491. data/vendor/bundle/ruby/2.5.0/gems/{parser-3.1.2.0 → parser-3.1.2.1}/lib/parser/source/rewriter.rb +0 -0
  492. data/vendor/bundle/ruby/2.5.0/gems/{parser-3.1.2.0 → parser-3.1.2.1}/lib/parser/source/tree_rewriter/action.rb +0 -0
  493. data/vendor/bundle/ruby/2.5.0/gems/{parser-3.1.2.0 → parser-3.1.2.1}/lib/parser/source/tree_rewriter.rb +0 -0
  494. data/vendor/bundle/ruby/2.5.0/gems/{parser-3.1.2.0 → parser-3.1.2.1}/lib/parser/static_environment.rb +0 -0
  495. data/vendor/bundle/ruby/2.5.0/gems/{parser-3.1.2.0 → parser-3.1.2.1}/lib/parser/syntax_error.rb +0 -0
  496. data/vendor/bundle/ruby/2.5.0/gems/{parser-3.1.2.0 → parser-3.1.2.1}/lib/parser/tree_rewriter.rb +0 -0
  497. data/vendor/bundle/ruby/2.5.0/gems/{parser-3.1.2.0 → parser-3.1.2.1}/lib/parser/variables_stack.rb +0 -0
  498. data/vendor/bundle/ruby/2.5.0/gems/{parser-3.1.2.0 → parser-3.1.2.1}/lib/parser/version.rb +1 -1
  499. data/vendor/bundle/ruby/2.5.0/gems/{parser-3.1.2.0 → parser-3.1.2.1}/lib/parser.rb +0 -0
  500. data/vendor/bundle/ruby/2.5.0/gems/{parser-3.1.2.0 → parser-3.1.2.1}/parser.gemspec +0 -0
  501. data/vendor/bundle/ruby/2.5.0/gems/psych-4.0.4/ext/psych/Makefile +2 -2
  502. data/vendor/bundle/ruby/2.5.0/gems/stringio-3.0.2/ext/stringio/Makefile +2 -2
  503. data/vendor/bundle/ruby/2.5.0/specifications/{parser-3.1.2.0.gemspec → parser-3.1.2.1.gemspec} +4 -4
  504. metadata +257 -105
  505. data/vendor/bundle/ruby/2.5.0/cache/parser-3.1.2.0.gem +0 -0
@@ -3,10 +3,10 @@
3
3
 
4
4
  #Documentation for all public and administrative Ory APIs. Administrative APIs can only be accessed with a valid Personal Access Token. Public APIs are mostly used in browsers.
5
5
 
6
- The version of the OpenAPI document: v0.1.0-alpha.12
6
+ The version of the OpenAPI document: v0.2.0-alpha.14
7
7
  Contact: support@ory.sh
8
8
  Generated by: https://openapi-generator.tech
9
- OpenAPI Generator version: 5.4.0
9
+ OpenAPI Generator version: 6.0.1
10
10
 
11
11
  =end
12
12
 
@@ -19,6 +19,212 @@ module OryClient
19
19
  def initialize(api_client = ApiClient.default)
20
20
  @api_client = api_client
21
21
  end
22
+ # Accept an OAuth 2.0 Consent Request
23
+ # When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider to authenticate the subject and then tell ORY Hydra now about it. If the subject authenticated, he/she must now be asked if the OAuth 2.0 Client which initiated the flow should be allowed to access the resources on the subject's behalf. The consent provider which handles this request and is a web app implemented and hosted by you. It shows a subject interface which asks the subject to grant or deny the client access to the requested scope (\"Application my-dropbox-app wants write access to all your private files\"). The consent challenge is appended to the consent provider's URL to which the subject's user-agent (browser) is redirected to. The consent provider uses that challenge to fetch information on the OAuth2 request and then tells ORY Hydra if the subject accepted or rejected the request. This endpoint tells ORY Hydra that the subject has authorized the OAuth 2.0 client to access resources on his/her behalf. The consent provider includes additional information, such as session data for access and ID tokens, and if the consent request should be used as basis for future requests. The response contains a redirect URL which the consent provider should redirect the user-agent to.
24
+ # @param consent_challenge [String]
25
+ # @param [Hash] opts the optional parameters
26
+ # @option opts [AcceptOAuth2ConsentRequest] :accept_o_auth2_consent_request
27
+ # @return [SuccessfulOAuth2RequestResponse]
28
+ def admin_accept_o_auth2_consent_request(consent_challenge, opts = {})
29
+ data, _status_code, _headers = admin_accept_o_auth2_consent_request_with_http_info(consent_challenge, opts)
30
+ data
31
+ end
32
+
33
+ # Accept an OAuth 2.0 Consent Request
34
+ # When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider to authenticate the subject and then tell ORY Hydra now about it. If the subject authenticated, he/she must now be asked if the OAuth 2.0 Client which initiated the flow should be allowed to access the resources on the subject's behalf. The consent provider which handles this request and is a web app implemented and hosted by you. It shows a subject interface which asks the subject to grant or deny the client access to the requested scope (\"Application my-dropbox-app wants write access to all your private files\"). The consent challenge is appended to the consent provider's URL to which the subject's user-agent (browser) is redirected to. The consent provider uses that challenge to fetch information on the OAuth2 request and then tells ORY Hydra if the subject accepted or rejected the request. This endpoint tells ORY Hydra that the subject has authorized the OAuth 2.0 client to access resources on his/her behalf. The consent provider includes additional information, such as session data for access and ID tokens, and if the consent request should be used as basis for future requests. The response contains a redirect URL which the consent provider should redirect the user-agent to.
35
+ # @param consent_challenge [String]
36
+ # @param [Hash] opts the optional parameters
37
+ # @option opts [AcceptOAuth2ConsentRequest] :accept_o_auth2_consent_request
38
+ # @return [Array<(SuccessfulOAuth2RequestResponse, Integer, Hash)>] SuccessfulOAuth2RequestResponse data, response status code and response headers
39
+ def admin_accept_o_auth2_consent_request_with_http_info(consent_challenge, opts = {})
40
+ if @api_client.config.debugging
41
+ @api_client.config.logger.debug 'Calling API: V0alpha2Api.admin_accept_o_auth2_consent_request ...'
42
+ end
43
+ # verify the required parameter 'consent_challenge' is set
44
+ if @api_client.config.client_side_validation && consent_challenge.nil?
45
+ fail ArgumentError, "Missing the required parameter 'consent_challenge' when calling V0alpha2Api.admin_accept_o_auth2_consent_request"
46
+ end
47
+ # resource path
48
+ local_var_path = '/admin/oauth2/auth/requests/consent/accept'
49
+
50
+ # query parameters
51
+ query_params = opts[:query_params] || {}
52
+ query_params[:'consent_challenge'] = consent_challenge
53
+
54
+ # header parameters
55
+ header_params = opts[:header_params] || {}
56
+ # HTTP header 'Accept' (if needed)
57
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
58
+ # HTTP header 'Content-Type'
59
+ content_type = @api_client.select_header_content_type(['application/json'])
60
+ if !content_type.nil?
61
+ header_params['Content-Type'] = content_type
62
+ end
63
+
64
+ # form parameters
65
+ form_params = opts[:form_params] || {}
66
+
67
+ # http body (model)
68
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'accept_o_auth2_consent_request'])
69
+
70
+ # return_type
71
+ return_type = opts[:debug_return_type] || 'SuccessfulOAuth2RequestResponse'
72
+
73
+ # auth_names
74
+ auth_names = opts[:debug_auth_names] || ['oryAccessToken']
75
+
76
+ new_options = opts.merge(
77
+ :operation => :"V0alpha2Api.admin_accept_o_auth2_consent_request",
78
+ :header_params => header_params,
79
+ :query_params => query_params,
80
+ :form_params => form_params,
81
+ :body => post_body,
82
+ :auth_names => auth_names,
83
+ :return_type => return_type
84
+ )
85
+
86
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
87
+ if @api_client.config.debugging
88
+ @api_client.config.logger.debug "API called: V0alpha2Api#admin_accept_o_auth2_consent_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
89
+ end
90
+ return data, status_code, headers
91
+ end
92
+
93
+ # Accept an OAuth 2.0 Login Request
94
+ # When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory Hydra asks the login provider (sometimes called \"identity provider\") to authenticate the subject and then tell Ory Hydra now about it. The login provider is an web-app you write and host, and it must be able to authenticate (\"show the subject a login screen\") a subject (in OAuth2 the proper name for subject is \"resource owner\"). The authentication challenge is appended to the login provider URL to which the subject's user-agent (browser) is redirected to. The login provider uses that challenge to fetch information on the OAuth2 request and then accept or reject the requested authentication process. This endpoint tells ORY Hydra that the subject has successfully authenticated and includes additional information such as the subject's ID and if ORY Hydra should remember the subject's subject agent for future authentication attempts by setting a cookie. The response contains a redirect URL which the login provider should redirect the user-agent to.
95
+ # @param login_challenge [String]
96
+ # @param [Hash] opts the optional parameters
97
+ # @option opts [AcceptOAuth2LoginRequest] :accept_o_auth2_login_request
98
+ # @return [SuccessfulOAuth2RequestResponse]
99
+ def admin_accept_o_auth2_login_request(login_challenge, opts = {})
100
+ data, _status_code, _headers = admin_accept_o_auth2_login_request_with_http_info(login_challenge, opts)
101
+ data
102
+ end
103
+
104
+ # Accept an OAuth 2.0 Login Request
105
+ # When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, Ory Hydra asks the login provider (sometimes called \&quot;identity provider\&quot;) to authenticate the subject and then tell Ory Hydra now about it. The login provider is an web-app you write and host, and it must be able to authenticate (\&quot;show the subject a login screen\&quot;) a subject (in OAuth2 the proper name for subject is \&quot;resource owner\&quot;). The authentication challenge is appended to the login provider URL to which the subject&#39;s user-agent (browser) is redirected to. The login provider uses that challenge to fetch information on the OAuth2 request and then accept or reject the requested authentication process. This endpoint tells ORY Hydra that the subject has successfully authenticated and includes additional information such as the subject&#39;s ID and if ORY Hydra should remember the subject&#39;s subject agent for future authentication attempts by setting a cookie. The response contains a redirect URL which the login provider should redirect the user-agent to.
106
+ # @param login_challenge [String]
107
+ # @param [Hash] opts the optional parameters
108
+ # @option opts [AcceptOAuth2LoginRequest] :accept_o_auth2_login_request
109
+ # @return [Array<(SuccessfulOAuth2RequestResponse, Integer, Hash)>] SuccessfulOAuth2RequestResponse data, response status code and response headers
110
+ def admin_accept_o_auth2_login_request_with_http_info(login_challenge, opts = {})
111
+ if @api_client.config.debugging
112
+ @api_client.config.logger.debug 'Calling API: V0alpha2Api.admin_accept_o_auth2_login_request ...'
113
+ end
114
+ # verify the required parameter 'login_challenge' is set
115
+ if @api_client.config.client_side_validation && login_challenge.nil?
116
+ fail ArgumentError, "Missing the required parameter 'login_challenge' when calling V0alpha2Api.admin_accept_o_auth2_login_request"
117
+ end
118
+ # resource path
119
+ local_var_path = '/admin/oauth2/auth/requests/login/accept'
120
+
121
+ # query parameters
122
+ query_params = opts[:query_params] || {}
123
+ query_params[:'login_challenge'] = login_challenge
124
+
125
+ # header parameters
126
+ header_params = opts[:header_params] || {}
127
+ # HTTP header 'Accept' (if needed)
128
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
129
+ # HTTP header 'Content-Type'
130
+ content_type = @api_client.select_header_content_type(['application/json'])
131
+ if !content_type.nil?
132
+ header_params['Content-Type'] = content_type
133
+ end
134
+
135
+ # form parameters
136
+ form_params = opts[:form_params] || {}
137
+
138
+ # http body (model)
139
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'accept_o_auth2_login_request'])
140
+
141
+ # return_type
142
+ return_type = opts[:debug_return_type] || 'SuccessfulOAuth2RequestResponse'
143
+
144
+ # auth_names
145
+ auth_names = opts[:debug_auth_names] || ['oryAccessToken']
146
+
147
+ new_options = opts.merge(
148
+ :operation => :"V0alpha2Api.admin_accept_o_auth2_login_request",
149
+ :header_params => header_params,
150
+ :query_params => query_params,
151
+ :form_params => form_params,
152
+ :body => post_body,
153
+ :auth_names => auth_names,
154
+ :return_type => return_type
155
+ )
156
+
157
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
158
+ if @api_client.config.debugging
159
+ @api_client.config.logger.debug "API called: V0alpha2Api#admin_accept_o_auth2_login_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
160
+ end
161
+ return data, status_code, headers
162
+ end
163
+
164
+ # Accept an OAuth 2.0 Logout Request
165
+ # When a user or an application requests ORY Hydra to log out a user, this endpoint is used to confirm that logout request. The response contains a redirect URL which the consent provider should redirect the user-agent to.
166
+ # @param logout_challenge [String]
167
+ # @param [Hash] opts the optional parameters
168
+ # @return [SuccessfulOAuth2RequestResponse]
169
+ def admin_accept_o_auth2_logout_request(logout_challenge, opts = {})
170
+ data, _status_code, _headers = admin_accept_o_auth2_logout_request_with_http_info(logout_challenge, opts)
171
+ data
172
+ end
173
+
174
+ # Accept an OAuth 2.0 Logout Request
175
+ # When a user or an application requests ORY Hydra to log out a user, this endpoint is used to confirm that logout request. The response contains a redirect URL which the consent provider should redirect the user-agent to.
176
+ # @param logout_challenge [String]
177
+ # @param [Hash] opts the optional parameters
178
+ # @return [Array<(SuccessfulOAuth2RequestResponse, Integer, Hash)>] SuccessfulOAuth2RequestResponse data, response status code and response headers
179
+ def admin_accept_o_auth2_logout_request_with_http_info(logout_challenge, opts = {})
180
+ if @api_client.config.debugging
181
+ @api_client.config.logger.debug 'Calling API: V0alpha2Api.admin_accept_o_auth2_logout_request ...'
182
+ end
183
+ # verify the required parameter 'logout_challenge' is set
184
+ if @api_client.config.client_side_validation && logout_challenge.nil?
185
+ fail ArgumentError, "Missing the required parameter 'logout_challenge' when calling V0alpha2Api.admin_accept_o_auth2_logout_request"
186
+ end
187
+ # resource path
188
+ local_var_path = '/admin/oauth2/auth/requests/logout/accept'
189
+
190
+ # query parameters
191
+ query_params = opts[:query_params] || {}
192
+ query_params[:'logout_challenge'] = logout_challenge
193
+
194
+ # header parameters
195
+ header_params = opts[:header_params] || {}
196
+ # HTTP header 'Accept' (if needed)
197
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
198
+
199
+ # form parameters
200
+ form_params = opts[:form_params] || {}
201
+
202
+ # http body (model)
203
+ post_body = opts[:debug_body]
204
+
205
+ # return_type
206
+ return_type = opts[:debug_return_type] || 'SuccessfulOAuth2RequestResponse'
207
+
208
+ # auth_names
209
+ auth_names = opts[:debug_auth_names] || ['oryAccessToken']
210
+
211
+ new_options = opts.merge(
212
+ :operation => :"V0alpha2Api.admin_accept_o_auth2_logout_request",
213
+ :header_params => header_params,
214
+ :query_params => query_params,
215
+ :form_params => form_params,
216
+ :body => post_body,
217
+ :auth_names => auth_names,
218
+ :return_type => return_type
219
+ )
220
+
221
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
222
+ if @api_client.config.debugging
223
+ @api_client.config.logger.debug "API called: V0alpha2Api#admin_accept_o_auth2_logout_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
224
+ end
225
+ return data, status_code, headers
226
+ end
227
+
22
228
  # Create an Identity
23
229
  # This endpoint creates an identity. Learn how identities work in [Ory Kratos' User And Identity Model Documentation](https://www.ory.sh/docs/next/kratos/concepts/identity-user-model).
24
230
  # @param [Hash] opts the optional parameters
@@ -83,6 +289,148 @@ module OryClient
83
289
  return data, status_code, headers
84
290
  end
85
291
 
292
+ # Generate a New JSON Web Key
293
+ # This endpoint is capable of generating JSON Web Key Sets for you. There a different strategies available, such as symmetric cryptographic keys (HS256, HS512) and asymetric cryptographic keys (RS256, ECDSA). If the specified JSON Web Key Set does not exist, it will be created. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well.
294
+ # @param set [String] The JSON Web Key Set
295
+ # @param admin_create_json_web_key_set_body [AdminCreateJsonWebKeySetBody]
296
+ # @param [Hash] opts the optional parameters
297
+ # @return [JsonWebKeySet]
298
+ def admin_create_json_web_key_set(set, admin_create_json_web_key_set_body, opts = {})
299
+ data, _status_code, _headers = admin_create_json_web_key_set_with_http_info(set, admin_create_json_web_key_set_body, opts)
300
+ data
301
+ end
302
+
303
+ # Generate a New JSON Web Key
304
+ # This endpoint is capable of generating JSON Web Key Sets for you. There a different strategies available, such as symmetric cryptographic keys (HS256, HS512) and asymetric cryptographic keys (RS256, ECDSA). If the specified JSON Web Key Set does not exist, it will be created. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well.
305
+ # @param set [String] The JSON Web Key Set
306
+ # @param admin_create_json_web_key_set_body [AdminCreateJsonWebKeySetBody]
307
+ # @param [Hash] opts the optional parameters
308
+ # @return [Array<(JsonWebKeySet, Integer, Hash)>] JsonWebKeySet data, response status code and response headers
309
+ def admin_create_json_web_key_set_with_http_info(set, admin_create_json_web_key_set_body, opts = {})
310
+ if @api_client.config.debugging
311
+ @api_client.config.logger.debug 'Calling API: V0alpha2Api.admin_create_json_web_key_set ...'
312
+ end
313
+ # verify the required parameter 'set' is set
314
+ if @api_client.config.client_side_validation && set.nil?
315
+ fail ArgumentError, "Missing the required parameter 'set' when calling V0alpha2Api.admin_create_json_web_key_set"
316
+ end
317
+ # verify the required parameter 'admin_create_json_web_key_set_body' is set
318
+ if @api_client.config.client_side_validation && admin_create_json_web_key_set_body.nil?
319
+ fail ArgumentError, "Missing the required parameter 'admin_create_json_web_key_set_body' when calling V0alpha2Api.admin_create_json_web_key_set"
320
+ end
321
+ # resource path
322
+ local_var_path = '/admin/keys/{set}'.sub('{' + 'set' + '}', CGI.escape(set.to_s))
323
+
324
+ # query parameters
325
+ query_params = opts[:query_params] || {}
326
+
327
+ # header parameters
328
+ header_params = opts[:header_params] || {}
329
+ # HTTP header 'Accept' (if needed)
330
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
331
+ # HTTP header 'Content-Type'
332
+ content_type = @api_client.select_header_content_type(['application/json'])
333
+ if !content_type.nil?
334
+ header_params['Content-Type'] = content_type
335
+ end
336
+
337
+ # form parameters
338
+ form_params = opts[:form_params] || {}
339
+
340
+ # http body (model)
341
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(admin_create_json_web_key_set_body)
342
+
343
+ # return_type
344
+ return_type = opts[:debug_return_type] || 'JsonWebKeySet'
345
+
346
+ # auth_names
347
+ auth_names = opts[:debug_auth_names] || ['oryAccessToken']
348
+
349
+ new_options = opts.merge(
350
+ :operation => :"V0alpha2Api.admin_create_json_web_key_set",
351
+ :header_params => header_params,
352
+ :query_params => query_params,
353
+ :form_params => form_params,
354
+ :body => post_body,
355
+ :auth_names => auth_names,
356
+ :return_type => return_type
357
+ )
358
+
359
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
360
+ if @api_client.config.debugging
361
+ @api_client.config.logger.debug "API called: V0alpha2Api#admin_create_json_web_key_set\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
362
+ end
363
+ return data, status_code, headers
364
+ end
365
+
366
+ # Create an OAuth 2.0 Client
367
+ # Create a new OAuth 2.0 client. If you pass `client_secret` the secret is used, otherwise a random secret is generated. The secret is echoed in the response. It is not possible to retrieve it later on. OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities.
368
+ # @param o_auth2_client [OAuth2Client]
369
+ # @param [Hash] opts the optional parameters
370
+ # @return [OAuth2Client]
371
+ def admin_create_o_auth2_client(o_auth2_client, opts = {})
372
+ data, _status_code, _headers = admin_create_o_auth2_client_with_http_info(o_auth2_client, opts)
373
+ data
374
+ end
375
+
376
+ # Create an OAuth 2.0 Client
377
+ # Create a new OAuth 2.0 client. If you pass &#x60;client_secret&#x60; the secret is used, otherwise a random secret is generated. The secret is echoed in the response. It is not possible to retrieve it later on. OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities.
378
+ # @param o_auth2_client [OAuth2Client]
379
+ # @param [Hash] opts the optional parameters
380
+ # @return [Array<(OAuth2Client, Integer, Hash)>] OAuth2Client data, response status code and response headers
381
+ def admin_create_o_auth2_client_with_http_info(o_auth2_client, opts = {})
382
+ if @api_client.config.debugging
383
+ @api_client.config.logger.debug 'Calling API: V0alpha2Api.admin_create_o_auth2_client ...'
384
+ end
385
+ # verify the required parameter 'o_auth2_client' is set
386
+ if @api_client.config.client_side_validation && o_auth2_client.nil?
387
+ fail ArgumentError, "Missing the required parameter 'o_auth2_client' when calling V0alpha2Api.admin_create_o_auth2_client"
388
+ end
389
+ # resource path
390
+ local_var_path = '/admin/clients'
391
+
392
+ # query parameters
393
+ query_params = opts[:query_params] || {}
394
+
395
+ # header parameters
396
+ header_params = opts[:header_params] || {}
397
+ # HTTP header 'Accept' (if needed)
398
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
399
+ # HTTP header 'Content-Type'
400
+ content_type = @api_client.select_header_content_type(['application/json'])
401
+ if !content_type.nil?
402
+ header_params['Content-Type'] = content_type
403
+ end
404
+
405
+ # form parameters
406
+ form_params = opts[:form_params] || {}
407
+
408
+ # http body (model)
409
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(o_auth2_client)
410
+
411
+ # return_type
412
+ return_type = opts[:debug_return_type] || 'OAuth2Client'
413
+
414
+ # auth_names
415
+ auth_names = opts[:debug_auth_names] || ['oryAccessToken']
416
+
417
+ new_options = opts.merge(
418
+ :operation => :"V0alpha2Api.admin_create_o_auth2_client",
419
+ :header_params => header_params,
420
+ :query_params => query_params,
421
+ :form_params => form_params,
422
+ :body => post_body,
423
+ :auth_names => auth_names,
424
+ :return_type => return_type
425
+ )
426
+
427
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
428
+ if @api_client.config.debugging
429
+ @api_client.config.logger.debug "API called: V0alpha2Api#admin_create_o_auth2_client\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
430
+ end
431
+ return data, status_code, headers
432
+ end
433
+
86
434
  # Create a Recovery Link
87
435
  # This endpoint creates a recovery link which should be given to the user in order for them to recover (or activate) their account.
88
436
  # @param [Hash] opts the optional parameters
@@ -100,10 +448,2332 @@ module OryClient
100
448
  # @return [Array<(SelfServiceRecoveryLink, Integer, Hash)>] SelfServiceRecoveryLink data, response status code and response headers
101
449
  def admin_create_self_service_recovery_link_with_http_info(opts = {})
102
450
  if @api_client.config.debugging
103
- @api_client.config.logger.debug 'Calling API: V0alpha2Api.admin_create_self_service_recovery_link ...'
451
+ @api_client.config.logger.debug 'Calling API: V0alpha2Api.admin_create_self_service_recovery_link ...'
452
+ end
453
+ # resource path
454
+ local_var_path = '/admin/recovery/link'
455
+
456
+ # query parameters
457
+ query_params = opts[:query_params] || {}
458
+
459
+ # header parameters
460
+ header_params = opts[:header_params] || {}
461
+ # HTTP header 'Accept' (if needed)
462
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
463
+ # HTTP header 'Content-Type'
464
+ content_type = @api_client.select_header_content_type(['application/json'])
465
+ if !content_type.nil?
466
+ header_params['Content-Type'] = content_type
467
+ end
468
+
469
+ # form parameters
470
+ form_params = opts[:form_params] || {}
471
+
472
+ # http body (model)
473
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'admin_create_self_service_recovery_link_body'])
474
+
475
+ # return_type
476
+ return_type = opts[:debug_return_type] || 'SelfServiceRecoveryLink'
477
+
478
+ # auth_names
479
+ auth_names = opts[:debug_auth_names] || ['oryAccessToken']
480
+
481
+ new_options = opts.merge(
482
+ :operation => :"V0alpha2Api.admin_create_self_service_recovery_link",
483
+ :header_params => header_params,
484
+ :query_params => query_params,
485
+ :form_params => form_params,
486
+ :body => post_body,
487
+ :auth_names => auth_names,
488
+ :return_type => return_type
489
+ )
490
+
491
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
492
+ if @api_client.config.debugging
493
+ @api_client.config.logger.debug "API called: V0alpha2Api#admin_create_self_service_recovery_link\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
494
+ end
495
+ return data, status_code, headers
496
+ end
497
+
498
+ # Delete an Identity
499
+ # Calling this endpoint irrecoverably and permanently deletes the identity given its ID. This action can not be undone. This endpoint returns 204 when the identity was deleted or when the identity was not found, in which case it is assumed that is has been deleted already. Learn how identities work in [Ory Kratos' User And Identity Model Documentation](https://www.ory.sh/docs/next/kratos/concepts/identity-user-model).
500
+ # @param id [String] ID is the identity&#39;s ID.
501
+ # @param [Hash] opts the optional parameters
502
+ # @return [nil]
503
+ def admin_delete_identity(id, opts = {})
504
+ admin_delete_identity_with_http_info(id, opts)
505
+ nil
506
+ end
507
+
508
+ # Delete an Identity
509
+ # Calling this endpoint irrecoverably and permanently deletes the identity given its ID. This action can not be undone. This endpoint returns 204 when the identity was deleted or when the identity was not found, in which case it is assumed that is has been deleted already. Learn how identities work in [Ory Kratos&#39; User And Identity Model Documentation](https://www.ory.sh/docs/next/kratos/concepts/identity-user-model).
510
+ # @param id [String] ID is the identity&#39;s ID.
511
+ # @param [Hash] opts the optional parameters
512
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
513
+ def admin_delete_identity_with_http_info(id, opts = {})
514
+ if @api_client.config.debugging
515
+ @api_client.config.logger.debug 'Calling API: V0alpha2Api.admin_delete_identity ...'
516
+ end
517
+ # verify the required parameter 'id' is set
518
+ if @api_client.config.client_side_validation && id.nil?
519
+ fail ArgumentError, "Missing the required parameter 'id' when calling V0alpha2Api.admin_delete_identity"
520
+ end
521
+ # resource path
522
+ local_var_path = '/admin/identities/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
523
+
524
+ # query parameters
525
+ query_params = opts[:query_params] || {}
526
+
527
+ # header parameters
528
+ header_params = opts[:header_params] || {}
529
+ # HTTP header 'Accept' (if needed)
530
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
531
+
532
+ # form parameters
533
+ form_params = opts[:form_params] || {}
534
+
535
+ # http body (model)
536
+ post_body = opts[:debug_body]
537
+
538
+ # return_type
539
+ return_type = opts[:debug_return_type]
540
+
541
+ # auth_names
542
+ auth_names = opts[:debug_auth_names] || ['oryAccessToken']
543
+
544
+ new_options = opts.merge(
545
+ :operation => :"V0alpha2Api.admin_delete_identity",
546
+ :header_params => header_params,
547
+ :query_params => query_params,
548
+ :form_params => form_params,
549
+ :body => post_body,
550
+ :auth_names => auth_names,
551
+ :return_type => return_type
552
+ )
553
+
554
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
555
+ if @api_client.config.debugging
556
+ @api_client.config.logger.debug "API called: V0alpha2Api#admin_delete_identity\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
557
+ end
558
+ return data, status_code, headers
559
+ end
560
+
561
+ # Calling this endpoint irrecoverably and permanently deletes and invalidates all sessions that belong to the given Identity.
562
+ # This endpoint is useful for: To forcefully logout Identity from all devices and sessions
563
+ # @param id [String] ID is the identity&#39;s ID.
564
+ # @param [Hash] opts the optional parameters
565
+ # @return [nil]
566
+ def admin_delete_identity_sessions(id, opts = {})
567
+ admin_delete_identity_sessions_with_http_info(id, opts)
568
+ nil
569
+ end
570
+
571
+ # Calling this endpoint irrecoverably and permanently deletes and invalidates all sessions that belong to the given Identity.
572
+ # This endpoint is useful for: To forcefully logout Identity from all devices and sessions
573
+ # @param id [String] ID is the identity&#39;s ID.
574
+ # @param [Hash] opts the optional parameters
575
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
576
+ def admin_delete_identity_sessions_with_http_info(id, opts = {})
577
+ if @api_client.config.debugging
578
+ @api_client.config.logger.debug 'Calling API: V0alpha2Api.admin_delete_identity_sessions ...'
579
+ end
580
+ # verify the required parameter 'id' is set
581
+ if @api_client.config.client_side_validation && id.nil?
582
+ fail ArgumentError, "Missing the required parameter 'id' when calling V0alpha2Api.admin_delete_identity_sessions"
583
+ end
584
+ # resource path
585
+ local_var_path = '/admin/identities/{id}/sessions'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
586
+
587
+ # query parameters
588
+ query_params = opts[:query_params] || {}
589
+
590
+ # header parameters
591
+ header_params = opts[:header_params] || {}
592
+ # HTTP header 'Accept' (if needed)
593
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
594
+
595
+ # form parameters
596
+ form_params = opts[:form_params] || {}
597
+
598
+ # http body (model)
599
+ post_body = opts[:debug_body]
600
+
601
+ # return_type
602
+ return_type = opts[:debug_return_type]
603
+
604
+ # auth_names
605
+ auth_names = opts[:debug_auth_names] || ['oryAccessToken']
606
+
607
+ new_options = opts.merge(
608
+ :operation => :"V0alpha2Api.admin_delete_identity_sessions",
609
+ :header_params => header_params,
610
+ :query_params => query_params,
611
+ :form_params => form_params,
612
+ :body => post_body,
613
+ :auth_names => auth_names,
614
+ :return_type => return_type
615
+ )
616
+
617
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
618
+ if @api_client.config.debugging
619
+ @api_client.config.logger.debug "API called: V0alpha2Api#admin_delete_identity_sessions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
620
+ end
621
+ return data, status_code, headers
622
+ end
623
+
624
+ # Delete a JSON Web Key
625
+ # Use this endpoint to delete a single JSON Web Key. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well.
626
+ # @param set [String] The JSON Web Key Set
627
+ # @param kid [String] The JSON Web Key ID (kid)
628
+ # @param [Hash] opts the optional parameters
629
+ # @return [nil]
630
+ def admin_delete_json_web_key(set, kid, opts = {})
631
+ admin_delete_json_web_key_with_http_info(set, kid, opts)
632
+ nil
633
+ end
634
+
635
+ # Delete a JSON Web Key
636
+ # Use this endpoint to delete a single JSON Web Key. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well.
637
+ # @param set [String] The JSON Web Key Set
638
+ # @param kid [String] The JSON Web Key ID (kid)
639
+ # @param [Hash] opts the optional parameters
640
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
641
+ def admin_delete_json_web_key_with_http_info(set, kid, opts = {})
642
+ if @api_client.config.debugging
643
+ @api_client.config.logger.debug 'Calling API: V0alpha2Api.admin_delete_json_web_key ...'
644
+ end
645
+ # verify the required parameter 'set' is set
646
+ if @api_client.config.client_side_validation && set.nil?
647
+ fail ArgumentError, "Missing the required parameter 'set' when calling V0alpha2Api.admin_delete_json_web_key"
648
+ end
649
+ # verify the required parameter 'kid' is set
650
+ if @api_client.config.client_side_validation && kid.nil?
651
+ fail ArgumentError, "Missing the required parameter 'kid' when calling V0alpha2Api.admin_delete_json_web_key"
652
+ end
653
+ # resource path
654
+ local_var_path = '/admin/keys/{set}/{kid}'.sub('{' + 'set' + '}', CGI.escape(set.to_s)).sub('{' + 'kid' + '}', CGI.escape(kid.to_s))
655
+
656
+ # query parameters
657
+ query_params = opts[:query_params] || {}
658
+
659
+ # header parameters
660
+ header_params = opts[:header_params] || {}
661
+ # HTTP header 'Accept' (if needed)
662
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
663
+
664
+ # form parameters
665
+ form_params = opts[:form_params] || {}
666
+
667
+ # http body (model)
668
+ post_body = opts[:debug_body]
669
+
670
+ # return_type
671
+ return_type = opts[:debug_return_type]
672
+
673
+ # auth_names
674
+ auth_names = opts[:debug_auth_names] || ['oryAccessToken']
675
+
676
+ new_options = opts.merge(
677
+ :operation => :"V0alpha2Api.admin_delete_json_web_key",
678
+ :header_params => header_params,
679
+ :query_params => query_params,
680
+ :form_params => form_params,
681
+ :body => post_body,
682
+ :auth_names => auth_names,
683
+ :return_type => return_type
684
+ )
685
+
686
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
687
+ if @api_client.config.debugging
688
+ @api_client.config.logger.debug "API called: V0alpha2Api#admin_delete_json_web_key\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
689
+ end
690
+ return data, status_code, headers
691
+ end
692
+
693
+ # Delete a JSON Web Key Set
694
+ # Use this endpoint to delete a complete JSON Web Key Set and all the keys in that set. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well.
695
+ # @param set [String] The JSON Web Key Set
696
+ # @param [Hash] opts the optional parameters
697
+ # @return [nil]
698
+ def admin_delete_json_web_key_set(set, opts = {})
699
+ admin_delete_json_web_key_set_with_http_info(set, opts)
700
+ nil
701
+ end
702
+
703
+ # Delete a JSON Web Key Set
704
+ # Use this endpoint to delete a complete JSON Web Key Set and all the keys in that set. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well.
705
+ # @param set [String] The JSON Web Key Set
706
+ # @param [Hash] opts the optional parameters
707
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
708
+ def admin_delete_json_web_key_set_with_http_info(set, opts = {})
709
+ if @api_client.config.debugging
710
+ @api_client.config.logger.debug 'Calling API: V0alpha2Api.admin_delete_json_web_key_set ...'
711
+ end
712
+ # verify the required parameter 'set' is set
713
+ if @api_client.config.client_side_validation && set.nil?
714
+ fail ArgumentError, "Missing the required parameter 'set' when calling V0alpha2Api.admin_delete_json_web_key_set"
715
+ end
716
+ # resource path
717
+ local_var_path = '/admin/keys/{set}'.sub('{' + 'set' + '}', CGI.escape(set.to_s))
718
+
719
+ # query parameters
720
+ query_params = opts[:query_params] || {}
721
+
722
+ # header parameters
723
+ header_params = opts[:header_params] || {}
724
+ # HTTP header 'Accept' (if needed)
725
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
726
+
727
+ # form parameters
728
+ form_params = opts[:form_params] || {}
729
+
730
+ # http body (model)
731
+ post_body = opts[:debug_body]
732
+
733
+ # return_type
734
+ return_type = opts[:debug_return_type]
735
+
736
+ # auth_names
737
+ auth_names = opts[:debug_auth_names] || ['oryAccessToken']
738
+
739
+ new_options = opts.merge(
740
+ :operation => :"V0alpha2Api.admin_delete_json_web_key_set",
741
+ :header_params => header_params,
742
+ :query_params => query_params,
743
+ :form_params => form_params,
744
+ :body => post_body,
745
+ :auth_names => auth_names,
746
+ :return_type => return_type
747
+ )
748
+
749
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
750
+ if @api_client.config.debugging
751
+ @api_client.config.logger.debug "API called: V0alpha2Api#admin_delete_json_web_key_set\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
752
+ end
753
+ return data, status_code, headers
754
+ end
755
+
756
+ # Deletes an OAuth 2.0 Client
757
+ # Delete an existing OAuth 2.0 Client by its ID. OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. Make sure that this endpoint is well protected and only callable by first-party components.
758
+ # @param id [String] The id of the OAuth 2.0 Client.
759
+ # @param [Hash] opts the optional parameters
760
+ # @return [nil]
761
+ def admin_delete_o_auth2_client(id, opts = {})
762
+ admin_delete_o_auth2_client_with_http_info(id, opts)
763
+ nil
764
+ end
765
+
766
+ # Deletes an OAuth 2.0 Client
767
+ # Delete an existing OAuth 2.0 Client by its ID. OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. Make sure that this endpoint is well protected and only callable by first-party components.
768
+ # @param id [String] The id of the OAuth 2.0 Client.
769
+ # @param [Hash] opts the optional parameters
770
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
771
+ def admin_delete_o_auth2_client_with_http_info(id, opts = {})
772
+ if @api_client.config.debugging
773
+ @api_client.config.logger.debug 'Calling API: V0alpha2Api.admin_delete_o_auth2_client ...'
774
+ end
775
+ # verify the required parameter 'id' is set
776
+ if @api_client.config.client_side_validation && id.nil?
777
+ fail ArgumentError, "Missing the required parameter 'id' when calling V0alpha2Api.admin_delete_o_auth2_client"
778
+ end
779
+ # resource path
780
+ local_var_path = '/admin/clients/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
781
+
782
+ # query parameters
783
+ query_params = opts[:query_params] || {}
784
+
785
+ # header parameters
786
+ header_params = opts[:header_params] || {}
787
+ # HTTP header 'Accept' (if needed)
788
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
789
+
790
+ # form parameters
791
+ form_params = opts[:form_params] || {}
792
+
793
+ # http body (model)
794
+ post_body = opts[:debug_body]
795
+
796
+ # return_type
797
+ return_type = opts[:debug_return_type]
798
+
799
+ # auth_names
800
+ auth_names = opts[:debug_auth_names] || ['oryAccessToken']
801
+
802
+ new_options = opts.merge(
803
+ :operation => :"V0alpha2Api.admin_delete_o_auth2_client",
804
+ :header_params => header_params,
805
+ :query_params => query_params,
806
+ :form_params => form_params,
807
+ :body => post_body,
808
+ :auth_names => auth_names,
809
+ :return_type => return_type
810
+ )
811
+
812
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
813
+ if @api_client.config.debugging
814
+ @api_client.config.logger.debug "API called: V0alpha2Api#admin_delete_o_auth2_client\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
815
+ end
816
+ return data, status_code, headers
817
+ end
818
+
819
+ # Delete OAuth2 Access Tokens from a Client
820
+ # This endpoint deletes OAuth2 access tokens issued for a client from the database
821
+ # @param client_id [String]
822
+ # @param [Hash] opts the optional parameters
823
+ # @return [nil]
824
+ def admin_delete_o_auth2_token(client_id, opts = {})
825
+ admin_delete_o_auth2_token_with_http_info(client_id, opts)
826
+ nil
827
+ end
828
+
829
+ # Delete OAuth2 Access Tokens from a Client
830
+ # This endpoint deletes OAuth2 access tokens issued for a client from the database
831
+ # @param client_id [String]
832
+ # @param [Hash] opts the optional parameters
833
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
834
+ def admin_delete_o_auth2_token_with_http_info(client_id, opts = {})
835
+ if @api_client.config.debugging
836
+ @api_client.config.logger.debug 'Calling API: V0alpha2Api.admin_delete_o_auth2_token ...'
837
+ end
838
+ # verify the required parameter 'client_id' is set
839
+ if @api_client.config.client_side_validation && client_id.nil?
840
+ fail ArgumentError, "Missing the required parameter 'client_id' when calling V0alpha2Api.admin_delete_o_auth2_token"
841
+ end
842
+ # resource path
843
+ local_var_path = '/admin/oauth2/tokens'
844
+
845
+ # query parameters
846
+ query_params = opts[:query_params] || {}
847
+ query_params[:'client_id'] = client_id
848
+
849
+ # header parameters
850
+ header_params = opts[:header_params] || {}
851
+ # HTTP header 'Accept' (if needed)
852
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
853
+
854
+ # form parameters
855
+ form_params = opts[:form_params] || {}
856
+
857
+ # http body (model)
858
+ post_body = opts[:debug_body]
859
+
860
+ # return_type
861
+ return_type = opts[:debug_return_type]
862
+
863
+ # auth_names
864
+ auth_names = opts[:debug_auth_names] || ['oryAccessToken']
865
+
866
+ new_options = opts.merge(
867
+ :operation => :"V0alpha2Api.admin_delete_o_auth2_token",
868
+ :header_params => header_params,
869
+ :query_params => query_params,
870
+ :form_params => form_params,
871
+ :body => post_body,
872
+ :auth_names => auth_names,
873
+ :return_type => return_type
874
+ )
875
+
876
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
877
+ if @api_client.config.debugging
878
+ @api_client.config.logger.debug "API called: V0alpha2Api#admin_delete_o_auth2_token\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
879
+ end
880
+ return data, status_code, headers
881
+ end
882
+
883
+ # Delete a Trusted OAuth2 JWT Bearer Grant Type Issuer
884
+ # Use this endpoint to delete trusted JWT Bearer Grant Type Issuer. The ID is the one returned when you created the trust relationship. Once deleted, the associated issuer will no longer be able to perform the JSON Web Token (JWT) Profile for OAuth 2.0 Client Authentication and Authorization Grant.
885
+ # @param id [String] The id of the desired grant
886
+ # @param [Hash] opts the optional parameters
887
+ # @return [nil]
888
+ def admin_delete_trusted_o_auth2_jwt_grant_issuer(id, opts = {})
889
+ admin_delete_trusted_o_auth2_jwt_grant_issuer_with_http_info(id, opts)
890
+ nil
891
+ end
892
+
893
+ # Delete a Trusted OAuth2 JWT Bearer Grant Type Issuer
894
+ # Use this endpoint to delete trusted JWT Bearer Grant Type Issuer. The ID is the one returned when you created the trust relationship. Once deleted, the associated issuer will no longer be able to perform the JSON Web Token (JWT) Profile for OAuth 2.0 Client Authentication and Authorization Grant.
895
+ # @param id [String] The id of the desired grant
896
+ # @param [Hash] opts the optional parameters
897
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
898
+ def admin_delete_trusted_o_auth2_jwt_grant_issuer_with_http_info(id, opts = {})
899
+ if @api_client.config.debugging
900
+ @api_client.config.logger.debug 'Calling API: V0alpha2Api.admin_delete_trusted_o_auth2_jwt_grant_issuer ...'
901
+ end
902
+ # verify the required parameter 'id' is set
903
+ if @api_client.config.client_side_validation && id.nil?
904
+ fail ArgumentError, "Missing the required parameter 'id' when calling V0alpha2Api.admin_delete_trusted_o_auth2_jwt_grant_issuer"
905
+ end
906
+ # resource path
907
+ local_var_path = '/admin/trust/grants/jwt-bearer/issuers/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
908
+
909
+ # query parameters
910
+ query_params = opts[:query_params] || {}
911
+
912
+ # header parameters
913
+ header_params = opts[:header_params] || {}
914
+ # HTTP header 'Accept' (if needed)
915
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
916
+
917
+ # form parameters
918
+ form_params = opts[:form_params] || {}
919
+
920
+ # http body (model)
921
+ post_body = opts[:debug_body]
922
+
923
+ # return_type
924
+ return_type = opts[:debug_return_type]
925
+
926
+ # auth_names
927
+ auth_names = opts[:debug_auth_names] || ['oryAccessToken']
928
+
929
+ new_options = opts.merge(
930
+ :operation => :"V0alpha2Api.admin_delete_trusted_o_auth2_jwt_grant_issuer",
931
+ :header_params => header_params,
932
+ :query_params => query_params,
933
+ :form_params => form_params,
934
+ :body => post_body,
935
+ :auth_names => auth_names,
936
+ :return_type => return_type
937
+ )
938
+
939
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
940
+ if @api_client.config.debugging
941
+ @api_client.config.logger.debug "API called: V0alpha2Api#admin_delete_trusted_o_auth2_jwt_grant_issuer\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
942
+ end
943
+ return data, status_code, headers
944
+ end
945
+
946
+ # Calling this endpoint extends the given session ID. If `session.earliest_possible_extend` is set it will only extend the session after the specified time has passed.
947
+ # Retrieve the session ID from the `/sessions/whoami` endpoint / `toSession` SDK method.
948
+ # @param id [String] ID is the session&#39;s ID.
949
+ # @param [Hash] opts the optional parameters
950
+ # @return [Session]
951
+ def admin_extend_session(id, opts = {})
952
+ data, _status_code, _headers = admin_extend_session_with_http_info(id, opts)
953
+ data
954
+ end
955
+
956
+ # Calling this endpoint extends the given session ID. If &#x60;session.earliest_possible_extend&#x60; is set it will only extend the session after the specified time has passed.
957
+ # Retrieve the session ID from the &#x60;/sessions/whoami&#x60; endpoint / &#x60;toSession&#x60; SDK method.
958
+ # @param id [String] ID is the session&#39;s ID.
959
+ # @param [Hash] opts the optional parameters
960
+ # @return [Array<(Session, Integer, Hash)>] Session data, response status code and response headers
961
+ def admin_extend_session_with_http_info(id, opts = {})
962
+ if @api_client.config.debugging
963
+ @api_client.config.logger.debug 'Calling API: V0alpha2Api.admin_extend_session ...'
964
+ end
965
+ # verify the required parameter 'id' is set
966
+ if @api_client.config.client_side_validation && id.nil?
967
+ fail ArgumentError, "Missing the required parameter 'id' when calling V0alpha2Api.admin_extend_session"
968
+ end
969
+ # resource path
970
+ local_var_path = '/admin/sessions/{id}/extend'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
971
+
972
+ # query parameters
973
+ query_params = opts[:query_params] || {}
974
+
975
+ # header parameters
976
+ header_params = opts[:header_params] || {}
977
+ # HTTP header 'Accept' (if needed)
978
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
979
+
980
+ # form parameters
981
+ form_params = opts[:form_params] || {}
982
+
983
+ # http body (model)
984
+ post_body = opts[:debug_body]
985
+
986
+ # return_type
987
+ return_type = opts[:debug_return_type] || 'Session'
988
+
989
+ # auth_names
990
+ auth_names = opts[:debug_auth_names] || ['oryAccessToken']
991
+
992
+ new_options = opts.merge(
993
+ :operation => :"V0alpha2Api.admin_extend_session",
994
+ :header_params => header_params,
995
+ :query_params => query_params,
996
+ :form_params => form_params,
997
+ :body => post_body,
998
+ :auth_names => auth_names,
999
+ :return_type => return_type
1000
+ )
1001
+
1002
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
1003
+ if @api_client.config.debugging
1004
+ @api_client.config.logger.debug "API called: V0alpha2Api#admin_extend_session\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1005
+ end
1006
+ return data, status_code, headers
1007
+ end
1008
+
1009
+ # Get an Identity
1010
+ # Learn how identities work in [Ory Kratos' User And Identity Model Documentation](https://www.ory.sh/docs/next/kratos/concepts/identity-user-model).
1011
+ # @param id [String] ID must be set to the ID of identity you want to get
1012
+ # @param [Hash] opts the optional parameters
1013
+ # @option opts [Array<String>] :include_credential DeclassifyCredentials will declassify one or more identity&#39;s credentials Currently, only &#x60;oidc&#x60; is supported. This will return the initial OAuth 2.0 Access, Refresh and (optionally) OpenID Connect ID Token.
1014
+ # @return [Identity]
1015
+ def admin_get_identity(id, opts = {})
1016
+ data, _status_code, _headers = admin_get_identity_with_http_info(id, opts)
1017
+ data
1018
+ end
1019
+
1020
+ # Get an Identity
1021
+ # Learn how identities work in [Ory Kratos&#39; User And Identity Model Documentation](https://www.ory.sh/docs/next/kratos/concepts/identity-user-model).
1022
+ # @param id [String] ID must be set to the ID of identity you want to get
1023
+ # @param [Hash] opts the optional parameters
1024
+ # @option opts [Array<String>] :include_credential DeclassifyCredentials will declassify one or more identity&#39;s credentials Currently, only &#x60;oidc&#x60; is supported. This will return the initial OAuth 2.0 Access, Refresh and (optionally) OpenID Connect ID Token.
1025
+ # @return [Array<(Identity, Integer, Hash)>] Identity data, response status code and response headers
1026
+ def admin_get_identity_with_http_info(id, opts = {})
1027
+ if @api_client.config.debugging
1028
+ @api_client.config.logger.debug 'Calling API: V0alpha2Api.admin_get_identity ...'
1029
+ end
1030
+ # verify the required parameter 'id' is set
1031
+ if @api_client.config.client_side_validation && id.nil?
1032
+ fail ArgumentError, "Missing the required parameter 'id' when calling V0alpha2Api.admin_get_identity"
1033
+ end
1034
+ # resource path
1035
+ local_var_path = '/admin/identities/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
1036
+
1037
+ # query parameters
1038
+ query_params = opts[:query_params] || {}
1039
+ query_params[:'include_credential'] = @api_client.build_collection_param(opts[:'include_credential'], :multi) if !opts[:'include_credential'].nil?
1040
+
1041
+ # header parameters
1042
+ header_params = opts[:header_params] || {}
1043
+ # HTTP header 'Accept' (if needed)
1044
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1045
+
1046
+ # form parameters
1047
+ form_params = opts[:form_params] || {}
1048
+
1049
+ # http body (model)
1050
+ post_body = opts[:debug_body]
1051
+
1052
+ # return_type
1053
+ return_type = opts[:debug_return_type] || 'Identity'
1054
+
1055
+ # auth_names
1056
+ auth_names = opts[:debug_auth_names] || ['oryAccessToken']
1057
+
1058
+ new_options = opts.merge(
1059
+ :operation => :"V0alpha2Api.admin_get_identity",
1060
+ :header_params => header_params,
1061
+ :query_params => query_params,
1062
+ :form_params => form_params,
1063
+ :body => post_body,
1064
+ :auth_names => auth_names,
1065
+ :return_type => return_type
1066
+ )
1067
+
1068
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1069
+ if @api_client.config.debugging
1070
+ @api_client.config.logger.debug "API called: V0alpha2Api#admin_get_identity\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1071
+ end
1072
+ return data, status_code, headers
1073
+ end
1074
+
1075
+ # Fetch a JSON Web Key
1076
+ # This endpoint returns a singular JSON Web Key. It is identified by the set and the specific key ID (kid).
1077
+ # @param set [String] The JSON Web Key Set
1078
+ # @param kid [String] The JSON Web Key ID (kid)
1079
+ # @param [Hash] opts the optional parameters
1080
+ # @return [JsonWebKeySet]
1081
+ def admin_get_json_web_key(set, kid, opts = {})
1082
+ data, _status_code, _headers = admin_get_json_web_key_with_http_info(set, kid, opts)
1083
+ data
1084
+ end
1085
+
1086
+ # Fetch a JSON Web Key
1087
+ # This endpoint returns a singular JSON Web Key. It is identified by the set and the specific key ID (kid).
1088
+ # @param set [String] The JSON Web Key Set
1089
+ # @param kid [String] The JSON Web Key ID (kid)
1090
+ # @param [Hash] opts the optional parameters
1091
+ # @return [Array<(JsonWebKeySet, Integer, Hash)>] JsonWebKeySet data, response status code and response headers
1092
+ def admin_get_json_web_key_with_http_info(set, kid, opts = {})
1093
+ if @api_client.config.debugging
1094
+ @api_client.config.logger.debug 'Calling API: V0alpha2Api.admin_get_json_web_key ...'
1095
+ end
1096
+ # verify the required parameter 'set' is set
1097
+ if @api_client.config.client_side_validation && set.nil?
1098
+ fail ArgumentError, "Missing the required parameter 'set' when calling V0alpha2Api.admin_get_json_web_key"
1099
+ end
1100
+ # verify the required parameter 'kid' is set
1101
+ if @api_client.config.client_side_validation && kid.nil?
1102
+ fail ArgumentError, "Missing the required parameter 'kid' when calling V0alpha2Api.admin_get_json_web_key"
1103
+ end
1104
+ # resource path
1105
+ local_var_path = '/admin/keys/{set}/{kid}'.sub('{' + 'set' + '}', CGI.escape(set.to_s)).sub('{' + 'kid' + '}', CGI.escape(kid.to_s))
1106
+
1107
+ # query parameters
1108
+ query_params = opts[:query_params] || {}
1109
+
1110
+ # header parameters
1111
+ header_params = opts[:header_params] || {}
1112
+ # HTTP header 'Accept' (if needed)
1113
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1114
+
1115
+ # form parameters
1116
+ form_params = opts[:form_params] || {}
1117
+
1118
+ # http body (model)
1119
+ post_body = opts[:debug_body]
1120
+
1121
+ # return_type
1122
+ return_type = opts[:debug_return_type] || 'JsonWebKeySet'
1123
+
1124
+ # auth_names
1125
+ auth_names = opts[:debug_auth_names] || ['oryAccessToken']
1126
+
1127
+ new_options = opts.merge(
1128
+ :operation => :"V0alpha2Api.admin_get_json_web_key",
1129
+ :header_params => header_params,
1130
+ :query_params => query_params,
1131
+ :form_params => form_params,
1132
+ :body => post_body,
1133
+ :auth_names => auth_names,
1134
+ :return_type => return_type
1135
+ )
1136
+
1137
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1138
+ if @api_client.config.debugging
1139
+ @api_client.config.logger.debug "API called: V0alpha2Api#admin_get_json_web_key\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1140
+ end
1141
+ return data, status_code, headers
1142
+ end
1143
+
1144
+ # Retrieve a JSON Web Key Set
1145
+ # This endpoint can be used to retrieve JWK Sets stored in ORY Hydra. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well.
1146
+ # @param set [String] The JSON Web Key Set
1147
+ # @param [Hash] opts the optional parameters
1148
+ # @return [JsonWebKeySet]
1149
+ def admin_get_json_web_key_set(set, opts = {})
1150
+ data, _status_code, _headers = admin_get_json_web_key_set_with_http_info(set, opts)
1151
+ data
1152
+ end
1153
+
1154
+ # Retrieve a JSON Web Key Set
1155
+ # This endpoint can be used to retrieve JWK Sets stored in ORY Hydra. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well.
1156
+ # @param set [String] The JSON Web Key Set
1157
+ # @param [Hash] opts the optional parameters
1158
+ # @return [Array<(JsonWebKeySet, Integer, Hash)>] JsonWebKeySet data, response status code and response headers
1159
+ def admin_get_json_web_key_set_with_http_info(set, opts = {})
1160
+ if @api_client.config.debugging
1161
+ @api_client.config.logger.debug 'Calling API: V0alpha2Api.admin_get_json_web_key_set ...'
1162
+ end
1163
+ # verify the required parameter 'set' is set
1164
+ if @api_client.config.client_side_validation && set.nil?
1165
+ fail ArgumentError, "Missing the required parameter 'set' when calling V0alpha2Api.admin_get_json_web_key_set"
1166
+ end
1167
+ # resource path
1168
+ local_var_path = '/admin/keys/{set}'.sub('{' + 'set' + '}', CGI.escape(set.to_s))
1169
+
1170
+ # query parameters
1171
+ query_params = opts[:query_params] || {}
1172
+
1173
+ # header parameters
1174
+ header_params = opts[:header_params] || {}
1175
+ # HTTP header 'Accept' (if needed)
1176
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1177
+
1178
+ # form parameters
1179
+ form_params = opts[:form_params] || {}
1180
+
1181
+ # http body (model)
1182
+ post_body = opts[:debug_body]
1183
+
1184
+ # return_type
1185
+ return_type = opts[:debug_return_type] || 'JsonWebKeySet'
1186
+
1187
+ # auth_names
1188
+ auth_names = opts[:debug_auth_names] || ['oryAccessToken']
1189
+
1190
+ new_options = opts.merge(
1191
+ :operation => :"V0alpha2Api.admin_get_json_web_key_set",
1192
+ :header_params => header_params,
1193
+ :query_params => query_params,
1194
+ :form_params => form_params,
1195
+ :body => post_body,
1196
+ :auth_names => auth_names,
1197
+ :return_type => return_type
1198
+ )
1199
+
1200
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1201
+ if @api_client.config.debugging
1202
+ @api_client.config.logger.debug "API called: V0alpha2Api#admin_get_json_web_key_set\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1203
+ end
1204
+ return data, status_code, headers
1205
+ end
1206
+
1207
+ # Get an OAuth 2.0 Client
1208
+ # Get an OAuth 2.0 client by its ID. This endpoint never returns the client secret. OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities.
1209
+ # @param id [String] The id of the OAuth 2.0 Client.
1210
+ # @param [Hash] opts the optional parameters
1211
+ # @return [OAuth2Client]
1212
+ def admin_get_o_auth2_client(id, opts = {})
1213
+ data, _status_code, _headers = admin_get_o_auth2_client_with_http_info(id, opts)
1214
+ data
1215
+ end
1216
+
1217
+ # Get an OAuth 2.0 Client
1218
+ # Get an OAuth 2.0 client by its ID. This endpoint never returns the client secret. OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities.
1219
+ # @param id [String] The id of the OAuth 2.0 Client.
1220
+ # @param [Hash] opts the optional parameters
1221
+ # @return [Array<(OAuth2Client, Integer, Hash)>] OAuth2Client data, response status code and response headers
1222
+ def admin_get_o_auth2_client_with_http_info(id, opts = {})
1223
+ if @api_client.config.debugging
1224
+ @api_client.config.logger.debug 'Calling API: V0alpha2Api.admin_get_o_auth2_client ...'
1225
+ end
1226
+ # verify the required parameter 'id' is set
1227
+ if @api_client.config.client_side_validation && id.nil?
1228
+ fail ArgumentError, "Missing the required parameter 'id' when calling V0alpha2Api.admin_get_o_auth2_client"
1229
+ end
1230
+ # resource path
1231
+ local_var_path = '/admin/clients/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
1232
+
1233
+ # query parameters
1234
+ query_params = opts[:query_params] || {}
1235
+
1236
+ # header parameters
1237
+ header_params = opts[:header_params] || {}
1238
+ # HTTP header 'Accept' (if needed)
1239
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1240
+
1241
+ # form parameters
1242
+ form_params = opts[:form_params] || {}
1243
+
1244
+ # http body (model)
1245
+ post_body = opts[:debug_body]
1246
+
1247
+ # return_type
1248
+ return_type = opts[:debug_return_type] || 'OAuth2Client'
1249
+
1250
+ # auth_names
1251
+ auth_names = opts[:debug_auth_names] || ['oryAccessToken']
1252
+
1253
+ new_options = opts.merge(
1254
+ :operation => :"V0alpha2Api.admin_get_o_auth2_client",
1255
+ :header_params => header_params,
1256
+ :query_params => query_params,
1257
+ :form_params => form_params,
1258
+ :body => post_body,
1259
+ :auth_names => auth_names,
1260
+ :return_type => return_type
1261
+ )
1262
+
1263
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1264
+ if @api_client.config.debugging
1265
+ @api_client.config.logger.debug "API called: V0alpha2Api#admin_get_o_auth2_client\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1266
+ end
1267
+ return data, status_code, headers
1268
+ end
1269
+
1270
+ # Get OAuth 2.0 Consent Request Information
1271
+ # When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider to authenticate the subject and then tell ORY Hydra now about it. If the subject authenticated, he/she must now be asked if the OAuth 2.0 Client which initiated the flow should be allowed to access the resources on the subject's behalf. The consent provider which handles this request and is a web app implemented and hosted by you. It shows a subject interface which asks the subject to grant or deny the client access to the requested scope (\"Application my-dropbox-app wants write access to all your private files\"). The consent challenge is appended to the consent provider's URL to which the subject's user-agent (browser) is redirected to. The consent provider uses that challenge to fetch information on the OAuth2 request and then tells ORY Hydra if the subject accepted or rejected the request.
1272
+ # @param consent_challenge [String]
1273
+ # @param [Hash] opts the optional parameters
1274
+ # @return [OAuth2ConsentRequest]
1275
+ def admin_get_o_auth2_consent_request(consent_challenge, opts = {})
1276
+ data, _status_code, _headers = admin_get_o_auth2_consent_request_with_http_info(consent_challenge, opts)
1277
+ data
1278
+ end
1279
+
1280
+ # Get OAuth 2.0 Consent Request Information
1281
+ # When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider to authenticate the subject and then tell ORY Hydra now about it. If the subject authenticated, he/she must now be asked if the OAuth 2.0 Client which initiated the flow should be allowed to access the resources on the subject&#39;s behalf. The consent provider which handles this request and is a web app implemented and hosted by you. It shows a subject interface which asks the subject to grant or deny the client access to the requested scope (\&quot;Application my-dropbox-app wants write access to all your private files\&quot;). The consent challenge is appended to the consent provider&#39;s URL to which the subject&#39;s user-agent (browser) is redirected to. The consent provider uses that challenge to fetch information on the OAuth2 request and then tells ORY Hydra if the subject accepted or rejected the request.
1282
+ # @param consent_challenge [String]
1283
+ # @param [Hash] opts the optional parameters
1284
+ # @return [Array<(OAuth2ConsentRequest, Integer, Hash)>] OAuth2ConsentRequest data, response status code and response headers
1285
+ def admin_get_o_auth2_consent_request_with_http_info(consent_challenge, opts = {})
1286
+ if @api_client.config.debugging
1287
+ @api_client.config.logger.debug 'Calling API: V0alpha2Api.admin_get_o_auth2_consent_request ...'
1288
+ end
1289
+ # verify the required parameter 'consent_challenge' is set
1290
+ if @api_client.config.client_side_validation && consent_challenge.nil?
1291
+ fail ArgumentError, "Missing the required parameter 'consent_challenge' when calling V0alpha2Api.admin_get_o_auth2_consent_request"
1292
+ end
1293
+ # resource path
1294
+ local_var_path = '/admin/oauth2/auth/requests/consent'
1295
+
1296
+ # query parameters
1297
+ query_params = opts[:query_params] || {}
1298
+ query_params[:'consent_challenge'] = consent_challenge
1299
+
1300
+ # header parameters
1301
+ header_params = opts[:header_params] || {}
1302
+ # HTTP header 'Accept' (if needed)
1303
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1304
+
1305
+ # form parameters
1306
+ form_params = opts[:form_params] || {}
1307
+
1308
+ # http body (model)
1309
+ post_body = opts[:debug_body]
1310
+
1311
+ # return_type
1312
+ return_type = opts[:debug_return_type] || 'OAuth2ConsentRequest'
1313
+
1314
+ # auth_names
1315
+ auth_names = opts[:debug_auth_names] || ['oryAccessToken']
1316
+
1317
+ new_options = opts.merge(
1318
+ :operation => :"V0alpha2Api.admin_get_o_auth2_consent_request",
1319
+ :header_params => header_params,
1320
+ :query_params => query_params,
1321
+ :form_params => form_params,
1322
+ :body => post_body,
1323
+ :auth_names => auth_names,
1324
+ :return_type => return_type
1325
+ )
1326
+
1327
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1328
+ if @api_client.config.debugging
1329
+ @api_client.config.logger.debug "API called: V0alpha2Api#admin_get_o_auth2_consent_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1330
+ end
1331
+ return data, status_code, headers
1332
+ end
1333
+
1334
+ # Get an OAuth 2.0 Login Request
1335
+ # When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider (sometimes called \"identity provider\") to authenticate the subject and then tell ORY Hydra now about it. The login provider is an web-app you write and host, and it must be able to authenticate (\"show the subject a login screen\") a subject (in OAuth2 the proper name for subject is \"resource owner\"). The authentication challenge is appended to the login provider URL to which the subject's user-agent (browser) is redirected to. The login provider uses that challenge to fetch information on the OAuth2 request and then accept or reject the requested authentication process.
1336
+ # @param login_challenge [String]
1337
+ # @param [Hash] opts the optional parameters
1338
+ # @return [OAuth2LoginRequest]
1339
+ def admin_get_o_auth2_login_request(login_challenge, opts = {})
1340
+ data, _status_code, _headers = admin_get_o_auth2_login_request_with_http_info(login_challenge, opts)
1341
+ data
1342
+ end
1343
+
1344
+ # Get an OAuth 2.0 Login Request
1345
+ # When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider (sometimes called \&quot;identity provider\&quot;) to authenticate the subject and then tell ORY Hydra now about it. The login provider is an web-app you write and host, and it must be able to authenticate (\&quot;show the subject a login screen\&quot;) a subject (in OAuth2 the proper name for subject is \&quot;resource owner\&quot;). The authentication challenge is appended to the login provider URL to which the subject&#39;s user-agent (browser) is redirected to. The login provider uses that challenge to fetch information on the OAuth2 request and then accept or reject the requested authentication process.
1346
+ # @param login_challenge [String]
1347
+ # @param [Hash] opts the optional parameters
1348
+ # @return [Array<(OAuth2LoginRequest, Integer, Hash)>] OAuth2LoginRequest data, response status code and response headers
1349
+ def admin_get_o_auth2_login_request_with_http_info(login_challenge, opts = {})
1350
+ if @api_client.config.debugging
1351
+ @api_client.config.logger.debug 'Calling API: V0alpha2Api.admin_get_o_auth2_login_request ...'
1352
+ end
1353
+ # verify the required parameter 'login_challenge' is set
1354
+ if @api_client.config.client_side_validation && login_challenge.nil?
1355
+ fail ArgumentError, "Missing the required parameter 'login_challenge' when calling V0alpha2Api.admin_get_o_auth2_login_request"
1356
+ end
1357
+ # resource path
1358
+ local_var_path = '/admin/oauth2/auth/requests/login'
1359
+
1360
+ # query parameters
1361
+ query_params = opts[:query_params] || {}
1362
+ query_params[:'login_challenge'] = login_challenge
1363
+
1364
+ # header parameters
1365
+ header_params = opts[:header_params] || {}
1366
+ # HTTP header 'Accept' (if needed)
1367
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1368
+
1369
+ # form parameters
1370
+ form_params = opts[:form_params] || {}
1371
+
1372
+ # http body (model)
1373
+ post_body = opts[:debug_body]
1374
+
1375
+ # return_type
1376
+ return_type = opts[:debug_return_type] || 'OAuth2LoginRequest'
1377
+
1378
+ # auth_names
1379
+ auth_names = opts[:debug_auth_names] || ['oryAccessToken']
1380
+
1381
+ new_options = opts.merge(
1382
+ :operation => :"V0alpha2Api.admin_get_o_auth2_login_request",
1383
+ :header_params => header_params,
1384
+ :query_params => query_params,
1385
+ :form_params => form_params,
1386
+ :body => post_body,
1387
+ :auth_names => auth_names,
1388
+ :return_type => return_type
1389
+ )
1390
+
1391
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1392
+ if @api_client.config.debugging
1393
+ @api_client.config.logger.debug "API called: V0alpha2Api#admin_get_o_auth2_login_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1394
+ end
1395
+ return data, status_code, headers
1396
+ end
1397
+
1398
+ # Get an OAuth 2.0 Logout Request
1399
+ # Use this endpoint to fetch a logout request.
1400
+ # @param logout_challenge [String]
1401
+ # @param [Hash] opts the optional parameters
1402
+ # @return [OAuth2LogoutRequest]
1403
+ def admin_get_o_auth2_logout_request(logout_challenge, opts = {})
1404
+ data, _status_code, _headers = admin_get_o_auth2_logout_request_with_http_info(logout_challenge, opts)
1405
+ data
1406
+ end
1407
+
1408
+ # Get an OAuth 2.0 Logout Request
1409
+ # Use this endpoint to fetch a logout request.
1410
+ # @param logout_challenge [String]
1411
+ # @param [Hash] opts the optional parameters
1412
+ # @return [Array<(OAuth2LogoutRequest, Integer, Hash)>] OAuth2LogoutRequest data, response status code and response headers
1413
+ def admin_get_o_auth2_logout_request_with_http_info(logout_challenge, opts = {})
1414
+ if @api_client.config.debugging
1415
+ @api_client.config.logger.debug 'Calling API: V0alpha2Api.admin_get_o_auth2_logout_request ...'
1416
+ end
1417
+ # verify the required parameter 'logout_challenge' is set
1418
+ if @api_client.config.client_side_validation && logout_challenge.nil?
1419
+ fail ArgumentError, "Missing the required parameter 'logout_challenge' when calling V0alpha2Api.admin_get_o_auth2_logout_request"
1420
+ end
1421
+ # resource path
1422
+ local_var_path = '/admin/oauth2/auth/requests/logout'
1423
+
1424
+ # query parameters
1425
+ query_params = opts[:query_params] || {}
1426
+ query_params[:'logout_challenge'] = logout_challenge
1427
+
1428
+ # header parameters
1429
+ header_params = opts[:header_params] || {}
1430
+ # HTTP header 'Accept' (if needed)
1431
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1432
+
1433
+ # form parameters
1434
+ form_params = opts[:form_params] || {}
1435
+
1436
+ # http body (model)
1437
+ post_body = opts[:debug_body]
1438
+
1439
+ # return_type
1440
+ return_type = opts[:debug_return_type] || 'OAuth2LogoutRequest'
1441
+
1442
+ # auth_names
1443
+ auth_names = opts[:debug_auth_names] || ['oryAccessToken']
1444
+
1445
+ new_options = opts.merge(
1446
+ :operation => :"V0alpha2Api.admin_get_o_auth2_logout_request",
1447
+ :header_params => header_params,
1448
+ :query_params => query_params,
1449
+ :form_params => form_params,
1450
+ :body => post_body,
1451
+ :auth_names => auth_names,
1452
+ :return_type => return_type
1453
+ )
1454
+
1455
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1456
+ if @api_client.config.debugging
1457
+ @api_client.config.logger.debug "API called: V0alpha2Api#admin_get_o_auth2_logout_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1458
+ end
1459
+ return data, status_code, headers
1460
+ end
1461
+
1462
+ # Get a Trusted OAuth2 JWT Bearer Grant Type Issuer
1463
+ # Use this endpoint to get a trusted JWT Bearer Grant Type Issuer. The ID is the one returned when you created the trust relationship.
1464
+ # @param id [String] The id of the desired grant
1465
+ # @param [Hash] opts the optional parameters
1466
+ # @return [TrustedOAuth2JwtGrantIssuer]
1467
+ def admin_get_trusted_o_auth2_jwt_grant_issuer(id, opts = {})
1468
+ data, _status_code, _headers = admin_get_trusted_o_auth2_jwt_grant_issuer_with_http_info(id, opts)
1469
+ data
1470
+ end
1471
+
1472
+ # Get a Trusted OAuth2 JWT Bearer Grant Type Issuer
1473
+ # Use this endpoint to get a trusted JWT Bearer Grant Type Issuer. The ID is the one returned when you created the trust relationship.
1474
+ # @param id [String] The id of the desired grant
1475
+ # @param [Hash] opts the optional parameters
1476
+ # @return [Array<(TrustedOAuth2JwtGrantIssuer, Integer, Hash)>] TrustedOAuth2JwtGrantIssuer data, response status code and response headers
1477
+ def admin_get_trusted_o_auth2_jwt_grant_issuer_with_http_info(id, opts = {})
1478
+ if @api_client.config.debugging
1479
+ @api_client.config.logger.debug 'Calling API: V0alpha2Api.admin_get_trusted_o_auth2_jwt_grant_issuer ...'
1480
+ end
1481
+ # verify the required parameter 'id' is set
1482
+ if @api_client.config.client_side_validation && id.nil?
1483
+ fail ArgumentError, "Missing the required parameter 'id' when calling V0alpha2Api.admin_get_trusted_o_auth2_jwt_grant_issuer"
1484
+ end
1485
+ # resource path
1486
+ local_var_path = '/admin/trust/grants/jwt-bearer/issuers/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
1487
+
1488
+ # query parameters
1489
+ query_params = opts[:query_params] || {}
1490
+
1491
+ # header parameters
1492
+ header_params = opts[:header_params] || {}
1493
+ # HTTP header 'Accept' (if needed)
1494
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1495
+
1496
+ # form parameters
1497
+ form_params = opts[:form_params] || {}
1498
+
1499
+ # http body (model)
1500
+ post_body = opts[:debug_body]
1501
+
1502
+ # return_type
1503
+ return_type = opts[:debug_return_type] || 'TrustedOAuth2JwtGrantIssuer'
1504
+
1505
+ # auth_names
1506
+ auth_names = opts[:debug_auth_names] || ['oryAccessToken']
1507
+
1508
+ new_options = opts.merge(
1509
+ :operation => :"V0alpha2Api.admin_get_trusted_o_auth2_jwt_grant_issuer",
1510
+ :header_params => header_params,
1511
+ :query_params => query_params,
1512
+ :form_params => form_params,
1513
+ :body => post_body,
1514
+ :auth_names => auth_names,
1515
+ :return_type => return_type
1516
+ )
1517
+
1518
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1519
+ if @api_client.config.debugging
1520
+ @api_client.config.logger.debug "API called: V0alpha2Api#admin_get_trusted_o_auth2_jwt_grant_issuer\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1521
+ end
1522
+ return data, status_code, headers
1523
+ end
1524
+
1525
+ # Introspect OAuth2 Access or Refresh Tokens
1526
+ # The introspection endpoint allows to check if a token (both refresh and access) is active or not. An active token is neither expired nor revoked. If a token is active, additional information on the token will be included. You can set additional data for a token by setting `accessTokenExtra` during the consent flow. For more information [read this blog post](https://www.oauth.com/oauth2-servers/token-introspection-endpoint/).
1527
+ # @param token [String] The string value of the token. For access tokens, this is the \\\&quot;access_token\\\&quot; value returned from the token endpoint defined in OAuth 2.0. For refresh tokens, this is the \\\&quot;refresh_token\\\&quot; value returned.
1528
+ # @param [Hash] opts the optional parameters
1529
+ # @option opts [String] :scope An optional, space separated list of required scopes. If the access token was not granted one of the scopes, the result of active will be false.
1530
+ # @return [IntrospectedOAuth2Token]
1531
+ def admin_introspect_o_auth2_token(token, opts = {})
1532
+ data, _status_code, _headers = admin_introspect_o_auth2_token_with_http_info(token, opts)
1533
+ data
1534
+ end
1535
+
1536
+ # Introspect OAuth2 Access or Refresh Tokens
1537
+ # The introspection endpoint allows to check if a token (both refresh and access) is active or not. An active token is neither expired nor revoked. If a token is active, additional information on the token will be included. You can set additional data for a token by setting &#x60;accessTokenExtra&#x60; during the consent flow. For more information [read this blog post](https://www.oauth.com/oauth2-servers/token-introspection-endpoint/).
1538
+ # @param token [String] The string value of the token. For access tokens, this is the \\\&quot;access_token\\\&quot; value returned from the token endpoint defined in OAuth 2.0. For refresh tokens, this is the \\\&quot;refresh_token\\\&quot; value returned.
1539
+ # @param [Hash] opts the optional parameters
1540
+ # @option opts [String] :scope An optional, space separated list of required scopes. If the access token was not granted one of the scopes, the result of active will be false.
1541
+ # @return [Array<(IntrospectedOAuth2Token, Integer, Hash)>] IntrospectedOAuth2Token data, response status code and response headers
1542
+ def admin_introspect_o_auth2_token_with_http_info(token, opts = {})
1543
+ if @api_client.config.debugging
1544
+ @api_client.config.logger.debug 'Calling API: V0alpha2Api.admin_introspect_o_auth2_token ...'
1545
+ end
1546
+ # verify the required parameter 'token' is set
1547
+ if @api_client.config.client_side_validation && token.nil?
1548
+ fail ArgumentError, "Missing the required parameter 'token' when calling V0alpha2Api.admin_introspect_o_auth2_token"
1549
+ end
1550
+ # resource path
1551
+ local_var_path = '/admin/oauth2/introspect'
1552
+
1553
+ # query parameters
1554
+ query_params = opts[:query_params] || {}
1555
+
1556
+ # header parameters
1557
+ header_params = opts[:header_params] || {}
1558
+ # HTTP header 'Accept' (if needed)
1559
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1560
+ # HTTP header 'Content-Type'
1561
+ content_type = @api_client.select_header_content_type(['application/x-www-form-urlencoded'])
1562
+ if !content_type.nil?
1563
+ header_params['Content-Type'] = content_type
1564
+ end
1565
+
1566
+ # form parameters
1567
+ form_params = opts[:form_params] || {}
1568
+ form_params['token'] = token
1569
+ form_params['scope'] = opts[:'scope'] if !opts[:'scope'].nil?
1570
+
1571
+ # http body (model)
1572
+ post_body = opts[:debug_body]
1573
+
1574
+ # return_type
1575
+ return_type = opts[:debug_return_type] || 'IntrospectedOAuth2Token'
1576
+
1577
+ # auth_names
1578
+ auth_names = opts[:debug_auth_names] || ['oryAccessToken']
1579
+
1580
+ new_options = opts.merge(
1581
+ :operation => :"V0alpha2Api.admin_introspect_o_auth2_token",
1582
+ :header_params => header_params,
1583
+ :query_params => query_params,
1584
+ :form_params => form_params,
1585
+ :body => post_body,
1586
+ :auth_names => auth_names,
1587
+ :return_type => return_type
1588
+ )
1589
+
1590
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
1591
+ if @api_client.config.debugging
1592
+ @api_client.config.logger.debug "API called: V0alpha2Api#admin_introspect_o_auth2_token\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1593
+ end
1594
+ return data, status_code, headers
1595
+ end
1596
+
1597
+ # List Identities
1598
+ # Lists all identities. Does not support search at the moment. Learn how identities work in [Ory Kratos' User And Identity Model Documentation](https://www.ory.sh/docs/next/kratos/concepts/identity-user-model).
1599
+ # @param [Hash] opts the optional parameters
1600
+ # @option opts [Integer] :per_page Items per Page This is the number of items per page. (default to 250)
1601
+ # @option opts [Integer] :page Pagination Page This value is currently an integer, but it is not sequential. The value is not the page number, but a reference. The next page can be any number and some numbers might return an empty list. For example, page 2 might not follow after page 1. And even if page 3 and 5 exist, but page 4 might not exist. (default to 1)
1602
+ # @return [Array<Identity>]
1603
+ def admin_list_identities(opts = {})
1604
+ data, _status_code, _headers = admin_list_identities_with_http_info(opts)
1605
+ data
1606
+ end
1607
+
1608
+ # List Identities
1609
+ # Lists all identities. Does not support search at the moment. Learn how identities work in [Ory Kratos&#39; User And Identity Model Documentation](https://www.ory.sh/docs/next/kratos/concepts/identity-user-model).
1610
+ # @param [Hash] opts the optional parameters
1611
+ # @option opts [Integer] :per_page Items per Page This is the number of items per page. (default to 250)
1612
+ # @option opts [Integer] :page Pagination Page This value is currently an integer, but it is not sequential. The value is not the page number, but a reference. The next page can be any number and some numbers might return an empty list. For example, page 2 might not follow after page 1. And even if page 3 and 5 exist, but page 4 might not exist. (default to 1)
1613
+ # @return [Array<(Array<Identity>, Integer, Hash)>] Array<Identity> data, response status code and response headers
1614
+ def admin_list_identities_with_http_info(opts = {})
1615
+ if @api_client.config.debugging
1616
+ @api_client.config.logger.debug 'Calling API: V0alpha2Api.admin_list_identities ...'
1617
+ end
1618
+ if @api_client.config.client_side_validation && !opts[:'per_page'].nil? && opts[:'per_page'] > 1000
1619
+ fail ArgumentError, 'invalid value for "opts[:"per_page"]" when calling V0alpha2Api.admin_list_identities, must be smaller than or equal to 1000.'
1620
+ end
1621
+
1622
+ if @api_client.config.client_side_validation && !opts[:'per_page'].nil? && opts[:'per_page'] < 1
1623
+ fail ArgumentError, 'invalid value for "opts[:"per_page"]" when calling V0alpha2Api.admin_list_identities, must be greater than or equal to 1.'
1624
+ end
1625
+
1626
+ if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
1627
+ fail ArgumentError, 'invalid value for "opts[:"page"]" when calling V0alpha2Api.admin_list_identities, must be greater than or equal to 1.'
1628
+ end
1629
+
1630
+ # resource path
1631
+ local_var_path = '/admin/identities'
1632
+
1633
+ # query parameters
1634
+ query_params = opts[:query_params] || {}
1635
+ query_params[:'per_page'] = opts[:'per_page'] if !opts[:'per_page'].nil?
1636
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
1637
+
1638
+ # header parameters
1639
+ header_params = opts[:header_params] || {}
1640
+ # HTTP header 'Accept' (if needed)
1641
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1642
+
1643
+ # form parameters
1644
+ form_params = opts[:form_params] || {}
1645
+
1646
+ # http body (model)
1647
+ post_body = opts[:debug_body]
1648
+
1649
+ # return_type
1650
+ return_type = opts[:debug_return_type] || 'Array<Identity>'
1651
+
1652
+ # auth_names
1653
+ auth_names = opts[:debug_auth_names] || ['oryAccessToken']
1654
+
1655
+ new_options = opts.merge(
1656
+ :operation => :"V0alpha2Api.admin_list_identities",
1657
+ :header_params => header_params,
1658
+ :query_params => query_params,
1659
+ :form_params => form_params,
1660
+ :body => post_body,
1661
+ :auth_names => auth_names,
1662
+ :return_type => return_type
1663
+ )
1664
+
1665
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1666
+ if @api_client.config.debugging
1667
+ @api_client.config.logger.debug "API called: V0alpha2Api#admin_list_identities\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1668
+ end
1669
+ return data, status_code, headers
1670
+ end
1671
+
1672
+ # This endpoint returns all sessions that belong to the given Identity.
1673
+ # This endpoint is useful for: Listing all sessions that belong to an Identity in an administrative context.
1674
+ # @param id [String] ID is the identity&#39;s ID.
1675
+ # @param [Hash] opts the optional parameters
1676
+ # @option opts [Integer] :per_page Items per Page This is the number of items per page. (default to 250)
1677
+ # @option opts [Integer] :page Pagination Page This value is currently an integer, but it is not sequential. The value is not the page number, but a reference. The next page can be any number and some numbers might return an empty list. For example, page 2 might not follow after page 1. And even if page 3 and 5 exist, but page 4 might not exist. (default to 1)
1678
+ # @option opts [Boolean] :active Active is a boolean flag that filters out sessions based on the state. If no value is provided, all sessions are returned.
1679
+ # @return [Array<Session>]
1680
+ def admin_list_identity_sessions(id, opts = {})
1681
+ data, _status_code, _headers = admin_list_identity_sessions_with_http_info(id, opts)
1682
+ data
1683
+ end
1684
+
1685
+ # This endpoint returns all sessions that belong to the given Identity.
1686
+ # This endpoint is useful for: Listing all sessions that belong to an Identity in an administrative context.
1687
+ # @param id [String] ID is the identity&#39;s ID.
1688
+ # @param [Hash] opts the optional parameters
1689
+ # @option opts [Integer] :per_page Items per Page This is the number of items per page. (default to 250)
1690
+ # @option opts [Integer] :page Pagination Page This value is currently an integer, but it is not sequential. The value is not the page number, but a reference. The next page can be any number and some numbers might return an empty list. For example, page 2 might not follow after page 1. And even if page 3 and 5 exist, but page 4 might not exist. (default to 1)
1691
+ # @option opts [Boolean] :active Active is a boolean flag that filters out sessions based on the state. If no value is provided, all sessions are returned.
1692
+ # @return [Array<(Array<Session>, Integer, Hash)>] Array<Session> data, response status code and response headers
1693
+ def admin_list_identity_sessions_with_http_info(id, opts = {})
1694
+ if @api_client.config.debugging
1695
+ @api_client.config.logger.debug 'Calling API: V0alpha2Api.admin_list_identity_sessions ...'
1696
+ end
1697
+ # verify the required parameter 'id' is set
1698
+ if @api_client.config.client_side_validation && id.nil?
1699
+ fail ArgumentError, "Missing the required parameter 'id' when calling V0alpha2Api.admin_list_identity_sessions"
1700
+ end
1701
+ if @api_client.config.client_side_validation && !opts[:'per_page'].nil? && opts[:'per_page'] > 1000
1702
+ fail ArgumentError, 'invalid value for "opts[:"per_page"]" when calling V0alpha2Api.admin_list_identity_sessions, must be smaller than or equal to 1000.'
1703
+ end
1704
+
1705
+ if @api_client.config.client_side_validation && !opts[:'per_page'].nil? && opts[:'per_page'] < 1
1706
+ fail ArgumentError, 'invalid value for "opts[:"per_page"]" when calling V0alpha2Api.admin_list_identity_sessions, must be greater than or equal to 1.'
1707
+ end
1708
+
1709
+ if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
1710
+ fail ArgumentError, 'invalid value for "opts[:"page"]" when calling V0alpha2Api.admin_list_identity_sessions, must be greater than or equal to 1.'
1711
+ end
1712
+
1713
+ # resource path
1714
+ local_var_path = '/admin/identities/{id}/sessions'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
1715
+
1716
+ # query parameters
1717
+ query_params = opts[:query_params] || {}
1718
+ query_params[:'per_page'] = opts[:'per_page'] if !opts[:'per_page'].nil?
1719
+ query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
1720
+ query_params[:'active'] = opts[:'active'] if !opts[:'active'].nil?
1721
+
1722
+ # header parameters
1723
+ header_params = opts[:header_params] || {}
1724
+ # HTTP header 'Accept' (if needed)
1725
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1726
+
1727
+ # form parameters
1728
+ form_params = opts[:form_params] || {}
1729
+
1730
+ # http body (model)
1731
+ post_body = opts[:debug_body]
1732
+
1733
+ # return_type
1734
+ return_type = opts[:debug_return_type] || 'Array<Session>'
1735
+
1736
+ # auth_names
1737
+ auth_names = opts[:debug_auth_names] || ['oryAccessToken']
1738
+
1739
+ new_options = opts.merge(
1740
+ :operation => :"V0alpha2Api.admin_list_identity_sessions",
1741
+ :header_params => header_params,
1742
+ :query_params => query_params,
1743
+ :form_params => form_params,
1744
+ :body => post_body,
1745
+ :auth_names => auth_names,
1746
+ :return_type => return_type
1747
+ )
1748
+
1749
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1750
+ if @api_client.config.debugging
1751
+ @api_client.config.logger.debug "API called: V0alpha2Api#admin_list_identity_sessions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1752
+ end
1753
+ return data, status_code, headers
1754
+ end
1755
+
1756
+ # List OAuth 2.0 Clients
1757
+ # This endpoint lists all clients in the database, and never returns client secrets. As a default it lists the first 100 clients. The `limit` parameter can be used to retrieve more clients, but it has an upper bound at 500 objects. Pagination should be used to retrieve more than 500 objects. OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. The \"Link\" header is also included in successful responses, which contains one or more links for pagination, formatted like so: '<https://project-slug.projects.oryapis.com/admin/clients?limit={limit}&offset={offset}>; rel=\"{page}\"', where page is one of the following applicable pages: 'first', 'next', 'last', and 'previous'. Multiple links can be included in this header, and will be separated by a comma.
1758
+ # @param [Hash] opts the optional parameters
1759
+ # @option opts [Integer] :page_size Items per page This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (default to 250)
1760
+ # @option opts [String] :page_token Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (default to '1')
1761
+ # @option opts [String] :client_name The name of the clients to filter by.
1762
+ # @option opts [String] :owner The owner of the clients to filter by.
1763
+ # @return [Array<OAuth2Client>]
1764
+ def admin_list_o_auth2_clients(opts = {})
1765
+ data, _status_code, _headers = admin_list_o_auth2_clients_with_http_info(opts)
1766
+ data
1767
+ end
1768
+
1769
+ # List OAuth 2.0 Clients
1770
+ # This endpoint lists all clients in the database, and never returns client secrets. As a default it lists the first 100 clients. The &#x60;limit&#x60; parameter can be used to retrieve more clients, but it has an upper bound at 500 objects. Pagination should be used to retrieve more than 500 objects. OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities. The \&quot;Link\&quot; header is also included in successful responses, which contains one or more links for pagination, formatted like so: &#39;&lt;https://project-slug.projects.oryapis.com/admin/clients?limit&#x3D;{limit}&amp;offset&#x3D;{offset}&gt;; rel&#x3D;\&quot;{page}\&quot;&#39;, where page is one of the following applicable pages: &#39;first&#39;, &#39;next&#39;, &#39;last&#39;, and &#39;previous&#39;. Multiple links can be included in this header, and will be separated by a comma.
1771
+ # @param [Hash] opts the optional parameters
1772
+ # @option opts [Integer] :page_size Items per page This is the number of items per page to return. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (default to 250)
1773
+ # @option opts [String] :page_token Next Page Token The next page token. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination). (default to '1')
1774
+ # @option opts [String] :client_name The name of the clients to filter by.
1775
+ # @option opts [String] :owner The owner of the clients to filter by.
1776
+ # @return [Array<(Array<OAuth2Client>, Integer, Hash)>] Array<OAuth2Client> data, response status code and response headers
1777
+ def admin_list_o_auth2_clients_with_http_info(opts = {})
1778
+ if @api_client.config.debugging
1779
+ @api_client.config.logger.debug 'Calling API: V0alpha2Api.admin_list_o_auth2_clients ...'
1780
+ end
1781
+ if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] > 1000
1782
+ fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling V0alpha2Api.admin_list_o_auth2_clients, must be smaller than or equal to 1000.'
1783
+ end
1784
+
1785
+ if @api_client.config.client_side_validation && !opts[:'page_size'].nil? && opts[:'page_size'] < 1
1786
+ fail ArgumentError, 'invalid value for "opts[:"page_size"]" when calling V0alpha2Api.admin_list_o_auth2_clients, must be greater than or equal to 1.'
1787
+ end
1788
+
1789
+ # resource path
1790
+ local_var_path = '/admin/clients'
1791
+
1792
+ # query parameters
1793
+ query_params = opts[:query_params] || {}
1794
+ query_params[:'page_size'] = opts[:'page_size'] if !opts[:'page_size'].nil?
1795
+ query_params[:'page_token'] = opts[:'page_token'] if !opts[:'page_token'].nil?
1796
+ query_params[:'client_name'] = opts[:'client_name'] if !opts[:'client_name'].nil?
1797
+ query_params[:'owner'] = opts[:'owner'] if !opts[:'owner'].nil?
1798
+
1799
+ # header parameters
1800
+ header_params = opts[:header_params] || {}
1801
+ # HTTP header 'Accept' (if needed)
1802
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1803
+
1804
+ # form parameters
1805
+ form_params = opts[:form_params] || {}
1806
+
1807
+ # http body (model)
1808
+ post_body = opts[:debug_body]
1809
+
1810
+ # return_type
1811
+ return_type = opts[:debug_return_type] || 'Array<OAuth2Client>'
1812
+
1813
+ # auth_names
1814
+ auth_names = opts[:debug_auth_names] || ['oryAccessToken']
1815
+
1816
+ new_options = opts.merge(
1817
+ :operation => :"V0alpha2Api.admin_list_o_auth2_clients",
1818
+ :header_params => header_params,
1819
+ :query_params => query_params,
1820
+ :form_params => form_params,
1821
+ :body => post_body,
1822
+ :auth_names => auth_names,
1823
+ :return_type => return_type
1824
+ )
1825
+
1826
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1827
+ if @api_client.config.debugging
1828
+ @api_client.config.logger.debug "API called: V0alpha2Api#admin_list_o_auth2_clients\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1829
+ end
1830
+ return data, status_code, headers
1831
+ end
1832
+
1833
+ # List OAuth 2.0 Consent Sessions of a Subject
1834
+ # This endpoint lists all subject's granted consent sessions, including client and granted scope. If the subject is unknown or has not granted any consent sessions yet, the endpoint returns an empty JSON array with status code 200 OK. The \"Link\" header is also included in successful responses, which contains one or more links for pagination, formatted like so: '<https://hydra-url/admin/oauth2/auth/sessions/consent?subject={user}&limit={limit}&offset={offset}>; rel=\"{page}\"', where page is one of the following applicable pages: 'first', 'next', 'last', and 'previous'. Multiple links can be included in this header, and will be separated by a comma.
1835
+ # @param subject [String] The subject to list the consent sessions for.
1836
+ # @param [Hash] opts the optional parameters
1837
+ # @option opts [String] :link The link header contains pagination links. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination).
1838
+ # @option opts [String] :x_total_count The total number of clients.
1839
+ # @return [Array<PreviousOAuth2ConsentSession>]
1840
+ def admin_list_o_auth2_subject_consent_sessions(subject, opts = {})
1841
+ data, _status_code, _headers = admin_list_o_auth2_subject_consent_sessions_with_http_info(subject, opts)
1842
+ data
1843
+ end
1844
+
1845
+ # List OAuth 2.0 Consent Sessions of a Subject
1846
+ # This endpoint lists all subject&#39;s granted consent sessions, including client and granted scope. If the subject is unknown or has not granted any consent sessions yet, the endpoint returns an empty JSON array with status code 200 OK. The \&quot;Link\&quot; header is also included in successful responses, which contains one or more links for pagination, formatted like so: &#39;&lt;https://hydra-url/admin/oauth2/auth/sessions/consent?subject&#x3D;{user}&amp;limit&#x3D;{limit}&amp;offset&#x3D;{offset}&gt;; rel&#x3D;\&quot;{page}\&quot;&#39;, where page is one of the following applicable pages: &#39;first&#39;, &#39;next&#39;, &#39;last&#39;, and &#39;previous&#39;. Multiple links can be included in this header, and will be separated by a comma.
1847
+ # @param subject [String] The subject to list the consent sessions for.
1848
+ # @param [Hash] opts the optional parameters
1849
+ # @option opts [String] :link The link header contains pagination links. For details on pagination please head over to the [pagination documentation](https://www.ory.sh/docs/ecosystem/api-design#pagination).
1850
+ # @option opts [String] :x_total_count The total number of clients.
1851
+ # @return [Array<(Array<PreviousOAuth2ConsentSession>, Integer, Hash)>] Array<PreviousOAuth2ConsentSession> data, response status code and response headers
1852
+ def admin_list_o_auth2_subject_consent_sessions_with_http_info(subject, opts = {})
1853
+ if @api_client.config.debugging
1854
+ @api_client.config.logger.debug 'Calling API: V0alpha2Api.admin_list_o_auth2_subject_consent_sessions ...'
1855
+ end
1856
+ # verify the required parameter 'subject' is set
1857
+ if @api_client.config.client_side_validation && subject.nil?
1858
+ fail ArgumentError, "Missing the required parameter 'subject' when calling V0alpha2Api.admin_list_o_auth2_subject_consent_sessions"
1859
+ end
1860
+ # resource path
1861
+ local_var_path = '/admin/oauth2/auth/sessions/consent'
1862
+
1863
+ # query parameters
1864
+ query_params = opts[:query_params] || {}
1865
+ query_params[:'subject'] = subject
1866
+
1867
+ # header parameters
1868
+ header_params = opts[:header_params] || {}
1869
+ # HTTP header 'Accept' (if needed)
1870
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1871
+ header_params[:'link'] = opts[:'link'] if !opts[:'link'].nil?
1872
+ header_params[:'x-total-count'] = opts[:'x_total_count'] if !opts[:'x_total_count'].nil?
1873
+
1874
+ # form parameters
1875
+ form_params = opts[:form_params] || {}
1876
+
1877
+ # http body (model)
1878
+ post_body = opts[:debug_body]
1879
+
1880
+ # return_type
1881
+ return_type = opts[:debug_return_type] || 'Array<PreviousOAuth2ConsentSession>'
1882
+
1883
+ # auth_names
1884
+ auth_names = opts[:debug_auth_names] || ['oryAccessToken']
1885
+
1886
+ new_options = opts.merge(
1887
+ :operation => :"V0alpha2Api.admin_list_o_auth2_subject_consent_sessions",
1888
+ :header_params => header_params,
1889
+ :query_params => query_params,
1890
+ :form_params => form_params,
1891
+ :body => post_body,
1892
+ :auth_names => auth_names,
1893
+ :return_type => return_type
1894
+ )
1895
+
1896
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1897
+ if @api_client.config.debugging
1898
+ @api_client.config.logger.debug "API called: V0alpha2Api#admin_list_o_auth2_subject_consent_sessions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1899
+ end
1900
+ return data, status_code, headers
1901
+ end
1902
+
1903
+ # List Trusted OAuth2 JWT Bearer Grant Type Issuers
1904
+ # Use this endpoint to list all trusted JWT Bearer Grant Type Issuers.
1905
+ # @param [Hash] opts the optional parameters
1906
+ # @option opts [Integer] :max_items
1907
+ # @option opts [Integer] :default_items
1908
+ # @option opts [String] :issuer If optional \&quot;issuer\&quot; is supplied, only jwt-bearer grants with this issuer will be returned.
1909
+ # @option opts [Integer] :limit The maximum amount of policies returned, upper bound is 500 policies
1910
+ # @option opts [Integer] :offset The offset from where to start looking.
1911
+ # @return [Array<TrustedOAuth2JwtGrantIssuer>]
1912
+ def admin_list_trusted_o_auth2_jwt_grant_issuers(opts = {})
1913
+ data, _status_code, _headers = admin_list_trusted_o_auth2_jwt_grant_issuers_with_http_info(opts)
1914
+ data
1915
+ end
1916
+
1917
+ # List Trusted OAuth2 JWT Bearer Grant Type Issuers
1918
+ # Use this endpoint to list all trusted JWT Bearer Grant Type Issuers.
1919
+ # @param [Hash] opts the optional parameters
1920
+ # @option opts [Integer] :max_items
1921
+ # @option opts [Integer] :default_items
1922
+ # @option opts [String] :issuer If optional \&quot;issuer\&quot; is supplied, only jwt-bearer grants with this issuer will be returned.
1923
+ # @option opts [Integer] :limit The maximum amount of policies returned, upper bound is 500 policies
1924
+ # @option opts [Integer] :offset The offset from where to start looking.
1925
+ # @return [Array<(Array<TrustedOAuth2JwtGrantIssuer>, Integer, Hash)>] Array<TrustedOAuth2JwtGrantIssuer> data, response status code and response headers
1926
+ def admin_list_trusted_o_auth2_jwt_grant_issuers_with_http_info(opts = {})
1927
+ if @api_client.config.debugging
1928
+ @api_client.config.logger.debug 'Calling API: V0alpha2Api.admin_list_trusted_o_auth2_jwt_grant_issuers ...'
1929
+ end
1930
+ # resource path
1931
+ local_var_path = '/admin/trust/grants/jwt-bearer/issuers'
1932
+
1933
+ # query parameters
1934
+ query_params = opts[:query_params] || {}
1935
+ query_params[:'MaxItems'] = opts[:'max_items'] if !opts[:'max_items'].nil?
1936
+ query_params[:'DefaultItems'] = opts[:'default_items'] if !opts[:'default_items'].nil?
1937
+ query_params[:'issuer'] = opts[:'issuer'] if !opts[:'issuer'].nil?
1938
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
1939
+ query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
1940
+
1941
+ # header parameters
1942
+ header_params = opts[:header_params] || {}
1943
+ # HTTP header 'Accept' (if needed)
1944
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1945
+
1946
+ # form parameters
1947
+ form_params = opts[:form_params] || {}
1948
+
1949
+ # http body (model)
1950
+ post_body = opts[:debug_body]
1951
+
1952
+ # return_type
1953
+ return_type = opts[:debug_return_type] || 'Array<TrustedOAuth2JwtGrantIssuer>'
1954
+
1955
+ # auth_names
1956
+ auth_names = opts[:debug_auth_names] || ['oryAccessToken']
1957
+
1958
+ new_options = opts.merge(
1959
+ :operation => :"V0alpha2Api.admin_list_trusted_o_auth2_jwt_grant_issuers",
1960
+ :header_params => header_params,
1961
+ :query_params => query_params,
1962
+ :form_params => form_params,
1963
+ :body => post_body,
1964
+ :auth_names => auth_names,
1965
+ :return_type => return_type
1966
+ )
1967
+
1968
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1969
+ if @api_client.config.debugging
1970
+ @api_client.config.logger.debug "API called: V0alpha2Api#admin_list_trusted_o_auth2_jwt_grant_issuers\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1971
+ end
1972
+ return data, status_code, headers
1973
+ end
1974
+
1975
+ # Partially updates an Identity's field using [JSON Patch](https://jsonpatch.com/)
1976
+ # NOTE: The fields `id`, `stateChangedAt` and `credentials` are not updateable. Learn how identities work in [Ory Kratos' User And Identity Model Documentation](https://www.ory.sh/docs/next/kratos/concepts/identity-user-model).
1977
+ # @param id [String] ID must be set to the ID of identity you want to update
1978
+ # @param [Hash] opts the optional parameters
1979
+ # @option opts [Array<JsonPatch>] :json_patch
1980
+ # @return [Identity]
1981
+ def admin_patch_identity(id, opts = {})
1982
+ data, _status_code, _headers = admin_patch_identity_with_http_info(id, opts)
1983
+ data
1984
+ end
1985
+
1986
+ # Partially updates an Identity&#39;s field using [JSON Patch](https://jsonpatch.com/)
1987
+ # NOTE: The fields &#x60;id&#x60;, &#x60;stateChangedAt&#x60; and &#x60;credentials&#x60; are not updateable. Learn how identities work in [Ory Kratos&#39; User And Identity Model Documentation](https://www.ory.sh/docs/next/kratos/concepts/identity-user-model).
1988
+ # @param id [String] ID must be set to the ID of identity you want to update
1989
+ # @param [Hash] opts the optional parameters
1990
+ # @option opts [Array<JsonPatch>] :json_patch
1991
+ # @return [Array<(Identity, Integer, Hash)>] Identity data, response status code and response headers
1992
+ def admin_patch_identity_with_http_info(id, opts = {})
1993
+ if @api_client.config.debugging
1994
+ @api_client.config.logger.debug 'Calling API: V0alpha2Api.admin_patch_identity ...'
1995
+ end
1996
+ # verify the required parameter 'id' is set
1997
+ if @api_client.config.client_side_validation && id.nil?
1998
+ fail ArgumentError, "Missing the required parameter 'id' when calling V0alpha2Api.admin_patch_identity"
1999
+ end
2000
+ # resource path
2001
+ local_var_path = '/admin/identities/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
2002
+
2003
+ # query parameters
2004
+ query_params = opts[:query_params] || {}
2005
+
2006
+ # header parameters
2007
+ header_params = opts[:header_params] || {}
2008
+ # HTTP header 'Accept' (if needed)
2009
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
2010
+ # HTTP header 'Content-Type'
2011
+ content_type = @api_client.select_header_content_type(['application/json'])
2012
+ if !content_type.nil?
2013
+ header_params['Content-Type'] = content_type
2014
+ end
2015
+
2016
+ # form parameters
2017
+ form_params = opts[:form_params] || {}
2018
+
2019
+ # http body (model)
2020
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'json_patch'])
2021
+
2022
+ # return_type
2023
+ return_type = opts[:debug_return_type] || 'Identity'
2024
+
2025
+ # auth_names
2026
+ auth_names = opts[:debug_auth_names] || ['oryAccessToken']
2027
+
2028
+ new_options = opts.merge(
2029
+ :operation => :"V0alpha2Api.admin_patch_identity",
2030
+ :header_params => header_params,
2031
+ :query_params => query_params,
2032
+ :form_params => form_params,
2033
+ :body => post_body,
2034
+ :auth_names => auth_names,
2035
+ :return_type => return_type
2036
+ )
2037
+
2038
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
2039
+ if @api_client.config.debugging
2040
+ @api_client.config.logger.debug "API called: V0alpha2Api#admin_patch_identity\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2041
+ end
2042
+ return data, status_code, headers
2043
+ end
2044
+
2045
+ # Patch an OAuth 2.0 Client
2046
+ # Patch an existing OAuth 2.0 Client. If you pass `client_secret` the secret will be updated and returned via the API. This is the only time you will be able to retrieve the client secret, so write it down and keep it safe. OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities.
2047
+ # @param id [String] The id of the OAuth 2.0 Client.
2048
+ # @param json_patch [Array<JsonPatch>]
2049
+ # @param [Hash] opts the optional parameters
2050
+ # @return [OAuth2Client]
2051
+ def admin_patch_o_auth2_client(id, json_patch, opts = {})
2052
+ data, _status_code, _headers = admin_patch_o_auth2_client_with_http_info(id, json_patch, opts)
2053
+ data
2054
+ end
2055
+
2056
+ # Patch an OAuth 2.0 Client
2057
+ # Patch an existing OAuth 2.0 Client. If you pass &#x60;client_secret&#x60; the secret will be updated and returned via the API. This is the only time you will be able to retrieve the client secret, so write it down and keep it safe. OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities.
2058
+ # @param id [String] The id of the OAuth 2.0 Client.
2059
+ # @param json_patch [Array<JsonPatch>]
2060
+ # @param [Hash] opts the optional parameters
2061
+ # @return [Array<(OAuth2Client, Integer, Hash)>] OAuth2Client data, response status code and response headers
2062
+ def admin_patch_o_auth2_client_with_http_info(id, json_patch, opts = {})
2063
+ if @api_client.config.debugging
2064
+ @api_client.config.logger.debug 'Calling API: V0alpha2Api.admin_patch_o_auth2_client ...'
2065
+ end
2066
+ # verify the required parameter 'id' is set
2067
+ if @api_client.config.client_side_validation && id.nil?
2068
+ fail ArgumentError, "Missing the required parameter 'id' when calling V0alpha2Api.admin_patch_o_auth2_client"
2069
+ end
2070
+ # verify the required parameter 'json_patch' is set
2071
+ if @api_client.config.client_side_validation && json_patch.nil?
2072
+ fail ArgumentError, "Missing the required parameter 'json_patch' when calling V0alpha2Api.admin_patch_o_auth2_client"
2073
+ end
2074
+ # resource path
2075
+ local_var_path = '/admin/clients/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
2076
+
2077
+ # query parameters
2078
+ query_params = opts[:query_params] || {}
2079
+
2080
+ # header parameters
2081
+ header_params = opts[:header_params] || {}
2082
+ # HTTP header 'Accept' (if needed)
2083
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
2084
+ # HTTP header 'Content-Type'
2085
+ content_type = @api_client.select_header_content_type(['application/json'])
2086
+ if !content_type.nil?
2087
+ header_params['Content-Type'] = content_type
2088
+ end
2089
+
2090
+ # form parameters
2091
+ form_params = opts[:form_params] || {}
2092
+
2093
+ # http body (model)
2094
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(json_patch)
2095
+
2096
+ # return_type
2097
+ return_type = opts[:debug_return_type] || 'OAuth2Client'
2098
+
2099
+ # auth_names
2100
+ auth_names = opts[:debug_auth_names] || ['oryAccessToken']
2101
+
2102
+ new_options = opts.merge(
2103
+ :operation => :"V0alpha2Api.admin_patch_o_auth2_client",
2104
+ :header_params => header_params,
2105
+ :query_params => query_params,
2106
+ :form_params => form_params,
2107
+ :body => post_body,
2108
+ :auth_names => auth_names,
2109
+ :return_type => return_type
2110
+ )
2111
+
2112
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
2113
+ if @api_client.config.debugging
2114
+ @api_client.config.logger.debug "API called: V0alpha2Api#admin_patch_o_auth2_client\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2115
+ end
2116
+ return data, status_code, headers
2117
+ end
2118
+
2119
+ # Reject an OAuth 2.0 Consent Request
2120
+ # When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider to authenticate the subject and then tell ORY Hydra now about it. If the subject authenticated, he/she must now be asked if the OAuth 2.0 Client which initiated the flow should be allowed to access the resources on the subject's behalf. The consent provider which handles this request and is a web app implemented and hosted by you. It shows a subject interface which asks the subject to grant or deny the client access to the requested scope (\"Application my-dropbox-app wants write access to all your private files\"). The consent challenge is appended to the consent provider's URL to which the subject's user-agent (browser) is redirected to. The consent provider uses that challenge to fetch information on the OAuth2 request and then tells ORY Hydra if the subject accepted or rejected the request. This endpoint tells ORY Hydra that the subject has not authorized the OAuth 2.0 client to access resources on his/her behalf. The consent provider must include a reason why the consent was not granted. The response contains a redirect URL which the consent provider should redirect the user-agent to.
2121
+ # @param consent_challenge [String]
2122
+ # @param [Hash] opts the optional parameters
2123
+ # @option opts [RejectOAuth2Request] :reject_o_auth2_request
2124
+ # @return [SuccessfulOAuth2RequestResponse]
2125
+ def admin_reject_o_auth2_consent_request(consent_challenge, opts = {})
2126
+ data, _status_code, _headers = admin_reject_o_auth2_consent_request_with_http_info(consent_challenge, opts)
2127
+ data
2128
+ end
2129
+
2130
+ # Reject an OAuth 2.0 Consent Request
2131
+ # When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider to authenticate the subject and then tell ORY Hydra now about it. If the subject authenticated, he/she must now be asked if the OAuth 2.0 Client which initiated the flow should be allowed to access the resources on the subject&#39;s behalf. The consent provider which handles this request and is a web app implemented and hosted by you. It shows a subject interface which asks the subject to grant or deny the client access to the requested scope (\&quot;Application my-dropbox-app wants write access to all your private files\&quot;). The consent challenge is appended to the consent provider&#39;s URL to which the subject&#39;s user-agent (browser) is redirected to. The consent provider uses that challenge to fetch information on the OAuth2 request and then tells ORY Hydra if the subject accepted or rejected the request. This endpoint tells ORY Hydra that the subject has not authorized the OAuth 2.0 client to access resources on his/her behalf. The consent provider must include a reason why the consent was not granted. The response contains a redirect URL which the consent provider should redirect the user-agent to.
2132
+ # @param consent_challenge [String]
2133
+ # @param [Hash] opts the optional parameters
2134
+ # @option opts [RejectOAuth2Request] :reject_o_auth2_request
2135
+ # @return [Array<(SuccessfulOAuth2RequestResponse, Integer, Hash)>] SuccessfulOAuth2RequestResponse data, response status code and response headers
2136
+ def admin_reject_o_auth2_consent_request_with_http_info(consent_challenge, opts = {})
2137
+ if @api_client.config.debugging
2138
+ @api_client.config.logger.debug 'Calling API: V0alpha2Api.admin_reject_o_auth2_consent_request ...'
2139
+ end
2140
+ # verify the required parameter 'consent_challenge' is set
2141
+ if @api_client.config.client_side_validation && consent_challenge.nil?
2142
+ fail ArgumentError, "Missing the required parameter 'consent_challenge' when calling V0alpha2Api.admin_reject_o_auth2_consent_request"
2143
+ end
2144
+ # resource path
2145
+ local_var_path = '/admin/oauth2/auth/requests/consent/reject'
2146
+
2147
+ # query parameters
2148
+ query_params = opts[:query_params] || {}
2149
+ query_params[:'consent_challenge'] = consent_challenge
2150
+
2151
+ # header parameters
2152
+ header_params = opts[:header_params] || {}
2153
+ # HTTP header 'Accept' (if needed)
2154
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
2155
+ # HTTP header 'Content-Type'
2156
+ content_type = @api_client.select_header_content_type(['application/json'])
2157
+ if !content_type.nil?
2158
+ header_params['Content-Type'] = content_type
2159
+ end
2160
+
2161
+ # form parameters
2162
+ form_params = opts[:form_params] || {}
2163
+
2164
+ # http body (model)
2165
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'reject_o_auth2_request'])
2166
+
2167
+ # return_type
2168
+ return_type = opts[:debug_return_type] || 'SuccessfulOAuth2RequestResponse'
2169
+
2170
+ # auth_names
2171
+ auth_names = opts[:debug_auth_names] || ['oryAccessToken']
2172
+
2173
+ new_options = opts.merge(
2174
+ :operation => :"V0alpha2Api.admin_reject_o_auth2_consent_request",
2175
+ :header_params => header_params,
2176
+ :query_params => query_params,
2177
+ :form_params => form_params,
2178
+ :body => post_body,
2179
+ :auth_names => auth_names,
2180
+ :return_type => return_type
2181
+ )
2182
+
2183
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
2184
+ if @api_client.config.debugging
2185
+ @api_client.config.logger.debug "API called: V0alpha2Api#admin_reject_o_auth2_consent_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2186
+ end
2187
+ return data, status_code, headers
2188
+ end
2189
+
2190
+ # Reject an OAuth 2.0 Login Request
2191
+ # When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider (sometimes called \"identity provider\") to authenticate the subject and then tell ORY Hydra now about it. The login provider is an web-app you write and host, and it must be able to authenticate (\"show the subject a login screen\") a subject (in OAuth2 the proper name for subject is \"resource owner\"). The authentication challenge is appended to the login provider URL to which the subject's user-agent (browser) is redirected to. The login provider uses that challenge to fetch information on the OAuth2 request and then accept or reject the requested authentication process. This endpoint tells ORY Hydra that the subject has not authenticated and includes a reason why the authentication was denied. The response contains a redirect URL which the login provider should redirect the user-agent to.
2192
+ # @param login_challenge [String]
2193
+ # @param [Hash] opts the optional parameters
2194
+ # @option opts [RejectOAuth2Request] :reject_o_auth2_request
2195
+ # @return [SuccessfulOAuth2RequestResponse]
2196
+ def admin_reject_o_auth2_login_request(login_challenge, opts = {})
2197
+ data, _status_code, _headers = admin_reject_o_auth2_login_request_with_http_info(login_challenge, opts)
2198
+ data
2199
+ end
2200
+
2201
+ # Reject an OAuth 2.0 Login Request
2202
+ # When an authorization code, hybrid, or implicit OAuth 2.0 Flow is initiated, ORY Hydra asks the login provider (sometimes called \&quot;identity provider\&quot;) to authenticate the subject and then tell ORY Hydra now about it. The login provider is an web-app you write and host, and it must be able to authenticate (\&quot;show the subject a login screen\&quot;) a subject (in OAuth2 the proper name for subject is \&quot;resource owner\&quot;). The authentication challenge is appended to the login provider URL to which the subject&#39;s user-agent (browser) is redirected to. The login provider uses that challenge to fetch information on the OAuth2 request and then accept or reject the requested authentication process. This endpoint tells ORY Hydra that the subject has not authenticated and includes a reason why the authentication was denied. The response contains a redirect URL which the login provider should redirect the user-agent to.
2203
+ # @param login_challenge [String]
2204
+ # @param [Hash] opts the optional parameters
2205
+ # @option opts [RejectOAuth2Request] :reject_o_auth2_request
2206
+ # @return [Array<(SuccessfulOAuth2RequestResponse, Integer, Hash)>] SuccessfulOAuth2RequestResponse data, response status code and response headers
2207
+ def admin_reject_o_auth2_login_request_with_http_info(login_challenge, opts = {})
2208
+ if @api_client.config.debugging
2209
+ @api_client.config.logger.debug 'Calling API: V0alpha2Api.admin_reject_o_auth2_login_request ...'
2210
+ end
2211
+ # verify the required parameter 'login_challenge' is set
2212
+ if @api_client.config.client_side_validation && login_challenge.nil?
2213
+ fail ArgumentError, "Missing the required parameter 'login_challenge' when calling V0alpha2Api.admin_reject_o_auth2_login_request"
2214
+ end
2215
+ # resource path
2216
+ local_var_path = '/admin/oauth2/auth/requests/login/reject'
2217
+
2218
+ # query parameters
2219
+ query_params = opts[:query_params] || {}
2220
+ query_params[:'login_challenge'] = login_challenge
2221
+
2222
+ # header parameters
2223
+ header_params = opts[:header_params] || {}
2224
+ # HTTP header 'Accept' (if needed)
2225
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
2226
+ # HTTP header 'Content-Type'
2227
+ content_type = @api_client.select_header_content_type(['application/json'])
2228
+ if !content_type.nil?
2229
+ header_params['Content-Type'] = content_type
2230
+ end
2231
+
2232
+ # form parameters
2233
+ form_params = opts[:form_params] || {}
2234
+
2235
+ # http body (model)
2236
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'reject_o_auth2_request'])
2237
+
2238
+ # return_type
2239
+ return_type = opts[:debug_return_type] || 'SuccessfulOAuth2RequestResponse'
2240
+
2241
+ # auth_names
2242
+ auth_names = opts[:debug_auth_names] || ['oryAccessToken']
2243
+
2244
+ new_options = opts.merge(
2245
+ :operation => :"V0alpha2Api.admin_reject_o_auth2_login_request",
2246
+ :header_params => header_params,
2247
+ :query_params => query_params,
2248
+ :form_params => form_params,
2249
+ :body => post_body,
2250
+ :auth_names => auth_names,
2251
+ :return_type => return_type
2252
+ )
2253
+
2254
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
2255
+ if @api_client.config.debugging
2256
+ @api_client.config.logger.debug "API called: V0alpha2Api#admin_reject_o_auth2_login_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2257
+ end
2258
+ return data, status_code, headers
2259
+ end
2260
+
2261
+ # Reject an OAuth 2.0 Logout Request
2262
+ # When a user or an application requests ORY Hydra to log out a user, this endpoint is used to deny that logout request. No body is required. The response is empty as the logout provider has to chose what action to perform next.
2263
+ # @param logout_challenge [String]
2264
+ # @param [Hash] opts the optional parameters
2265
+ # @option opts [RejectOAuth2Request] :reject_o_auth2_request
2266
+ # @return [nil]
2267
+ def admin_reject_o_auth2_logout_request(logout_challenge, opts = {})
2268
+ admin_reject_o_auth2_logout_request_with_http_info(logout_challenge, opts)
2269
+ nil
2270
+ end
2271
+
2272
+ # Reject an OAuth 2.0 Logout Request
2273
+ # When a user or an application requests ORY Hydra to log out a user, this endpoint is used to deny that logout request. No body is required. The response is empty as the logout provider has to chose what action to perform next.
2274
+ # @param logout_challenge [String]
2275
+ # @param [Hash] opts the optional parameters
2276
+ # @option opts [RejectOAuth2Request] :reject_o_auth2_request
2277
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
2278
+ def admin_reject_o_auth2_logout_request_with_http_info(logout_challenge, opts = {})
2279
+ if @api_client.config.debugging
2280
+ @api_client.config.logger.debug 'Calling API: V0alpha2Api.admin_reject_o_auth2_logout_request ...'
2281
+ end
2282
+ # verify the required parameter 'logout_challenge' is set
2283
+ if @api_client.config.client_side_validation && logout_challenge.nil?
2284
+ fail ArgumentError, "Missing the required parameter 'logout_challenge' when calling V0alpha2Api.admin_reject_o_auth2_logout_request"
2285
+ end
2286
+ # resource path
2287
+ local_var_path = '/admin/oauth2/auth/requests/logout/reject'
2288
+
2289
+ # query parameters
2290
+ query_params = opts[:query_params] || {}
2291
+ query_params[:'logout_challenge'] = logout_challenge
2292
+
2293
+ # header parameters
2294
+ header_params = opts[:header_params] || {}
2295
+ # HTTP header 'Accept' (if needed)
2296
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
2297
+ # HTTP header 'Content-Type'
2298
+ content_type = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded'])
2299
+ if !content_type.nil?
2300
+ header_params['Content-Type'] = content_type
2301
+ end
2302
+
2303
+ # form parameters
2304
+ form_params = opts[:form_params] || {}
2305
+
2306
+ # http body (model)
2307
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'reject_o_auth2_request'])
2308
+
2309
+ # return_type
2310
+ return_type = opts[:debug_return_type]
2311
+
2312
+ # auth_names
2313
+ auth_names = opts[:debug_auth_names] || ['oryAccessToken']
2314
+
2315
+ new_options = opts.merge(
2316
+ :operation => :"V0alpha2Api.admin_reject_o_auth2_logout_request",
2317
+ :header_params => header_params,
2318
+ :query_params => query_params,
2319
+ :form_params => form_params,
2320
+ :body => post_body,
2321
+ :auth_names => auth_names,
2322
+ :return_type => return_type
2323
+ )
2324
+
2325
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
2326
+ if @api_client.config.debugging
2327
+ @api_client.config.logger.debug "API called: V0alpha2Api#admin_reject_o_auth2_logout_request\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2328
+ end
2329
+ return data, status_code, headers
2330
+ end
2331
+
2332
+ # Revokes OAuth 2.0 Consent Sessions of a Subject for a Specific OAuth 2.0 Client
2333
+ # This endpoint revokes a subject's granted consent sessions for a specific OAuth 2.0 Client and invalidates all associated OAuth 2.0 Access Tokens.
2334
+ # @param subject [String] The subject (Subject) whose consent sessions should be deleted.
2335
+ # @param [Hash] opts the optional parameters
2336
+ # @option opts [String] :client If set, deletes only those consent sessions by the Subject that have been granted to the specified OAuth 2.0 Client ID
2337
+ # @option opts [Boolean] :all If set to &#x60;true&#x60; deletes all consent sessions by the Subject that have been granted.
2338
+ # @return [nil]
2339
+ def admin_revoke_o_auth2_consent_sessions(subject, opts = {})
2340
+ admin_revoke_o_auth2_consent_sessions_with_http_info(subject, opts)
2341
+ nil
2342
+ end
2343
+
2344
+ # Revokes OAuth 2.0 Consent Sessions of a Subject for a Specific OAuth 2.0 Client
2345
+ # This endpoint revokes a subject&#39;s granted consent sessions for a specific OAuth 2.0 Client and invalidates all associated OAuth 2.0 Access Tokens.
2346
+ # @param subject [String] The subject (Subject) whose consent sessions should be deleted.
2347
+ # @param [Hash] opts the optional parameters
2348
+ # @option opts [String] :client If set, deletes only those consent sessions by the Subject that have been granted to the specified OAuth 2.0 Client ID
2349
+ # @option opts [Boolean] :all If set to &#x60;true&#x60; deletes all consent sessions by the Subject that have been granted.
2350
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
2351
+ def admin_revoke_o_auth2_consent_sessions_with_http_info(subject, opts = {})
2352
+ if @api_client.config.debugging
2353
+ @api_client.config.logger.debug 'Calling API: V0alpha2Api.admin_revoke_o_auth2_consent_sessions ...'
2354
+ end
2355
+ # verify the required parameter 'subject' is set
2356
+ if @api_client.config.client_side_validation && subject.nil?
2357
+ fail ArgumentError, "Missing the required parameter 'subject' when calling V0alpha2Api.admin_revoke_o_auth2_consent_sessions"
2358
+ end
2359
+ # resource path
2360
+ local_var_path = '/admin/oauth2/auth/sessions/consent'
2361
+
2362
+ # query parameters
2363
+ query_params = opts[:query_params] || {}
2364
+ query_params[:'subject'] = subject
2365
+ query_params[:'client'] = opts[:'client'] if !opts[:'client'].nil?
2366
+ query_params[:'all'] = opts[:'all'] if !opts[:'all'].nil?
2367
+
2368
+ # header parameters
2369
+ header_params = opts[:header_params] || {}
2370
+ # HTTP header 'Accept' (if needed)
2371
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
2372
+
2373
+ # form parameters
2374
+ form_params = opts[:form_params] || {}
2375
+
2376
+ # http body (model)
2377
+ post_body = opts[:debug_body]
2378
+
2379
+ # return_type
2380
+ return_type = opts[:debug_return_type]
2381
+
2382
+ # auth_names
2383
+ auth_names = opts[:debug_auth_names] || ['oryAccessToken']
2384
+
2385
+ new_options = opts.merge(
2386
+ :operation => :"V0alpha2Api.admin_revoke_o_auth2_consent_sessions",
2387
+ :header_params => header_params,
2388
+ :query_params => query_params,
2389
+ :form_params => form_params,
2390
+ :body => post_body,
2391
+ :auth_names => auth_names,
2392
+ :return_type => return_type
2393
+ )
2394
+
2395
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
2396
+ if @api_client.config.debugging
2397
+ @api_client.config.logger.debug "API called: V0alpha2Api#admin_revoke_o_auth2_consent_sessions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2398
+ end
2399
+ return data, status_code, headers
2400
+ end
2401
+
2402
+ # Invalidates All OAuth 2.0 Login Sessions of a Certain User
2403
+ # This endpoint invalidates a subject's authentication session. After revoking the authentication session, the subject has to re-authenticate at ORY Hydra. This endpoint does not invalidate any tokens and does not work with OpenID Connect Front- or Back-channel logout.
2404
+ # @param subject [String] The subject to revoke authentication sessions for.
2405
+ # @param [Hash] opts the optional parameters
2406
+ # @return [nil]
2407
+ def admin_revoke_o_auth2_login_sessions(subject, opts = {})
2408
+ admin_revoke_o_auth2_login_sessions_with_http_info(subject, opts)
2409
+ nil
2410
+ end
2411
+
2412
+ # Invalidates All OAuth 2.0 Login Sessions of a Certain User
2413
+ # This endpoint invalidates a subject&#39;s authentication session. After revoking the authentication session, the subject has to re-authenticate at ORY Hydra. This endpoint does not invalidate any tokens and does not work with OpenID Connect Front- or Back-channel logout.
2414
+ # @param subject [String] The subject to revoke authentication sessions for.
2415
+ # @param [Hash] opts the optional parameters
2416
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
2417
+ def admin_revoke_o_auth2_login_sessions_with_http_info(subject, opts = {})
2418
+ if @api_client.config.debugging
2419
+ @api_client.config.logger.debug 'Calling API: V0alpha2Api.admin_revoke_o_auth2_login_sessions ...'
2420
+ end
2421
+ # verify the required parameter 'subject' is set
2422
+ if @api_client.config.client_side_validation && subject.nil?
2423
+ fail ArgumentError, "Missing the required parameter 'subject' when calling V0alpha2Api.admin_revoke_o_auth2_login_sessions"
2424
+ end
2425
+ # resource path
2426
+ local_var_path = '/admin/oauth2/auth/sessions/login'
2427
+
2428
+ # query parameters
2429
+ query_params = opts[:query_params] || {}
2430
+ query_params[:'subject'] = subject
2431
+
2432
+ # header parameters
2433
+ header_params = opts[:header_params] || {}
2434
+ # HTTP header 'Accept' (if needed)
2435
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
2436
+
2437
+ # form parameters
2438
+ form_params = opts[:form_params] || {}
2439
+
2440
+ # http body (model)
2441
+ post_body = opts[:debug_body]
2442
+
2443
+ # return_type
2444
+ return_type = opts[:debug_return_type]
2445
+
2446
+ # auth_names
2447
+ auth_names = opts[:debug_auth_names] || ['oryAccessToken']
2448
+
2449
+ new_options = opts.merge(
2450
+ :operation => :"V0alpha2Api.admin_revoke_o_auth2_login_sessions",
2451
+ :header_params => header_params,
2452
+ :query_params => query_params,
2453
+ :form_params => form_params,
2454
+ :body => post_body,
2455
+ :auth_names => auth_names,
2456
+ :return_type => return_type
2457
+ )
2458
+
2459
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
2460
+ if @api_client.config.debugging
2461
+ @api_client.config.logger.debug "API called: V0alpha2Api#admin_revoke_o_auth2_login_sessions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2462
+ end
2463
+ return data, status_code, headers
2464
+ end
2465
+
2466
+ # Trust an OAuth2 JWT Bearer Grant Type Issuer
2467
+ # Use this endpoint to establish a trust relationship for a JWT issuer to perform JSON Web Token (JWT) Profile for OAuth 2.0 Client Authentication and Authorization Grants [RFC7523](https://datatracker.ietf.org/doc/html/rfc7523).
2468
+ # @param [Hash] opts the optional parameters
2469
+ # @option opts [AdminTrustOAuth2JwtGrantIssuerBody] :admin_trust_o_auth2_jwt_grant_issuer_body
2470
+ # @return [TrustedOAuth2JwtGrantIssuer]
2471
+ def admin_trust_o_auth2_jwt_grant_issuer(opts = {})
2472
+ data, _status_code, _headers = admin_trust_o_auth2_jwt_grant_issuer_with_http_info(opts)
2473
+ data
2474
+ end
2475
+
2476
+ # Trust an OAuth2 JWT Bearer Grant Type Issuer
2477
+ # Use this endpoint to establish a trust relationship for a JWT issuer to perform JSON Web Token (JWT) Profile for OAuth 2.0 Client Authentication and Authorization Grants [RFC7523](https://datatracker.ietf.org/doc/html/rfc7523).
2478
+ # @param [Hash] opts the optional parameters
2479
+ # @option opts [AdminTrustOAuth2JwtGrantIssuerBody] :admin_trust_o_auth2_jwt_grant_issuer_body
2480
+ # @return [Array<(TrustedOAuth2JwtGrantIssuer, Integer, Hash)>] TrustedOAuth2JwtGrantIssuer data, response status code and response headers
2481
+ def admin_trust_o_auth2_jwt_grant_issuer_with_http_info(opts = {})
2482
+ if @api_client.config.debugging
2483
+ @api_client.config.logger.debug 'Calling API: V0alpha2Api.admin_trust_o_auth2_jwt_grant_issuer ...'
2484
+ end
2485
+ # resource path
2486
+ local_var_path = '/admin/trust/grants/jwt-bearer/issuers'
2487
+
2488
+ # query parameters
2489
+ query_params = opts[:query_params] || {}
2490
+
2491
+ # header parameters
2492
+ header_params = opts[:header_params] || {}
2493
+ # HTTP header 'Accept' (if needed)
2494
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
2495
+ # HTTP header 'Content-Type'
2496
+ content_type = @api_client.select_header_content_type(['application/json'])
2497
+ if !content_type.nil?
2498
+ header_params['Content-Type'] = content_type
2499
+ end
2500
+
2501
+ # form parameters
2502
+ form_params = opts[:form_params] || {}
2503
+
2504
+ # http body (model)
2505
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'admin_trust_o_auth2_jwt_grant_issuer_body'])
2506
+
2507
+ # return_type
2508
+ return_type = opts[:debug_return_type] || 'TrustedOAuth2JwtGrantIssuer'
2509
+
2510
+ # auth_names
2511
+ auth_names = opts[:debug_auth_names] || ['oryAccessToken']
2512
+
2513
+ new_options = opts.merge(
2514
+ :operation => :"V0alpha2Api.admin_trust_o_auth2_jwt_grant_issuer",
2515
+ :header_params => header_params,
2516
+ :query_params => query_params,
2517
+ :form_params => form_params,
2518
+ :body => post_body,
2519
+ :auth_names => auth_names,
2520
+ :return_type => return_type
2521
+ )
2522
+
2523
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
2524
+ if @api_client.config.debugging
2525
+ @api_client.config.logger.debug "API called: V0alpha2Api#admin_trust_o_auth2_jwt_grant_issuer\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2526
+ end
2527
+ return data, status_code, headers
2528
+ end
2529
+
2530
+ # Update an Identity
2531
+ # This endpoint updates an identity. The full identity payload (except credentials) is expected. This endpoint does not support patching. Learn how identities work in [Ory Kratos' User And Identity Model Documentation](https://www.ory.sh/docs/next/kratos/concepts/identity-user-model).
2532
+ # @param id [String] ID must be set to the ID of identity you want to update
2533
+ # @param [Hash] opts the optional parameters
2534
+ # @option opts [AdminUpdateIdentityBody] :admin_update_identity_body
2535
+ # @return [Identity]
2536
+ def admin_update_identity(id, opts = {})
2537
+ data, _status_code, _headers = admin_update_identity_with_http_info(id, opts)
2538
+ data
2539
+ end
2540
+
2541
+ # Update an Identity
2542
+ # This endpoint updates an identity. The full identity payload (except credentials) is expected. This endpoint does not support patching. Learn how identities work in [Ory Kratos&#39; User And Identity Model Documentation](https://www.ory.sh/docs/next/kratos/concepts/identity-user-model).
2543
+ # @param id [String] ID must be set to the ID of identity you want to update
2544
+ # @param [Hash] opts the optional parameters
2545
+ # @option opts [AdminUpdateIdentityBody] :admin_update_identity_body
2546
+ # @return [Array<(Identity, Integer, Hash)>] Identity data, response status code and response headers
2547
+ def admin_update_identity_with_http_info(id, opts = {})
2548
+ if @api_client.config.debugging
2549
+ @api_client.config.logger.debug 'Calling API: V0alpha2Api.admin_update_identity ...'
2550
+ end
2551
+ # verify the required parameter 'id' is set
2552
+ if @api_client.config.client_side_validation && id.nil?
2553
+ fail ArgumentError, "Missing the required parameter 'id' when calling V0alpha2Api.admin_update_identity"
2554
+ end
2555
+ # resource path
2556
+ local_var_path = '/admin/identities/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
2557
+
2558
+ # query parameters
2559
+ query_params = opts[:query_params] || {}
2560
+
2561
+ # header parameters
2562
+ header_params = opts[:header_params] || {}
2563
+ # HTTP header 'Accept' (if needed)
2564
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
2565
+ # HTTP header 'Content-Type'
2566
+ content_type = @api_client.select_header_content_type(['application/json'])
2567
+ if !content_type.nil?
2568
+ header_params['Content-Type'] = content_type
2569
+ end
2570
+
2571
+ # form parameters
2572
+ form_params = opts[:form_params] || {}
2573
+
2574
+ # http body (model)
2575
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'admin_update_identity_body'])
2576
+
2577
+ # return_type
2578
+ return_type = opts[:debug_return_type] || 'Identity'
2579
+
2580
+ # auth_names
2581
+ auth_names = opts[:debug_auth_names] || ['oryAccessToken']
2582
+
2583
+ new_options = opts.merge(
2584
+ :operation => :"V0alpha2Api.admin_update_identity",
2585
+ :header_params => header_params,
2586
+ :query_params => query_params,
2587
+ :form_params => form_params,
2588
+ :body => post_body,
2589
+ :auth_names => auth_names,
2590
+ :return_type => return_type
2591
+ )
2592
+
2593
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
2594
+ if @api_client.config.debugging
2595
+ @api_client.config.logger.debug "API called: V0alpha2Api#admin_update_identity\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2596
+ end
2597
+ return data, status_code, headers
2598
+ end
2599
+
2600
+ # Update a JSON Web Key
2601
+ # Use this method if you do not want to let Hydra generate the JWKs for you, but instead save your own. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well.
2602
+ # @param set [String] The JSON Web Key Set
2603
+ # @param kid [String] The JSON Web Key ID (kid)
2604
+ # @param [Hash] opts the optional parameters
2605
+ # @option opts [JsonWebKey] :json_web_key
2606
+ # @return [JsonWebKey]
2607
+ def admin_update_json_web_key(set, kid, opts = {})
2608
+ data, _status_code, _headers = admin_update_json_web_key_with_http_info(set, kid, opts)
2609
+ data
2610
+ end
2611
+
2612
+ # Update a JSON Web Key
2613
+ # Use this method if you do not want to let Hydra generate the JWKs for you, but instead save your own. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well.
2614
+ # @param set [String] The JSON Web Key Set
2615
+ # @param kid [String] The JSON Web Key ID (kid)
2616
+ # @param [Hash] opts the optional parameters
2617
+ # @option opts [JsonWebKey] :json_web_key
2618
+ # @return [Array<(JsonWebKey, Integer, Hash)>] JsonWebKey data, response status code and response headers
2619
+ def admin_update_json_web_key_with_http_info(set, kid, opts = {})
2620
+ if @api_client.config.debugging
2621
+ @api_client.config.logger.debug 'Calling API: V0alpha2Api.admin_update_json_web_key ...'
2622
+ end
2623
+ # verify the required parameter 'set' is set
2624
+ if @api_client.config.client_side_validation && set.nil?
2625
+ fail ArgumentError, "Missing the required parameter 'set' when calling V0alpha2Api.admin_update_json_web_key"
2626
+ end
2627
+ # verify the required parameter 'kid' is set
2628
+ if @api_client.config.client_side_validation && kid.nil?
2629
+ fail ArgumentError, "Missing the required parameter 'kid' when calling V0alpha2Api.admin_update_json_web_key"
2630
+ end
2631
+ # resource path
2632
+ local_var_path = '/admin/keys/{set}/{kid}'.sub('{' + 'set' + '}', CGI.escape(set.to_s)).sub('{' + 'kid' + '}', CGI.escape(kid.to_s))
2633
+
2634
+ # query parameters
2635
+ query_params = opts[:query_params] || {}
2636
+
2637
+ # header parameters
2638
+ header_params = opts[:header_params] || {}
2639
+ # HTTP header 'Accept' (if needed)
2640
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
2641
+ # HTTP header 'Content-Type'
2642
+ content_type = @api_client.select_header_content_type(['application/json'])
2643
+ if !content_type.nil?
2644
+ header_params['Content-Type'] = content_type
2645
+ end
2646
+
2647
+ # form parameters
2648
+ form_params = opts[:form_params] || {}
2649
+
2650
+ # http body (model)
2651
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'json_web_key'])
2652
+
2653
+ # return_type
2654
+ return_type = opts[:debug_return_type] || 'JsonWebKey'
2655
+
2656
+ # auth_names
2657
+ auth_names = opts[:debug_auth_names] || ['oryAccessToken']
2658
+
2659
+ new_options = opts.merge(
2660
+ :operation => :"V0alpha2Api.admin_update_json_web_key",
2661
+ :header_params => header_params,
2662
+ :query_params => query_params,
2663
+ :form_params => form_params,
2664
+ :body => post_body,
2665
+ :auth_names => auth_names,
2666
+ :return_type => return_type
2667
+ )
2668
+
2669
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
2670
+ if @api_client.config.debugging
2671
+ @api_client.config.logger.debug "API called: V0alpha2Api#admin_update_json_web_key\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2672
+ end
2673
+ return data, status_code, headers
2674
+ end
2675
+
2676
+ # Update a JSON Web Key Set
2677
+ # Use this method if you do not want to let Hydra generate the JWKs for you, but instead save your own. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well.
2678
+ # @param set [String] The JSON Web Key Set
2679
+ # @param [Hash] opts the optional parameters
2680
+ # @option opts [JsonWebKeySet] :json_web_key_set
2681
+ # @return [JsonWebKeySet]
2682
+ def admin_update_json_web_key_set(set, opts = {})
2683
+ data, _status_code, _headers = admin_update_json_web_key_set_with_http_info(set, opts)
2684
+ data
2685
+ end
2686
+
2687
+ # Update a JSON Web Key Set
2688
+ # Use this method if you do not want to let Hydra generate the JWKs for you, but instead save your own. A JSON Web Key (JWK) is a JavaScript Object Notation (JSON) data structure that represents a cryptographic key. A JWK Set is a JSON data structure that represents a set of JWKs. A JSON Web Key is identified by its set and key id. ORY Hydra uses this functionality to store cryptographic keys used for TLS and JSON Web Tokens (such as OpenID Connect ID tokens), and allows storing user-defined keys as well.
2689
+ # @param set [String] The JSON Web Key Set
2690
+ # @param [Hash] opts the optional parameters
2691
+ # @option opts [JsonWebKeySet] :json_web_key_set
2692
+ # @return [Array<(JsonWebKeySet, Integer, Hash)>] JsonWebKeySet data, response status code and response headers
2693
+ def admin_update_json_web_key_set_with_http_info(set, opts = {})
2694
+ if @api_client.config.debugging
2695
+ @api_client.config.logger.debug 'Calling API: V0alpha2Api.admin_update_json_web_key_set ...'
2696
+ end
2697
+ # verify the required parameter 'set' is set
2698
+ if @api_client.config.client_side_validation && set.nil?
2699
+ fail ArgumentError, "Missing the required parameter 'set' when calling V0alpha2Api.admin_update_json_web_key_set"
2700
+ end
2701
+ # resource path
2702
+ local_var_path = '/admin/keys/{set}'.sub('{' + 'set' + '}', CGI.escape(set.to_s))
2703
+
2704
+ # query parameters
2705
+ query_params = opts[:query_params] || {}
2706
+
2707
+ # header parameters
2708
+ header_params = opts[:header_params] || {}
2709
+ # HTTP header 'Accept' (if needed)
2710
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
2711
+ # HTTP header 'Content-Type'
2712
+ content_type = @api_client.select_header_content_type(['application/json'])
2713
+ if !content_type.nil?
2714
+ header_params['Content-Type'] = content_type
2715
+ end
2716
+
2717
+ # form parameters
2718
+ form_params = opts[:form_params] || {}
2719
+
2720
+ # http body (model)
2721
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'json_web_key_set'])
2722
+
2723
+ # return_type
2724
+ return_type = opts[:debug_return_type] || 'JsonWebKeySet'
2725
+
2726
+ # auth_names
2727
+ auth_names = opts[:debug_auth_names] || ['oryAccessToken']
2728
+
2729
+ new_options = opts.merge(
2730
+ :operation => :"V0alpha2Api.admin_update_json_web_key_set",
2731
+ :header_params => header_params,
2732
+ :query_params => query_params,
2733
+ :form_params => form_params,
2734
+ :body => post_body,
2735
+ :auth_names => auth_names,
2736
+ :return_type => return_type
2737
+ )
2738
+
2739
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
2740
+ if @api_client.config.debugging
2741
+ @api_client.config.logger.debug "API called: V0alpha2Api#admin_update_json_web_key_set\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2742
+ end
2743
+ return data, status_code, headers
2744
+ end
2745
+
2746
+ # Update an OAuth 2.0 Client
2747
+ # Update an existing OAuth 2.0 Client. If you pass `client_secret` the secret is used, otherwise a random secret is generated. The secret is echoed in the response. It is not possible to retrieve it later on. OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities.
2748
+ # @param id [String] The id of the OAuth 2.0 Client.
2749
+ # @param o_auth2_client [OAuth2Client]
2750
+ # @param [Hash] opts the optional parameters
2751
+ # @return [OAuth2Client]
2752
+ def admin_update_o_auth2_client(id, o_auth2_client, opts = {})
2753
+ data, _status_code, _headers = admin_update_o_auth2_client_with_http_info(id, o_auth2_client, opts)
2754
+ data
2755
+ end
2756
+
2757
+ # Update an OAuth 2.0 Client
2758
+ # Update an existing OAuth 2.0 Client. If you pass &#x60;client_secret&#x60; the secret is used, otherwise a random secret is generated. The secret is echoed in the response. It is not possible to retrieve it later on. OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities.
2759
+ # @param id [String] The id of the OAuth 2.0 Client.
2760
+ # @param o_auth2_client [OAuth2Client]
2761
+ # @param [Hash] opts the optional parameters
2762
+ # @return [Array<(OAuth2Client, Integer, Hash)>] OAuth2Client data, response status code and response headers
2763
+ def admin_update_o_auth2_client_with_http_info(id, o_auth2_client, opts = {})
2764
+ if @api_client.config.debugging
2765
+ @api_client.config.logger.debug 'Calling API: V0alpha2Api.admin_update_o_auth2_client ...'
2766
+ end
2767
+ # verify the required parameter 'id' is set
2768
+ if @api_client.config.client_side_validation && id.nil?
2769
+ fail ArgumentError, "Missing the required parameter 'id' when calling V0alpha2Api.admin_update_o_auth2_client"
2770
+ end
2771
+ # verify the required parameter 'o_auth2_client' is set
2772
+ if @api_client.config.client_side_validation && o_auth2_client.nil?
2773
+ fail ArgumentError, "Missing the required parameter 'o_auth2_client' when calling V0alpha2Api.admin_update_o_auth2_client"
104
2774
  end
105
2775
  # resource path
106
- local_var_path = '/admin/recovery/link'
2776
+ local_var_path = '/admin/clients/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
107
2777
 
108
2778
  # query parameters
109
2779
  query_params = opts[:query_params] || {}
@@ -122,16 +2792,16 @@ module OryClient
122
2792
  form_params = opts[:form_params] || {}
123
2793
 
124
2794
  # http body (model)
125
- post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'admin_create_self_service_recovery_link_body'])
2795
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(o_auth2_client)
126
2796
 
127
2797
  # return_type
128
- return_type = opts[:debug_return_type] || 'SelfServiceRecoveryLink'
2798
+ return_type = opts[:debug_return_type] || 'OAuth2Client'
129
2799
 
130
2800
  # auth_names
131
2801
  auth_names = opts[:debug_auth_names] || ['oryAccessToken']
132
2802
 
133
2803
  new_options = opts.merge(
134
- :operation => :"V0alpha2Api.admin_create_self_service_recovery_link",
2804
+ :operation => :"V0alpha2Api.admin_update_o_auth2_client",
135
2805
  :header_params => header_params,
136
2806
  :query_params => query_params,
137
2807
  :form_params => form_params,
@@ -140,38 +2810,34 @@ module OryClient
140
2810
  :return_type => return_type
141
2811
  )
142
2812
 
143
- data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
2813
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
144
2814
  if @api_client.config.debugging
145
- @api_client.config.logger.debug "API called: V0alpha2Api#admin_create_self_service_recovery_link\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2815
+ @api_client.config.logger.debug "API called: V0alpha2Api#admin_update_o_auth2_client\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
146
2816
  end
147
2817
  return data, status_code, headers
148
2818
  end
149
2819
 
150
- # Delete an Identity
151
- # Calling this endpoint irrecoverably and permanently deletes the identity given its ID. This action can not be undone. This endpoint returns 204 when the identity was deleted or when the identity was not found, in which case it is assumed that is has been deleted already. Learn how identities work in [Ory Kratos' User And Identity Model Documentation](https://www.ory.sh/docs/next/kratos/concepts/identity-user-model).
152
- # @param id [String] ID is the identity&#39;s ID.
2820
+ # Create a Project
2821
+ # Creates a new project.
153
2822
  # @param [Hash] opts the optional parameters
154
- # @return [nil]
155
- def admin_delete_identity(id, opts = {})
156
- admin_delete_identity_with_http_info(id, opts)
157
- nil
2823
+ # @option opts [CreateProjectBody] :create_project_body
2824
+ # @return [Project]
2825
+ def create_project(opts = {})
2826
+ data, _status_code, _headers = create_project_with_http_info(opts)
2827
+ data
158
2828
  end
159
2829
 
160
- # Delete an Identity
161
- # Calling this endpoint irrecoverably and permanently deletes the identity given its ID. This action can not be undone. This endpoint returns 204 when the identity was deleted or when the identity was not found, in which case it is assumed that is has been deleted already. Learn how identities work in [Ory Kratos&#39; User And Identity Model Documentation](https://www.ory.sh/docs/next/kratos/concepts/identity-user-model).
162
- # @param id [String] ID is the identity&#39;s ID.
2830
+ # Create a Project
2831
+ # Creates a new project.
163
2832
  # @param [Hash] opts the optional parameters
164
- # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
165
- def admin_delete_identity_with_http_info(id, opts = {})
2833
+ # @option opts [CreateProjectBody] :create_project_body
2834
+ # @return [Array<(Project, Integer, Hash)>] Project data, response status code and response headers
2835
+ def create_project_with_http_info(opts = {})
166
2836
  if @api_client.config.debugging
167
- @api_client.config.logger.debug 'Calling API: V0alpha2Api.admin_delete_identity ...'
168
- end
169
- # verify the required parameter 'id' is set
170
- if @api_client.config.client_side_validation && id.nil?
171
- fail ArgumentError, "Missing the required parameter 'id' when calling V0alpha2Api.admin_delete_identity"
2837
+ @api_client.config.logger.debug 'Calling API: V0alpha2Api.create_project ...'
172
2838
  end
173
2839
  # resource path
174
- local_var_path = '/admin/identities/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
2840
+ local_var_path = '/projects'
175
2841
 
176
2842
  # query parameters
177
2843
  query_params = opts[:query_params] || {}
@@ -180,21 +2846,26 @@ module OryClient
180
2846
  header_params = opts[:header_params] || {}
181
2847
  # HTTP header 'Accept' (if needed)
182
2848
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
2849
+ # HTTP header 'Content-Type'
2850
+ content_type = @api_client.select_header_content_type(['application/json'])
2851
+ if !content_type.nil?
2852
+ header_params['Content-Type'] = content_type
2853
+ end
183
2854
 
184
2855
  # form parameters
185
2856
  form_params = opts[:form_params] || {}
186
2857
 
187
2858
  # http body (model)
188
- post_body = opts[:debug_body]
2859
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'create_project_body'])
189
2860
 
190
2861
  # return_type
191
- return_type = opts[:debug_return_type]
2862
+ return_type = opts[:debug_return_type] || 'Project'
192
2863
 
193
2864
  # auth_names
194
2865
  auth_names = opts[:debug_auth_names] || ['oryAccessToken']
195
2866
 
196
2867
  new_options = opts.merge(
197
- :operation => :"V0alpha2Api.admin_delete_identity",
2868
+ :operation => :"V0alpha2Api.create_project",
198
2869
  :header_params => header_params,
199
2870
  :query_params => query_params,
200
2871
  :form_params => form_params,
@@ -203,38 +2874,34 @@ module OryClient
203
2874
  :return_type => return_type
204
2875
  )
205
2876
 
206
- data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
2877
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
207
2878
  if @api_client.config.debugging
208
- @api_client.config.logger.debug "API called: V0alpha2Api#admin_delete_identity\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2879
+ @api_client.config.logger.debug "API called: V0alpha2Api#create_project\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
209
2880
  end
210
2881
  return data, status_code, headers
211
2882
  end
212
2883
 
213
- # Calling this endpoint irrecoverably and permanently deletes and invalidates all sessions that belong to the given Identity.
214
- # This endpoint is useful for: To forcefully logout Identity from all devices and sessions
215
- # @param id [String] ID is the identity&#39;s ID.
2884
+ # Create a Logout URL for Browsers
2885
+ # This endpoint initializes a browser-based user logout flow and a URL which can be used to log out the user. This endpoint is NOT INTENDED for API clients and only works with browsers (Chrome, Firefox, ...). For API clients you can call the `/self-service/logout/api` URL directly with the Ory Session Token. The URL is only valid for the currently signed in user. If no user is signed in, this endpoint returns a 401 error. When calling this endpoint from a backend, please ensure to properly forward the HTTP cookies.
216
2886
  # @param [Hash] opts the optional parameters
217
- # @return [nil]
218
- def admin_delete_identity_sessions(id, opts = {})
219
- admin_delete_identity_sessions_with_http_info(id, opts)
220
- nil
2887
+ # @option opts [String] :cookie HTTP Cookies If you call this endpoint from a backend, please include the original Cookie header in the request.
2888
+ # @return [SelfServiceLogoutUrl]
2889
+ def create_self_service_logout_flow_url_for_browsers(opts = {})
2890
+ data, _status_code, _headers = create_self_service_logout_flow_url_for_browsers_with_http_info(opts)
2891
+ data
221
2892
  end
222
2893
 
223
- # Calling this endpoint irrecoverably and permanently deletes and invalidates all sessions that belong to the given Identity.
224
- # This endpoint is useful for: To forcefully logout Identity from all devices and sessions
225
- # @param id [String] ID is the identity&#39;s ID.
2894
+ # Create a Logout URL for Browsers
2895
+ # This endpoint initializes a browser-based user logout flow and a URL which can be used to log out the user. This endpoint is NOT INTENDED for API clients and only works with browsers (Chrome, Firefox, ...). For API clients you can call the &#x60;/self-service/logout/api&#x60; URL directly with the Ory Session Token. The URL is only valid for the currently signed in user. If no user is signed in, this endpoint returns a 401 error. When calling this endpoint from a backend, please ensure to properly forward the HTTP cookies.
226
2896
  # @param [Hash] opts the optional parameters
227
- # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
228
- def admin_delete_identity_sessions_with_http_info(id, opts = {})
2897
+ # @option opts [String] :cookie HTTP Cookies If you call this endpoint from a backend, please include the original Cookie header in the request.
2898
+ # @return [Array<(SelfServiceLogoutUrl, Integer, Hash)>] SelfServiceLogoutUrl data, response status code and response headers
2899
+ def create_self_service_logout_flow_url_for_browsers_with_http_info(opts = {})
229
2900
  if @api_client.config.debugging
230
- @api_client.config.logger.debug 'Calling API: V0alpha2Api.admin_delete_identity_sessions ...'
231
- end
232
- # verify the required parameter 'id' is set
233
- if @api_client.config.client_side_validation && id.nil?
234
- fail ArgumentError, "Missing the required parameter 'id' when calling V0alpha2Api.admin_delete_identity_sessions"
2901
+ @api_client.config.logger.debug 'Calling API: V0alpha2Api.create_self_service_logout_flow_url_for_browsers ...'
235
2902
  end
236
2903
  # resource path
237
- local_var_path = '/admin/identities/{id}/sessions'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
2904
+ local_var_path = '/self-service/logout/browser'
238
2905
 
239
2906
  # query parameters
240
2907
  query_params = opts[:query_params] || {}
@@ -243,6 +2910,7 @@ module OryClient
243
2910
  header_params = opts[:header_params] || {}
244
2911
  # HTTP header 'Accept' (if needed)
245
2912
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
2913
+ header_params[:'cookie'] = opts[:'cookie'] if !opts[:'cookie'].nil?
246
2914
 
247
2915
  # form parameters
248
2916
  form_params = opts[:form_params] || {}
@@ -251,13 +2919,13 @@ module OryClient
251
2919
  post_body = opts[:debug_body]
252
2920
 
253
2921
  # return_type
254
- return_type = opts[:debug_return_type]
2922
+ return_type = opts[:debug_return_type] || 'SelfServiceLogoutUrl'
255
2923
 
256
2924
  # auth_names
257
- auth_names = opts[:debug_auth_names] || ['oryAccessToken']
2925
+ auth_names = opts[:debug_auth_names] || []
258
2926
 
259
2927
  new_options = opts.merge(
260
- :operation => :"V0alpha2Api.admin_delete_identity_sessions",
2928
+ :operation => :"V0alpha2Api.create_self_service_logout_flow_url_for_browsers",
261
2929
  :header_params => header_params,
262
2930
  :query_params => query_params,
263
2931
  :form_params => form_params,
@@ -266,38 +2934,32 @@ module OryClient
266
2934
  :return_type => return_type
267
2935
  )
268
2936
 
269
- data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
2937
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
270
2938
  if @api_client.config.debugging
271
- @api_client.config.logger.debug "API called: V0alpha2Api#admin_delete_identity_sessions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2939
+ @api_client.config.logger.debug "API called: V0alpha2Api#create_self_service_logout_flow_url_for_browsers\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
272
2940
  end
273
2941
  return data, status_code, headers
274
2942
  end
275
2943
 
276
- # Calling this endpoint extends the given session ID. If `session.earliest_possible_extend` is set it will only extend the session after the specified time has passed.
277
- # Retrieve the session ID from the `/sessions/whoami` endpoint / `toSession` SDK method.
278
- # @param id [String] ID is the session&#39;s ID.
2944
+ # Discover JSON Web Keys
2945
+ # This endpoint returns JSON Web Keys required to verifying OpenID Connect ID Tokens and, if enabled, OAuth 2.0 JWT Access Tokens. This endpoint can be used with client libraries like [node-jwks-rsa](https://github.com/auth0/node-jwks-rsa) among others.
279
2946
  # @param [Hash] opts the optional parameters
280
- # @return [Session]
281
- def admin_extend_session(id, opts = {})
282
- data, _status_code, _headers = admin_extend_session_with_http_info(id, opts)
2947
+ # @return [JsonWebKeySet]
2948
+ def discover_json_web_keys(opts = {})
2949
+ data, _status_code, _headers = discover_json_web_keys_with_http_info(opts)
283
2950
  data
284
2951
  end
285
2952
 
286
- # Calling this endpoint extends the given session ID. If &#x60;session.earliest_possible_extend&#x60; is set it will only extend the session after the specified time has passed.
287
- # Retrieve the session ID from the &#x60;/sessions/whoami&#x60; endpoint / &#x60;toSession&#x60; SDK method.
288
- # @param id [String] ID is the session&#39;s ID.
2953
+ # Discover JSON Web Keys
2954
+ # This endpoint returns JSON Web Keys required to verifying OpenID Connect ID Tokens and, if enabled, OAuth 2.0 JWT Access Tokens. This endpoint can be used with client libraries like [node-jwks-rsa](https://github.com/auth0/node-jwks-rsa) among others.
289
2955
  # @param [Hash] opts the optional parameters
290
- # @return [Array<(Session, Integer, Hash)>] Session data, response status code and response headers
291
- def admin_extend_session_with_http_info(id, opts = {})
2956
+ # @return [Array<(JsonWebKeySet, Integer, Hash)>] JsonWebKeySet data, response status code and response headers
2957
+ def discover_json_web_keys_with_http_info(opts = {})
292
2958
  if @api_client.config.debugging
293
- @api_client.config.logger.debug 'Calling API: V0alpha2Api.admin_extend_session ...'
294
- end
295
- # verify the required parameter 'id' is set
296
- if @api_client.config.client_side_validation && id.nil?
297
- fail ArgumentError, "Missing the required parameter 'id' when calling V0alpha2Api.admin_extend_session"
2959
+ @api_client.config.logger.debug 'Calling API: V0alpha2Api.discover_json_web_keys ...'
298
2960
  end
299
2961
  # resource path
300
- local_var_path = '/admin/sessions/{id}/extend'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
2962
+ local_var_path = '/.well-known/jwks.json'
301
2963
 
302
2964
  # query parameters
303
2965
  query_params = opts[:query_params] || {}
@@ -314,13 +2976,13 @@ module OryClient
314
2976
  post_body = opts[:debug_body]
315
2977
 
316
2978
  # return_type
317
- return_type = opts[:debug_return_type] || 'Session'
2979
+ return_type = opts[:debug_return_type] || 'JsonWebKeySet'
318
2980
 
319
2981
  # auth_names
320
- auth_names = opts[:debug_auth_names] || ['oryAccessToken']
2982
+ auth_names = opts[:debug_auth_names] || []
321
2983
 
322
2984
  new_options = opts.merge(
323
- :operation => :"V0alpha2Api.admin_extend_session",
2985
+ :operation => :"V0alpha2Api.discover_json_web_keys",
324
2986
  :header_params => header_params,
325
2987
  :query_params => query_params,
326
2988
  :form_params => form_params,
@@ -329,44 +2991,35 @@ module OryClient
329
2991
  :return_type => return_type
330
2992
  )
331
2993
 
332
- data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
2994
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
333
2995
  if @api_client.config.debugging
334
- @api_client.config.logger.debug "API called: V0alpha2Api#admin_extend_session\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2996
+ @api_client.config.logger.debug "API called: V0alpha2Api#discover_json_web_keys\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
335
2997
  end
336
2998
  return data, status_code, headers
337
2999
  end
338
3000
 
339
- # Get an Identity
340
- # Learn how identities work in [Ory Kratos' User And Identity Model Documentation](https://www.ory.sh/docs/next/kratos/concepts/identity-user-model).
341
- # @param id [String] ID must be set to the ID of identity you want to get
3001
+ # OpenID Connect Discovery
3002
+ # The well known endpoint an be used to retrieve information for OpenID Connect clients. We encourage you to not roll your own OpenID Connect client but to use an OpenID Connect client library instead. You can learn more on this flow at https://openid.net/specs/openid-connect-discovery-1_0.html . Popular libraries for OpenID Connect clients include oidc-client-js (JavaScript), go-oidc (Golang), and others. For a full list of clients go here: https://openid.net/developers/certified/
342
3003
  # @param [Hash] opts the optional parameters
343
- # @option opts [Array<String>] :include_credential DeclassifyCredentials will declassify one or more identity&#39;s credentials Currently, only &#x60;oidc&#x60; is supported. This will return the initial OAuth 2.0 Access, Refresh and (optionally) OpenID Connect ID Token.
344
- # @return [Identity]
345
- def admin_get_identity(id, opts = {})
346
- data, _status_code, _headers = admin_get_identity_with_http_info(id, opts)
3004
+ # @return [OidcConfiguration]
3005
+ def discover_oidc_configuration(opts = {})
3006
+ data, _status_code, _headers = discover_oidc_configuration_with_http_info(opts)
347
3007
  data
348
3008
  end
349
3009
 
350
- # Get an Identity
351
- # Learn how identities work in [Ory Kratos&#39; User And Identity Model Documentation](https://www.ory.sh/docs/next/kratos/concepts/identity-user-model).
352
- # @param id [String] ID must be set to the ID of identity you want to get
3010
+ # OpenID Connect Discovery
3011
+ # The well known endpoint an be used to retrieve information for OpenID Connect clients. We encourage you to not roll your own OpenID Connect client but to use an OpenID Connect client library instead. You can learn more on this flow at https://openid.net/specs/openid-connect-discovery-1_0.html . Popular libraries for OpenID Connect clients include oidc-client-js (JavaScript), go-oidc (Golang), and others. For a full list of clients go here: https://openid.net/developers/certified/
353
3012
  # @param [Hash] opts the optional parameters
354
- # @option opts [Array<String>] :include_credential DeclassifyCredentials will declassify one or more identity&#39;s credentials Currently, only &#x60;oidc&#x60; is supported. This will return the initial OAuth 2.0 Access, Refresh and (optionally) OpenID Connect ID Token.
355
- # @return [Array<(Identity, Integer, Hash)>] Identity data, response status code and response headers
356
- def admin_get_identity_with_http_info(id, opts = {})
3013
+ # @return [Array<(OidcConfiguration, Integer, Hash)>] OidcConfiguration data, response status code and response headers
3014
+ def discover_oidc_configuration_with_http_info(opts = {})
357
3015
  if @api_client.config.debugging
358
- @api_client.config.logger.debug 'Calling API: V0alpha2Api.admin_get_identity ...'
359
- end
360
- # verify the required parameter 'id' is set
361
- if @api_client.config.client_side_validation && id.nil?
362
- fail ArgumentError, "Missing the required parameter 'id' when calling V0alpha2Api.admin_get_identity"
3016
+ @api_client.config.logger.debug 'Calling API: V0alpha2Api.discover_oidc_configuration ...'
363
3017
  end
364
3018
  # resource path
365
- local_var_path = '/admin/identities/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
3019
+ local_var_path = '/.well-known/openid-configuration'
366
3020
 
367
3021
  # query parameters
368
3022
  query_params = opts[:query_params] || {}
369
- query_params[:'include_credential'] = @api_client.build_collection_param(opts[:'include_credential'], :multi) if !opts[:'include_credential'].nil?
370
3023
 
371
3024
  # header parameters
372
3025
  header_params = opts[:header_params] || {}
@@ -380,13 +3033,13 @@ module OryClient
380
3033
  post_body = opts[:debug_body]
381
3034
 
382
3035
  # return_type
383
- return_type = opts[:debug_return_type] || 'Identity'
3036
+ return_type = opts[:debug_return_type] || 'OidcConfiguration'
384
3037
 
385
3038
  # auth_names
386
- auth_names = opts[:debug_auth_names] || ['oryAccessToken']
3039
+ auth_names = opts[:debug_auth_names] || []
387
3040
 
388
3041
  new_options = opts.merge(
389
- :operation => :"V0alpha2Api.admin_get_identity",
3042
+ :operation => :"V0alpha2Api.discover_oidc_configuration",
390
3043
  :header_params => header_params,
391
3044
  :query_params => query_params,
392
3045
  :form_params => form_params,
@@ -397,71 +3050,64 @@ module OryClient
397
3050
 
398
3051
  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
399
3052
  if @api_client.config.debugging
400
- @api_client.config.logger.debug "API called: V0alpha2Api#admin_get_identity\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
3053
+ @api_client.config.logger.debug "API called: V0alpha2Api#discover_oidc_configuration\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
401
3054
  end
402
3055
  return data, status_code, headers
403
3056
  end
404
3057
 
405
- # List Identities
406
- # Lists all identities. Does not support search at the moment. Learn how identities work in [Ory Kratos' User And Identity Model Documentation](https://www.ory.sh/docs/next/kratos/concepts/identity-user-model).
3058
+ # Register an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol
3059
+ # This endpoint behaves like the administrative counterpart (`createOAuth2Client`) but is capable of facing the public internet directly and can be used in self-service. It implements the OpenID Connect Dynamic Client Registration Protocol. This feature needs to be enabled in the configuration. This endpoint is disabled by default. It can be enabled by an administrator. Please note that using this endpoint you are not able to choose the `client_secret` nor the `client_id` as those values will be server generated when specifying `token_endpoint_auth_method` as `client_secret_basic` or `client_secret_post`. The `client_secret` will be returned in the response and you will not be able to retrieve it later on. Write the secret down and keep it somewhere safe.
3060
+ # @param o_auth2_client [OAuth2Client]
407
3061
  # @param [Hash] opts the optional parameters
408
- # @option opts [Integer] :per_page Items per Page This is the number of items per page. (default to 250)
409
- # @option opts [Integer] :page Pagination Page (default to 1)
410
- # @return [Array<Identity>]
411
- def admin_list_identities(opts = {})
412
- data, _status_code, _headers = admin_list_identities_with_http_info(opts)
3062
+ # @return [OAuth2Client]
3063
+ def dynamic_client_registration_create_o_auth2_client(o_auth2_client, opts = {})
3064
+ data, _status_code, _headers = dynamic_client_registration_create_o_auth2_client_with_http_info(o_auth2_client, opts)
413
3065
  data
414
3066
  end
415
3067
 
416
- # List Identities
417
- # Lists all identities. Does not support search at the moment. Learn how identities work in [Ory Kratos&#39; User And Identity Model Documentation](https://www.ory.sh/docs/next/kratos/concepts/identity-user-model).
3068
+ # Register an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol
3069
+ # This endpoint behaves like the administrative counterpart (&#x60;createOAuth2Client&#x60;) but is capable of facing the public internet directly and can be used in self-service. It implements the OpenID Connect Dynamic Client Registration Protocol. This feature needs to be enabled in the configuration. This endpoint is disabled by default. It can be enabled by an administrator. Please note that using this endpoint you are not able to choose the &#x60;client_secret&#x60; nor the &#x60;client_id&#x60; as those values will be server generated when specifying &#x60;token_endpoint_auth_method&#x60; as &#x60;client_secret_basic&#x60; or &#x60;client_secret_post&#x60;. The &#x60;client_secret&#x60; will be returned in the response and you will not be able to retrieve it later on. Write the secret down and keep it somewhere safe.
3070
+ # @param o_auth2_client [OAuth2Client]
418
3071
  # @param [Hash] opts the optional parameters
419
- # @option opts [Integer] :per_page Items per Page This is the number of items per page.
420
- # @option opts [Integer] :page Pagination Page
421
- # @return [Array<(Array<Identity>, Integer, Hash)>] Array<Identity> data, response status code and response headers
422
- def admin_list_identities_with_http_info(opts = {})
3072
+ # @return [Array<(OAuth2Client, Integer, Hash)>] OAuth2Client data, response status code and response headers
3073
+ def dynamic_client_registration_create_o_auth2_client_with_http_info(o_auth2_client, opts = {})
423
3074
  if @api_client.config.debugging
424
- @api_client.config.logger.debug 'Calling API: V0alpha2Api.admin_list_identities ...'
425
- end
426
- if @api_client.config.client_side_validation && !opts[:'per_page'].nil? && opts[:'per_page'] > 1000
427
- fail ArgumentError, 'invalid value for "opts[:"per_page"]" when calling V0alpha2Api.admin_list_identities, must be smaller than or equal to 1000.'
428
- end
429
-
430
- if @api_client.config.client_side_validation && !opts[:'per_page'].nil? && opts[:'per_page'] < 1
431
- fail ArgumentError, 'invalid value for "opts[:"per_page"]" when calling V0alpha2Api.admin_list_identities, must be greater than or equal to 1.'
3075
+ @api_client.config.logger.debug 'Calling API: V0alpha2Api.dynamic_client_registration_create_o_auth2_client ...'
432
3076
  end
433
-
434
- if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
435
- fail ArgumentError, 'invalid value for "opts[:"page"]" when calling V0alpha2Api.admin_list_identities, must be greater than or equal to 1.'
3077
+ # verify the required parameter 'o_auth2_client' is set
3078
+ if @api_client.config.client_side_validation && o_auth2_client.nil?
3079
+ fail ArgumentError, "Missing the required parameter 'o_auth2_client' when calling V0alpha2Api.dynamic_client_registration_create_o_auth2_client"
436
3080
  end
437
-
438
3081
  # resource path
439
- local_var_path = '/admin/identities'
3082
+ local_var_path = '/oauth2/register'
440
3083
 
441
3084
  # query parameters
442
3085
  query_params = opts[:query_params] || {}
443
- query_params[:'per_page'] = opts[:'per_page'] if !opts[:'per_page'].nil?
444
- query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
445
3086
 
446
3087
  # header parameters
447
3088
  header_params = opts[:header_params] || {}
448
3089
  # HTTP header 'Accept' (if needed)
449
3090
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
3091
+ # HTTP header 'Content-Type'
3092
+ content_type = @api_client.select_header_content_type(['application/json'])
3093
+ if !content_type.nil?
3094
+ header_params['Content-Type'] = content_type
3095
+ end
450
3096
 
451
3097
  # form parameters
452
3098
  form_params = opts[:form_params] || {}
453
3099
 
454
3100
  # http body (model)
455
- post_body = opts[:debug_body]
3101
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(o_auth2_client)
456
3102
 
457
3103
  # return_type
458
- return_type = opts[:debug_return_type] || 'Array<Identity>'
3104
+ return_type = opts[:debug_return_type] || 'OAuth2Client'
459
3105
 
460
3106
  # auth_names
461
- auth_names = opts[:debug_auth_names] || ['oryAccessToken']
3107
+ auth_names = opts[:debug_auth_names] || []
462
3108
 
463
3109
  new_options = opts.merge(
464
- :operation => :"V0alpha2Api.admin_list_identities",
3110
+ :operation => :"V0alpha2Api.dynamic_client_registration_create_o_auth2_client",
465
3111
  :header_params => header_params,
466
3112
  :query_params => query_params,
467
3113
  :form_params => form_params,
@@ -470,62 +3116,41 @@ module OryClient
470
3116
  :return_type => return_type
471
3117
  )
472
3118
 
473
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
3119
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
474
3120
  if @api_client.config.debugging
475
- @api_client.config.logger.debug "API called: V0alpha2Api#admin_list_identities\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
3121
+ @api_client.config.logger.debug "API called: V0alpha2Api#dynamic_client_registration_create_o_auth2_client\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
476
3122
  end
477
3123
  return data, status_code, headers
478
3124
  end
479
3125
 
480
- # This endpoint returns all sessions that belong to the given Identity.
481
- # This endpoint is useful for: Listing all sessions that belong to an Identity in an administrative context.
482
- # @param id [String] ID is the identity&#39;s ID.
3126
+ # Deletes an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol
3127
+ # This endpoint behaves like the administrative counterpart (`deleteOAuth2Client`) but is capable of facing the public internet directly and can be used in self-service. It implements the OpenID Connect Dynamic Client Registration Protocol. This feature needs to be enabled in the configuration. This endpoint is disabled by default. It can be enabled by an administrator. To use this endpoint, you will need to present the client's authentication credentials. If the OAuth2 Client uses the Token Endpoint Authentication Method `client_secret_post`, you need to present the client secret in the URL query. If it uses `client_secret_basic`, present the Client ID and the Client Secret in the Authorization header. OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities.
3128
+ # @param id [String] The id of the OAuth 2.0 Client.
483
3129
  # @param [Hash] opts the optional parameters
484
- # @option opts [Integer] :per_page Items per Page This is the number of items per page. (default to 250)
485
- # @option opts [Integer] :page Pagination Page (default to 1)
486
- # @option opts [Boolean] :active Active is a boolean flag that filters out sessions based on the state. If no value is provided, all sessions are returned.
487
- # @return [Array<Session>]
488
- def admin_list_identity_sessions(id, opts = {})
489
- data, _status_code, _headers = admin_list_identity_sessions_with_http_info(id, opts)
490
- data
3130
+ # @return [nil]
3131
+ def dynamic_client_registration_delete_o_auth2_client(id, opts = {})
3132
+ dynamic_client_registration_delete_o_auth2_client_with_http_info(id, opts)
3133
+ nil
491
3134
  end
492
3135
 
493
- # This endpoint returns all sessions that belong to the given Identity.
494
- # This endpoint is useful for: Listing all sessions that belong to an Identity in an administrative context.
495
- # @param id [String] ID is the identity&#39;s ID.
3136
+ # Deletes an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol
3137
+ # This endpoint behaves like the administrative counterpart (&#x60;deleteOAuth2Client&#x60;) but is capable of facing the public internet directly and can be used in self-service. It implements the OpenID Connect Dynamic Client Registration Protocol. This feature needs to be enabled in the configuration. This endpoint is disabled by default. It can be enabled by an administrator. To use this endpoint, you will need to present the client&#39;s authentication credentials. If the OAuth2 Client uses the Token Endpoint Authentication Method &#x60;client_secret_post&#x60;, you need to present the client secret in the URL query. If it uses &#x60;client_secret_basic&#x60;, present the Client ID and the Client Secret in the Authorization header. OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities.
3138
+ # @param id [String] The id of the OAuth 2.0 Client.
496
3139
  # @param [Hash] opts the optional parameters
497
- # @option opts [Integer] :per_page Items per Page This is the number of items per page.
498
- # @option opts [Integer] :page Pagination Page
499
- # @option opts [Boolean] :active Active is a boolean flag that filters out sessions based on the state. If no value is provided, all sessions are returned.
500
- # @return [Array<(Array<Session>, Integer, Hash)>] Array<Session> data, response status code and response headers
501
- def admin_list_identity_sessions_with_http_info(id, opts = {})
3140
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
3141
+ def dynamic_client_registration_delete_o_auth2_client_with_http_info(id, opts = {})
502
3142
  if @api_client.config.debugging
503
- @api_client.config.logger.debug 'Calling API: V0alpha2Api.admin_list_identity_sessions ...'
3143
+ @api_client.config.logger.debug 'Calling API: V0alpha2Api.dynamic_client_registration_delete_o_auth2_client ...'
504
3144
  end
505
3145
  # verify the required parameter 'id' is set
506
3146
  if @api_client.config.client_side_validation && id.nil?
507
- fail ArgumentError, "Missing the required parameter 'id' when calling V0alpha2Api.admin_list_identity_sessions"
508
- end
509
- if @api_client.config.client_side_validation && !opts[:'per_page'].nil? && opts[:'per_page'] > 1000
510
- fail ArgumentError, 'invalid value for "opts[:"per_page"]" when calling V0alpha2Api.admin_list_identity_sessions, must be smaller than or equal to 1000.'
511
- end
512
-
513
- if @api_client.config.client_side_validation && !opts[:'per_page'].nil? && opts[:'per_page'] < 1
514
- fail ArgumentError, 'invalid value for "opts[:"per_page"]" when calling V0alpha2Api.admin_list_identity_sessions, must be greater than or equal to 1.'
515
- end
516
-
517
- if @api_client.config.client_side_validation && !opts[:'page'].nil? && opts[:'page'] < 1
518
- fail ArgumentError, 'invalid value for "opts[:"page"]" when calling V0alpha2Api.admin_list_identity_sessions, must be greater than or equal to 1.'
3147
+ fail ArgumentError, "Missing the required parameter 'id' when calling V0alpha2Api.dynamic_client_registration_delete_o_auth2_client"
519
3148
  end
520
-
521
3149
  # resource path
522
- local_var_path = '/admin/identities/{id}/sessions'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
3150
+ local_var_path = '/oauth2/register/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
523
3151
 
524
3152
  # query parameters
525
3153
  query_params = opts[:query_params] || {}
526
- query_params[:'per_page'] = opts[:'per_page'] if !opts[:'per_page'].nil?
527
- query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil?
528
- query_params[:'active'] = opts[:'active'] if !opts[:'active'].nil?
529
3154
 
530
3155
  # header parameters
531
3156
  header_params = opts[:header_params] || {}
@@ -539,13 +3164,13 @@ module OryClient
539
3164
  post_body = opts[:debug_body]
540
3165
 
541
3166
  # return_type
542
- return_type = opts[:debug_return_type] || 'Array<Session>'
3167
+ return_type = opts[:debug_return_type]
543
3168
 
544
3169
  # auth_names
545
- auth_names = opts[:debug_auth_names] || ['oryAccessToken']
3170
+ auth_names = opts[:debug_auth_names] || ['bearer']
546
3171
 
547
3172
  new_options = opts.merge(
548
- :operation => :"V0alpha2Api.admin_list_identity_sessions",
3173
+ :operation => :"V0alpha2Api.dynamic_client_registration_delete_o_auth2_client",
549
3174
  :header_params => header_params,
550
3175
  :query_params => query_params,
551
3176
  :form_params => form_params,
@@ -554,40 +3179,38 @@ module OryClient
554
3179
  :return_type => return_type
555
3180
  )
556
3181
 
557
- data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
3182
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
558
3183
  if @api_client.config.debugging
559
- @api_client.config.logger.debug "API called: V0alpha2Api#admin_list_identity_sessions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
3184
+ @api_client.config.logger.debug "API called: V0alpha2Api#dynamic_client_registration_delete_o_auth2_client\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
560
3185
  end
561
3186
  return data, status_code, headers
562
3187
  end
563
3188
 
564
- # Update an Identity
565
- # This endpoint updates an identity. The full identity payload (except credentials) is expected. This endpoint does not support patching. Learn how identities work in [Ory Kratos' User And Identity Model Documentation](https://www.ory.sh/docs/next/kratos/concepts/identity-user-model).
566
- # @param id [String] ID must be set to the ID of identity you want to update
3189
+ # Get an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol
3190
+ # This endpoint behaves like the administrative counterpart (`getOAuth2Client`) but is capable of facing the public internet directly and can be used in self-service. It implements the OpenID Connect Dynamic Client Registration Protocol. This feature needs to be enabled in the configuration. This endpoint is disabled by default. It can be enabled by an administrator. To use this endpoint, you will need to present the client's authentication credentials. If the OAuth2 Client uses the Token Endpoint Authentication Method `client_secret_post`, you need to present the client secret in the URL query. If it uses `client_secret_basic`, present the Client ID and the Client Secret in the Authorization header. OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities.
3191
+ # @param id [String] The id of the OAuth 2.0 Client.
567
3192
  # @param [Hash] opts the optional parameters
568
- # @option opts [AdminUpdateIdentityBody] :admin_update_identity_body
569
- # @return [Identity]
570
- def admin_update_identity(id, opts = {})
571
- data, _status_code, _headers = admin_update_identity_with_http_info(id, opts)
3193
+ # @return [OAuth2Client]
3194
+ def dynamic_client_registration_get_o_auth2_client(id, opts = {})
3195
+ data, _status_code, _headers = dynamic_client_registration_get_o_auth2_client_with_http_info(id, opts)
572
3196
  data
573
3197
  end
574
3198
 
575
- # Update an Identity
576
- # This endpoint updates an identity. The full identity payload (except credentials) is expected. This endpoint does not support patching. Learn how identities work in [Ory Kratos&#39; User And Identity Model Documentation](https://www.ory.sh/docs/next/kratos/concepts/identity-user-model).
577
- # @param id [String] ID must be set to the ID of identity you want to update
3199
+ # Get an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol
3200
+ # This endpoint behaves like the administrative counterpart (&#x60;getOAuth2Client&#x60;) but is capable of facing the public internet directly and can be used in self-service. It implements the OpenID Connect Dynamic Client Registration Protocol. This feature needs to be enabled in the configuration. This endpoint is disabled by default. It can be enabled by an administrator. To use this endpoint, you will need to present the client&#39;s authentication credentials. If the OAuth2 Client uses the Token Endpoint Authentication Method &#x60;client_secret_post&#x60;, you need to present the client secret in the URL query. If it uses &#x60;client_secret_basic&#x60;, present the Client ID and the Client Secret in the Authorization header. OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities.
3201
+ # @param id [String] The id of the OAuth 2.0 Client.
578
3202
  # @param [Hash] opts the optional parameters
579
- # @option opts [AdminUpdateIdentityBody] :admin_update_identity_body
580
- # @return [Array<(Identity, Integer, Hash)>] Identity data, response status code and response headers
581
- def admin_update_identity_with_http_info(id, opts = {})
3203
+ # @return [Array<(OAuth2Client, Integer, Hash)>] OAuth2Client data, response status code and response headers
3204
+ def dynamic_client_registration_get_o_auth2_client_with_http_info(id, opts = {})
582
3205
  if @api_client.config.debugging
583
- @api_client.config.logger.debug 'Calling API: V0alpha2Api.admin_update_identity ...'
3206
+ @api_client.config.logger.debug 'Calling API: V0alpha2Api.dynamic_client_registration_get_o_auth2_client ...'
584
3207
  end
585
3208
  # verify the required parameter 'id' is set
586
3209
  if @api_client.config.client_side_validation && id.nil?
587
- fail ArgumentError, "Missing the required parameter 'id' when calling V0alpha2Api.admin_update_identity"
3210
+ fail ArgumentError, "Missing the required parameter 'id' when calling V0alpha2Api.dynamic_client_registration_get_o_auth2_client"
588
3211
  end
589
3212
  # resource path
590
- local_var_path = '/admin/identities/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
3213
+ local_var_path = '/oauth2/register/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
591
3214
 
592
3215
  # query parameters
593
3216
  query_params = opts[:query_params] || {}
@@ -596,26 +3219,21 @@ module OryClient
596
3219
  header_params = opts[:header_params] || {}
597
3220
  # HTTP header 'Accept' (if needed)
598
3221
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
599
- # HTTP header 'Content-Type'
600
- content_type = @api_client.select_header_content_type(['application/json'])
601
- if !content_type.nil?
602
- header_params['Content-Type'] = content_type
603
- end
604
3222
 
605
3223
  # form parameters
606
3224
  form_params = opts[:form_params] || {}
607
3225
 
608
3226
  # http body (model)
609
- post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'admin_update_identity_body'])
3227
+ post_body = opts[:debug_body]
610
3228
 
611
3229
  # return_type
612
- return_type = opts[:debug_return_type] || 'Identity'
3230
+ return_type = opts[:debug_return_type] || 'OAuth2Client'
613
3231
 
614
3232
  # auth_names
615
- auth_names = opts[:debug_auth_names] || ['oryAccessToken']
3233
+ auth_names = opts[:debug_auth_names] || ['bearer']
616
3234
 
617
3235
  new_options = opts.merge(
618
- :operation => :"V0alpha2Api.admin_update_identity",
3236
+ :operation => :"V0alpha2Api.dynamic_client_registration_get_o_auth2_client",
619
3237
  :header_params => header_params,
620
3238
  :query_params => query_params,
621
3239
  :form_params => form_params,
@@ -624,34 +3242,44 @@ module OryClient
624
3242
  :return_type => return_type
625
3243
  )
626
3244
 
627
- data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
3245
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
628
3246
  if @api_client.config.debugging
629
- @api_client.config.logger.debug "API called: V0alpha2Api#admin_update_identity\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
3247
+ @api_client.config.logger.debug "API called: V0alpha2Api#dynamic_client_registration_get_o_auth2_client\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
630
3248
  end
631
3249
  return data, status_code, headers
632
3250
  end
633
3251
 
634
- # Create a Project
635
- # Creates a new project.
3252
+ # Update an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol
3253
+ # This endpoint behaves like the administrative counterpart (`updateOAuth2Client`) but is capable of facing the public internet directly and can be used in self-service. It implements the OpenID Connect Dynamic Client Registration Protocol. This feature needs to be enabled in the configuration. This endpoint is disabled by default. It can be enabled by an administrator. If you pass `client_secret` the secret is used, otherwise a random secret is generated. The secret is echoed in the response. It is not possible to retrieve it later on. To use this endpoint, you will need to present the client's authentication credentials. If the OAuth2 Client uses the Token Endpoint Authentication Method `client_secret_post`, you need to present the client secret in the URL query. If it uses `client_secret_basic`, present the Client ID and the Client Secret in the Authorization header. OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities.
3254
+ # @param id [String] The id of the OAuth 2.0 Client.
3255
+ # @param o_auth2_client [OAuth2Client]
636
3256
  # @param [Hash] opts the optional parameters
637
- # @option opts [CreateProjectBody] :create_project_body
638
- # @return [Project]
639
- def create_project(opts = {})
640
- data, _status_code, _headers = create_project_with_http_info(opts)
3257
+ # @return [OAuth2Client]
3258
+ def dynamic_client_registration_update_o_auth2_client(id, o_auth2_client, opts = {})
3259
+ data, _status_code, _headers = dynamic_client_registration_update_o_auth2_client_with_http_info(id, o_auth2_client, opts)
641
3260
  data
642
3261
  end
643
3262
 
644
- # Create a Project
645
- # Creates a new project.
3263
+ # Update an OAuth 2.0 Client using the OpenID / OAuth2 Dynamic Client Registration Management Protocol
3264
+ # This endpoint behaves like the administrative counterpart (&#x60;updateOAuth2Client&#x60;) but is capable of facing the public internet directly and can be used in self-service. It implements the OpenID Connect Dynamic Client Registration Protocol. This feature needs to be enabled in the configuration. This endpoint is disabled by default. It can be enabled by an administrator. If you pass &#x60;client_secret&#x60; the secret is used, otherwise a random secret is generated. The secret is echoed in the response. It is not possible to retrieve it later on. To use this endpoint, you will need to present the client&#39;s authentication credentials. If the OAuth2 Client uses the Token Endpoint Authentication Method &#x60;client_secret_post&#x60;, you need to present the client secret in the URL query. If it uses &#x60;client_secret_basic&#x60;, present the Client ID and the Client Secret in the Authorization header. OAuth 2.0 clients are used to perform OAuth 2.0 and OpenID Connect flows. Usually, OAuth 2.0 clients are generated for applications which want to consume your OAuth 2.0 or OpenID Connect capabilities.
3265
+ # @param id [String] The id of the OAuth 2.0 Client.
3266
+ # @param o_auth2_client [OAuth2Client]
646
3267
  # @param [Hash] opts the optional parameters
647
- # @option opts [CreateProjectBody] :create_project_body
648
- # @return [Array<(Project, Integer, Hash)>] Project data, response status code and response headers
649
- def create_project_with_http_info(opts = {})
3268
+ # @return [Array<(OAuth2Client, Integer, Hash)>] OAuth2Client data, response status code and response headers
3269
+ def dynamic_client_registration_update_o_auth2_client_with_http_info(id, o_auth2_client, opts = {})
650
3270
  if @api_client.config.debugging
651
- @api_client.config.logger.debug 'Calling API: V0alpha2Api.create_project ...'
3271
+ @api_client.config.logger.debug 'Calling API: V0alpha2Api.dynamic_client_registration_update_o_auth2_client ...'
3272
+ end
3273
+ # verify the required parameter 'id' is set
3274
+ if @api_client.config.client_side_validation && id.nil?
3275
+ fail ArgumentError, "Missing the required parameter 'id' when calling V0alpha2Api.dynamic_client_registration_update_o_auth2_client"
3276
+ end
3277
+ # verify the required parameter 'o_auth2_client' is set
3278
+ if @api_client.config.client_side_validation && o_auth2_client.nil?
3279
+ fail ArgumentError, "Missing the required parameter 'o_auth2_client' when calling V0alpha2Api.dynamic_client_registration_update_o_auth2_client"
652
3280
  end
653
3281
  # resource path
654
- local_var_path = '/projects'
3282
+ local_var_path = '/oauth2/register/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
655
3283
 
656
3284
  # query parameters
657
3285
  query_params = opts[:query_params] || {}
@@ -670,16 +3298,16 @@ module OryClient
670
3298
  form_params = opts[:form_params] || {}
671
3299
 
672
3300
  # http body (model)
673
- post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'create_project_body'])
3301
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(o_auth2_client)
674
3302
 
675
3303
  # return_type
676
- return_type = opts[:debug_return_type] || 'Project'
3304
+ return_type = opts[:debug_return_type] || 'OAuth2Client'
677
3305
 
678
3306
  # auth_names
679
- auth_names = opts[:debug_auth_names] || ['oryAccessToken']
3307
+ auth_names = opts[:debug_auth_names] || ['bearer']
680
3308
 
681
3309
  new_options = opts.merge(
682
- :operation => :"V0alpha2Api.create_project",
3310
+ :operation => :"V0alpha2Api.dynamic_client_registration_update_o_auth2_client",
683
3311
  :header_params => header_params,
684
3312
  :query_params => query_params,
685
3313
  :form_params => form_params,
@@ -688,34 +3316,36 @@ module OryClient
688
3316
  :return_type => return_type
689
3317
  )
690
3318
 
691
- data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
3319
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
692
3320
  if @api_client.config.debugging
693
- @api_client.config.logger.debug "API called: V0alpha2Api#create_project\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
3321
+ @api_client.config.logger.debug "API called: V0alpha2Api#dynamic_client_registration_update_o_auth2_client\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
694
3322
  end
695
3323
  return data, status_code, headers
696
3324
  end
697
3325
 
698
- # Create a Logout URL for Browsers
699
- # This endpoint initializes a browser-based user logout flow and a URL which can be used to log out the user. This endpoint is NOT INTENDED for API clients and only works with browsers (Chrome, Firefox, ...). For API clients you can call the `/self-service/logout/api` URL directly with the Ory Session Token. The URL is only valid for the currently signed in user. If no user is signed in, this endpoint returns a 401 error. When calling this endpoint from a backend, please ensure to properly forward the HTTP cookies.
3326
+ # Get a JSON Schema
3327
+ # @param id [String] ID must be set to the ID of schema you want to get
700
3328
  # @param [Hash] opts the optional parameters
701
- # @option opts [String] :cookie HTTP Cookies If you call this endpoint from a backend, please include the original Cookie header in the request.
702
- # @return [SelfServiceLogoutUrl]
703
- def create_self_service_logout_flow_url_for_browsers(opts = {})
704
- data, _status_code, _headers = create_self_service_logout_flow_url_for_browsers_with_http_info(opts)
3329
+ # @return [Object]
3330
+ def get_identity_schema(id, opts = {})
3331
+ data, _status_code, _headers = get_identity_schema_with_http_info(id, opts)
705
3332
  data
706
3333
  end
707
3334
 
708
- # Create a Logout URL for Browsers
709
- # This endpoint initializes a browser-based user logout flow and a URL which can be used to log out the user. This endpoint is NOT INTENDED for API clients and only works with browsers (Chrome, Firefox, ...). For API clients you can call the &#x60;/self-service/logout/api&#x60; URL directly with the Ory Session Token. The URL is only valid for the currently signed in user. If no user is signed in, this endpoint returns a 401 error. When calling this endpoint from a backend, please ensure to properly forward the HTTP cookies.
3335
+ # Get a JSON Schema
3336
+ # @param id [String] ID must be set to the ID of schema you want to get
710
3337
  # @param [Hash] opts the optional parameters
711
- # @option opts [String] :cookie HTTP Cookies If you call this endpoint from a backend, please include the original Cookie header in the request.
712
- # @return [Array<(SelfServiceLogoutUrl, Integer, Hash)>] SelfServiceLogoutUrl data, response status code and response headers
713
- def create_self_service_logout_flow_url_for_browsers_with_http_info(opts = {})
3338
+ # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
3339
+ def get_identity_schema_with_http_info(id, opts = {})
714
3340
  if @api_client.config.debugging
715
- @api_client.config.logger.debug 'Calling API: V0alpha2Api.create_self_service_logout_flow_url_for_browsers ...'
3341
+ @api_client.config.logger.debug 'Calling API: V0alpha2Api.get_identity_schema ...'
3342
+ end
3343
+ # verify the required parameter 'id' is set
3344
+ if @api_client.config.client_side_validation && id.nil?
3345
+ fail ArgumentError, "Missing the required parameter 'id' when calling V0alpha2Api.get_identity_schema"
716
3346
  end
717
3347
  # resource path
718
- local_var_path = '/self-service/logout/browser'
3348
+ local_var_path = '/schemas/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
719
3349
 
720
3350
  # query parameters
721
3351
  query_params = opts[:query_params] || {}
@@ -724,7 +3354,6 @@ module OryClient
724
3354
  header_params = opts[:header_params] || {}
725
3355
  # HTTP header 'Accept' (if needed)
726
3356
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
727
- header_params[:'cookie'] = opts[:'cookie'] if !opts[:'cookie'].nil?
728
3357
 
729
3358
  # form parameters
730
3359
  form_params = opts[:form_params] || {}
@@ -733,13 +3362,13 @@ module OryClient
733
3362
  post_body = opts[:debug_body]
734
3363
 
735
3364
  # return_type
736
- return_type = opts[:debug_return_type] || 'SelfServiceLogoutUrl'
3365
+ return_type = opts[:debug_return_type] || 'Object'
737
3366
 
738
3367
  # auth_names
739
3368
  auth_names = opts[:debug_auth_names] || []
740
3369
 
741
3370
  new_options = opts.merge(
742
- :operation => :"V0alpha2Api.create_self_service_logout_flow_url_for_browsers",
3371
+ :operation => :"V0alpha2Api.get_identity_schema",
743
3372
  :header_params => header_params,
744
3373
  :query_params => query_params,
745
3374
  :form_params => form_params,
@@ -750,34 +3379,30 @@ module OryClient
750
3379
 
751
3380
  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
752
3381
  if @api_client.config.debugging
753
- @api_client.config.logger.debug "API called: V0alpha2Api#create_self_service_logout_flow_url_for_browsers\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
3382
+ @api_client.config.logger.debug "API called: V0alpha2Api#get_identity_schema\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
754
3383
  end
755
3384
  return data, status_code, headers
756
3385
  end
757
3386
 
758
- # Get a JSON Schema
759
- # @param id [String] ID must be set to the ID of schema you want to get
3387
+ # OpenID Connect Userinfo
3388
+ # This endpoint returns the payload of the ID Token, including the idTokenExtra values, of the provided OAuth 2.0 Access Token. For more information please [refer to the spec](http://openid.net/specs/openid-connect-core-1_0.html#UserInfo). In the case of authentication error, a WWW-Authenticate header might be set in the response with more information about the error. See [the spec](https://datatracker.ietf.org/doc/html/rfc6750#section-3) for more details about header format.
760
3389
  # @param [Hash] opts the optional parameters
761
- # @return [Object]
762
- def get_json_schema(id, opts = {})
763
- data, _status_code, _headers = get_json_schema_with_http_info(id, opts)
3390
+ # @return [OidcUserInfo]
3391
+ def get_oidc_user_info(opts = {})
3392
+ data, _status_code, _headers = get_oidc_user_info_with_http_info(opts)
764
3393
  data
765
3394
  end
766
3395
 
767
- # Get a JSON Schema
768
- # @param id [String] ID must be set to the ID of schema you want to get
3396
+ # OpenID Connect Userinfo
3397
+ # This endpoint returns the payload of the ID Token, including the idTokenExtra values, of the provided OAuth 2.0 Access Token. For more information please [refer to the spec](http://openid.net/specs/openid-connect-core-1_0.html#UserInfo). In the case of authentication error, a WWW-Authenticate header might be set in the response with more information about the error. See [the spec](https://datatracker.ietf.org/doc/html/rfc6750#section-3) for more details about header format.
769
3398
  # @param [Hash] opts the optional parameters
770
- # @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
771
- def get_json_schema_with_http_info(id, opts = {})
3399
+ # @return [Array<(OidcUserInfo, Integer, Hash)>] OidcUserInfo data, response status code and response headers
3400
+ def get_oidc_user_info_with_http_info(opts = {})
772
3401
  if @api_client.config.debugging
773
- @api_client.config.logger.debug 'Calling API: V0alpha2Api.get_json_schema ...'
774
- end
775
- # verify the required parameter 'id' is set
776
- if @api_client.config.client_side_validation && id.nil?
777
- fail ArgumentError, "Missing the required parameter 'id' when calling V0alpha2Api.get_json_schema"
3402
+ @api_client.config.logger.debug 'Calling API: V0alpha2Api.get_oidc_user_info ...'
778
3403
  end
779
3404
  # resource path
780
- local_var_path = '/schemas/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
3405
+ local_var_path = '/userinfo'
781
3406
 
782
3407
  # query parameters
783
3408
  query_params = opts[:query_params] || {}
@@ -794,13 +3419,13 @@ module OryClient
794
3419
  post_body = opts[:debug_body]
795
3420
 
796
3421
  # return_type
797
- return_type = opts[:debug_return_type] || 'Object'
3422
+ return_type = opts[:debug_return_type] || 'OidcUserInfo'
798
3423
 
799
3424
  # auth_names
800
- auth_names = opts[:debug_auth_names] || []
3425
+ auth_names = opts[:debug_auth_names] || ['oauth2']
801
3426
 
802
3427
  new_options = opts.merge(
803
- :operation => :"V0alpha2Api.get_json_schema",
3428
+ :operation => :"V0alpha2Api.get_oidc_user_info",
804
3429
  :header_params => header_params,
805
3430
  :query_params => query_params,
806
3431
  :form_params => form_params,
@@ -811,7 +3436,7 @@ module OryClient
811
3436
 
812
3437
  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
813
3438
  if @api_client.config.debugging
814
- @api_client.config.logger.debug "API called: V0alpha2Api#get_json_schema\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
3439
+ @api_client.config.logger.debug "API called: V0alpha2Api#get_oidc_user_info\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
815
3440
  end
816
3441
  return data, status_code, headers
817
3442
  end
@@ -1948,7 +4573,7 @@ module OryClient
1948
4573
  end
1949
4574
 
1950
4575
  # Initialize Verification Flow for APIs, Services, Apps, ...
1951
- # This endpoint initiates a verification flow for API clients such as mobile devices, smart TVs, and so on. To fetch an existing verification flow call `/self-service/verification/flows?flow=<flow_id>`. You MUST NOT use this endpoint in client-side (Single Page Apps, ReactJS, AngularJS) nor server-side (Java Server Pages, NodeJS, PHP, Golang, ...) browser applications. Using this endpoint in these applications will make you vulnerable to a variety of CSRF attacks. This endpoint MUST ONLY be used in scenarios such as native mobile apps (React Native, Objective C, Swift, Java, ...). More information can be found at [Ory Kratos Email and Phone Verification Documentation](https://www.ory.sh/docs/kratos/selfservice/flows/verify-email-account-activation).
4576
+ # This endpoint initiates a verification flow for API clients such as mobile devices, smart TVs, and so on. To fetch an existing verification flow call `/self-service/verification/flows?flow=<flow_id>`. You MUST NOT use this endpoint in client-side (Single Page Apps, ReactJS, AngularJS) nor server-side (Java Server Pages, NodeJS, PHP, Golang, ...) browser applications. Using this endpoint in these applications will make you vulnerable to a variety of CSRF attacks. This endpoint MUST ONLY be used in scenarios such as native mobile apps (React Native, Objective C, Swift, Java, ...). More information can be found at [Ory Kratos Email and Phone Verification Documentation](https://www.ory.sh/docs/kratos/self-service/flows/verify-email-account-activation).
1952
4577
  # @param [Hash] opts the optional parameters
1953
4578
  # @return [SelfServiceVerificationFlow]
1954
4579
  def initialize_self_service_verification_flow_without_browser(opts = {})
@@ -1957,7 +4582,7 @@ module OryClient
1957
4582
  end
1958
4583
 
1959
4584
  # Initialize Verification Flow for APIs, Services, Apps, ...
1960
- # This endpoint initiates a verification flow for API clients such as mobile devices, smart TVs, and so on. To fetch an existing verification flow call &#x60;/self-service/verification/flows?flow&#x3D;&lt;flow_id&gt;&#x60;. You MUST NOT use this endpoint in client-side (Single Page Apps, ReactJS, AngularJS) nor server-side (Java Server Pages, NodeJS, PHP, Golang, ...) browser applications. Using this endpoint in these applications will make you vulnerable to a variety of CSRF attacks. This endpoint MUST ONLY be used in scenarios such as native mobile apps (React Native, Objective C, Swift, Java, ...). More information can be found at [Ory Kratos Email and Phone Verification Documentation](https://www.ory.sh/docs/kratos/selfservice/flows/verify-email-account-activation).
4585
+ # This endpoint initiates a verification flow for API clients such as mobile devices, smart TVs, and so on. To fetch an existing verification flow call &#x60;/self-service/verification/flows?flow&#x3D;&lt;flow_id&gt;&#x60;. You MUST NOT use this endpoint in client-side (Single Page Apps, ReactJS, AngularJS) nor server-side (Java Server Pages, NodeJS, PHP, Golang, ...) browser applications. Using this endpoint in these applications will make you vulnerable to a variety of CSRF attacks. This endpoint MUST ONLY be used in scenarios such as native mobile apps (React Native, Objective C, Swift, Java, ...). More information can be found at [Ory Kratos Email and Phone Verification Documentation](https://www.ory.sh/docs/kratos/self-service/flows/verify-email-account-activation).
1961
4586
  # @param [Hash] opts the optional parameters
1962
4587
  # @return [Array<(SelfServiceVerificationFlow, Integer, Hash)>] SelfServiceVerificationFlow data, response status code and response headers
1963
4588
  def initialize_self_service_verification_flow_without_browser_with_http_info(opts = {})
@@ -2007,8 +4632,8 @@ module OryClient
2007
4632
  # Get all Identity Schemas
2008
4633
  # @param [Hash] opts the optional parameters
2009
4634
  # @option opts [Integer] :per_page Items per Page This is the number of items per page. (default to 250)
2010
- # @option opts [Integer] :page Pagination Page (default to 1)
2011
- # @return [Array<IdentitySchema>]
4635
+ # @option opts [Integer] :page Pagination Page This value is currently an integer, but it is not sequential. The value is not the page number, but a reference. The next page can be any number and some numbers might return an empty list. For example, page 2 might not follow after page 1. And even if page 3 and 5 exist, but page 4 might not exist. (default to 1)
4636
+ # @return [Array<IdentitySchemaContainer>]
2012
4637
  def list_identity_schemas(opts = {})
2013
4638
  data, _status_code, _headers = list_identity_schemas_with_http_info(opts)
2014
4639
  data
@@ -2016,9 +4641,9 @@ module OryClient
2016
4641
 
2017
4642
  # Get all Identity Schemas
2018
4643
  # @param [Hash] opts the optional parameters
2019
- # @option opts [Integer] :per_page Items per Page This is the number of items per page.
2020
- # @option opts [Integer] :page Pagination Page
2021
- # @return [Array<(Array<IdentitySchema>, Integer, Hash)>] Array<IdentitySchema> data, response status code and response headers
4644
+ # @option opts [Integer] :per_page Items per Page This is the number of items per page. (default to 250)
4645
+ # @option opts [Integer] :page Pagination Page This value is currently an integer, but it is not sequential. The value is not the page number, but a reference. The next page can be any number and some numbers might return an empty list. For example, page 2 might not follow after page 1. And even if page 3 and 5 exist, but page 4 might not exist. (default to 1)
4646
+ # @return [Array<(Array<IdentitySchemaContainer>, Integer, Hash)>] Array<IdentitySchemaContainer> data, response status code and response headers
2022
4647
  def list_identity_schemas_with_http_info(opts = {})
2023
4648
  if @api_client.config.debugging
2024
4649
  @api_client.config.logger.debug 'Calling API: V0alpha2Api.list_identity_schemas ...'
@@ -2055,7 +4680,7 @@ module OryClient
2055
4680
  post_body = opts[:debug_body]
2056
4681
 
2057
4682
  # return_type
2058
- return_type = opts[:debug_return_type] || 'Array<IdentitySchema>'
4683
+ return_type = opts[:debug_return_type] || 'Array<IdentitySchemaContainer>'
2059
4684
 
2060
4685
  # auth_names
2061
4686
  auth_names = opts[:debug_auth_names] || []
@@ -2140,7 +4765,7 @@ module OryClient
2140
4765
  # @option opts [String] :x_session_token Set the Session Token when calling from non-browser clients. A session token has a format of &#x60;MP2YWEMeM8MxjkGKpH4dqOQ4Q4DlSPaj&#x60;.
2141
4766
  # @option opts [String] :cookie Set the Cookie Header. This is especially useful when calling this endpoint from a server-side application. In that scenario you must include the HTTP Cookie Header which originally was included in the request to your server. An example of a session in the HTTP Cookie Header is: &#x60;ory_kratos_session&#x3D;a19iOVAbdzdgl70Rq1QZmrKmcjDtdsviCTZx7m9a9yHIUS8Wa9T7hvqyGTsLHi6Qifn2WUfpAKx9DWp0SJGleIn9vh2YF4A16id93kXFTgIgmwIOvbVAScyrx7yVl6bPZnCx27ec4WQDtaTewC1CpgudeDV2jQQnSaCP6ny3xa8qLH-QUgYqdQuoA_LF1phxgRCUfIrCLQOkolX5nv3ze_f&#x3D;&#x3D;&#x60;. It is ok if more than one cookie are included here as all other cookies will be ignored.
2142
4767
  # @option opts [Integer] :per_page Items per Page This is the number of items per page. (default to 250)
2143
- # @option opts [Integer] :page Pagination Page (default to 1)
4768
+ # @option opts [Integer] :page Pagination Page This value is currently an integer, but it is not sequential. The value is not the page number, but a reference. The next page can be any number and some numbers might return an empty list. For example, page 2 might not follow after page 1. And even if page 3 and 5 exist, but page 4 might not exist. (default to 1)
2144
4769
  # @return [Array<Session>]
2145
4770
  def list_sessions(opts = {})
2146
4771
  data, _status_code, _headers = list_sessions_with_http_info(opts)
@@ -2152,8 +4777,8 @@ module OryClient
2152
4777
  # @param [Hash] opts the optional parameters
2153
4778
  # @option opts [String] :x_session_token Set the Session Token when calling from non-browser clients. A session token has a format of &#x60;MP2YWEMeM8MxjkGKpH4dqOQ4Q4DlSPaj&#x60;.
2154
4779
  # @option opts [String] :cookie Set the Cookie Header. This is especially useful when calling this endpoint from a server-side application. In that scenario you must include the HTTP Cookie Header which originally was included in the request to your server. An example of a session in the HTTP Cookie Header is: &#x60;ory_kratos_session&#x3D;a19iOVAbdzdgl70Rq1QZmrKmcjDtdsviCTZx7m9a9yHIUS8Wa9T7hvqyGTsLHi6Qifn2WUfpAKx9DWp0SJGleIn9vh2YF4A16id93kXFTgIgmwIOvbVAScyrx7yVl6bPZnCx27ec4WQDtaTewC1CpgudeDV2jQQnSaCP6ny3xa8qLH-QUgYqdQuoA_LF1phxgRCUfIrCLQOkolX5nv3ze_f&#x3D;&#x3D;&#x60;. It is ok if more than one cookie are included here as all other cookies will be ignored.
2155
- # @option opts [Integer] :per_page Items per Page This is the number of items per page.
2156
- # @option opts [Integer] :page Pagination Page
4780
+ # @option opts [Integer] :per_page Items per Page This is the number of items per page. (default to 250)
4781
+ # @option opts [Integer] :page Pagination Page This value is currently an integer, but it is not sequential. The value is not the page number, but a reference. The next page can be any number and some numbers might return an empty list. For example, page 2 might not follow after page 1. And even if page 3 and 5 exist, but page 4 might not exist. (default to 1)
2157
4782
  # @return [Array<(Array<Session>, Integer, Hash)>] Array<Session> data, response status code and response headers
2158
4783
  def list_sessions_with_http_info(opts = {})
2159
4784
  if @api_client.config.debugging
@@ -2215,8 +4840,8 @@ module OryClient
2215
4840
  return data, status_code, headers
2216
4841
  end
2217
4842
 
2218
- # Patch an Ory Cloud Project Configuration
2219
- # This endpoints allows you to patch individual Ory Cloud Project configuration keys for Ory's services (identity, permission, ...). The configuration format is fully compatible with the open source projects for the respective services (e.g. Ory Kratos for Identity, Ory Keto for Permissions). This endpoint expects the `version` key to be set in the payload. If it is unset, it will try to import the config as if it is from the most recent version. If you have an older version of a configuration, you should set the version key in the payload! While this endpoint is able to process all configuration items related to features (e.g. password reset), it does not support operational configuration items (e.g. port, tracing, logging) otherwise available in the open source. For configuration items that can not be translated to Ory Cloud, this endpoint will return a list of warnings to help you understand which parts of your config could not be processed.
4843
+ # Patch an Ory Cloud Project Configuration`
4844
+ # Deprecated: Use the `patchProjectWithRevision` endpoint instead to specify the exact revision the patch was generated for. This endpoints allows you to patch individual Ory Cloud Project configuration keys for Ory's services (identity, permission, ...). The configuration format is fully compatible with the open source projects for the respective services (e.g. Ory Kratos for Identity, Ory Keto for Permissions). This endpoint expects the `version` key to be set in the payload. If it is unset, it will try to import the config as if it is from the most recent version. If you have an older version of a configuration, you should set the version key in the payload! While this endpoint is able to process all configuration items related to features (e.g. password reset), it does not support operational configuration items (e.g. port, tracing, logging) otherwise available in the open source. For configuration items that can not be translated to Ory Cloud, this endpoint will return a list of warnings to help you understand which parts of your config could not be processed.
2220
4845
  # @param project_id [String] Project ID The project&#39;s ID.
2221
4846
  # @param [Hash] opts the optional parameters
2222
4847
  # @option opts [Array<JsonPatch>] :json_patch
@@ -2226,8 +4851,8 @@ module OryClient
2226
4851
  data
2227
4852
  end
2228
4853
 
2229
- # Patch an Ory Cloud Project Configuration
2230
- # This endpoints allows you to patch individual Ory Cloud Project configuration keys for Ory&#39;s services (identity, permission, ...). The configuration format is fully compatible with the open source projects for the respective services (e.g. Ory Kratos for Identity, Ory Keto for Permissions). This endpoint expects the &#x60;version&#x60; key to be set in the payload. If it is unset, it will try to import the config as if it is from the most recent version. If you have an older version of a configuration, you should set the version key in the payload! While this endpoint is able to process all configuration items related to features (e.g. password reset), it does not support operational configuration items (e.g. port, tracing, logging) otherwise available in the open source. For configuration items that can not be translated to Ory Cloud, this endpoint will return a list of warnings to help you understand which parts of your config could not be processed.
4854
+ # Patch an Ory Cloud Project Configuration&#x60;
4855
+ # Deprecated: Use the &#x60;patchProjectWithRevision&#x60; endpoint instead to specify the exact revision the patch was generated for. This endpoints allows you to patch individual Ory Cloud Project configuration keys for Ory&#39;s services (identity, permission, ...). The configuration format is fully compatible with the open source projects for the respective services (e.g. Ory Kratos for Identity, Ory Keto for Permissions). This endpoint expects the &#x60;version&#x60; key to be set in the payload. If it is unset, it will try to import the config as if it is from the most recent version. If you have an older version of a configuration, you should set the version key in the payload! While this endpoint is able to process all configuration items related to features (e.g. password reset), it does not support operational configuration items (e.g. port, tracing, logging) otherwise available in the open source. For configuration items that can not be translated to Ory Cloud, this endpoint will return a list of warnings to help you understand which parts of your config could not be processed.
2231
4856
  # @param project_id [String] Project ID The project&#39;s ID.
2232
4857
  # @param [Hash] opts the optional parameters
2233
4858
  # @option opts [Array<JsonPatch>] :json_patch
@@ -2285,6 +4910,199 @@ module OryClient
2285
4910
  return data, status_code, headers
2286
4911
  end
2287
4912
 
4913
+ # The OAuth 2.0 Authorize Endpoint
4914
+ # This endpoint is not documented here because you should never use your own implementation to perform OAuth2 flows. OAuth2 is a very popular protocol and a library for your programming language will exists. To learn more about this flow please refer to the specification: https://tools.ietf.org/html/rfc6749
4915
+ # @param [Hash] opts the optional parameters
4916
+ # @return [OAuth2ApiError]
4917
+ def perform_o_auth2_authorization_flow(opts = {})
4918
+ data, _status_code, _headers = perform_o_auth2_authorization_flow_with_http_info(opts)
4919
+ data
4920
+ end
4921
+
4922
+ # The OAuth 2.0 Authorize Endpoint
4923
+ # This endpoint is not documented here because you should never use your own implementation to perform OAuth2 flows. OAuth2 is a very popular protocol and a library for your programming language will exists. To learn more about this flow please refer to the specification: https://tools.ietf.org/html/rfc6749
4924
+ # @param [Hash] opts the optional parameters
4925
+ # @return [Array<(OAuth2ApiError, Integer, Hash)>] OAuth2ApiError data, response status code and response headers
4926
+ def perform_o_auth2_authorization_flow_with_http_info(opts = {})
4927
+ if @api_client.config.debugging
4928
+ @api_client.config.logger.debug 'Calling API: V0alpha2Api.perform_o_auth2_authorization_flow ...'
4929
+ end
4930
+ # resource path
4931
+ local_var_path = '/oauth2/auth'
4932
+
4933
+ # query parameters
4934
+ query_params = opts[:query_params] || {}
4935
+
4936
+ # header parameters
4937
+ header_params = opts[:header_params] || {}
4938
+ # HTTP header 'Accept' (if needed)
4939
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
4940
+
4941
+ # form parameters
4942
+ form_params = opts[:form_params] || {}
4943
+
4944
+ # http body (model)
4945
+ post_body = opts[:debug_body]
4946
+
4947
+ # return_type
4948
+ return_type = opts[:debug_return_type] || 'OAuth2ApiError'
4949
+
4950
+ # auth_names
4951
+ auth_names = opts[:debug_auth_names] || []
4952
+
4953
+ new_options = opts.merge(
4954
+ :operation => :"V0alpha2Api.perform_o_auth2_authorization_flow",
4955
+ :header_params => header_params,
4956
+ :query_params => query_params,
4957
+ :form_params => form_params,
4958
+ :body => post_body,
4959
+ :auth_names => auth_names,
4960
+ :return_type => return_type
4961
+ )
4962
+
4963
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
4964
+ if @api_client.config.debugging
4965
+ @api_client.config.logger.debug "API called: V0alpha2Api#perform_o_auth2_authorization_flow\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
4966
+ end
4967
+ return data, status_code, headers
4968
+ end
4969
+
4970
+ # The OAuth 2.0 Token Endpoint
4971
+ # The client makes a request to the token endpoint by sending the following parameters using the \"application/x-www-form-urlencoded\" HTTP request entity-body. > Do not implement a client for this endpoint yourself. Use a library. There are many libraries > available for any programming language. You can find a list of libraries here: https://oauth.net/code/ > > Do note that Hydra SDK does not implement this endpoint properly. Use one of the libraries listed above
4972
+ # @param grant_type [String]
4973
+ # @param [Hash] opts the optional parameters
4974
+ # @option opts [String] :client_id
4975
+ # @option opts [String] :code
4976
+ # @option opts [String] :redirect_uri
4977
+ # @option opts [String] :refresh_token
4978
+ # @return [OAuth2TokenResponse]
4979
+ def perform_o_auth2_token_flow(grant_type, opts = {})
4980
+ data, _status_code, _headers = perform_o_auth2_token_flow_with_http_info(grant_type, opts)
4981
+ data
4982
+ end
4983
+
4984
+ # The OAuth 2.0 Token Endpoint
4985
+ # The client makes a request to the token endpoint by sending the following parameters using the \&quot;application/x-www-form-urlencoded\&quot; HTTP request entity-body. &gt; Do not implement a client for this endpoint yourself. Use a library. There are many libraries &gt; available for any programming language. You can find a list of libraries here: https://oauth.net/code/ &gt; &gt; Do note that Hydra SDK does not implement this endpoint properly. Use one of the libraries listed above
4986
+ # @param grant_type [String]
4987
+ # @param [Hash] opts the optional parameters
4988
+ # @option opts [String] :client_id
4989
+ # @option opts [String] :code
4990
+ # @option opts [String] :redirect_uri
4991
+ # @option opts [String] :refresh_token
4992
+ # @return [Array<(OAuth2TokenResponse, Integer, Hash)>] OAuth2TokenResponse data, response status code and response headers
4993
+ def perform_o_auth2_token_flow_with_http_info(grant_type, opts = {})
4994
+ if @api_client.config.debugging
4995
+ @api_client.config.logger.debug 'Calling API: V0alpha2Api.perform_o_auth2_token_flow ...'
4996
+ end
4997
+ # verify the required parameter 'grant_type' is set
4998
+ if @api_client.config.client_side_validation && grant_type.nil?
4999
+ fail ArgumentError, "Missing the required parameter 'grant_type' when calling V0alpha2Api.perform_o_auth2_token_flow"
5000
+ end
5001
+ # resource path
5002
+ local_var_path = '/oauth2/token'
5003
+
5004
+ # query parameters
5005
+ query_params = opts[:query_params] || {}
5006
+
5007
+ # header parameters
5008
+ header_params = opts[:header_params] || {}
5009
+ # HTTP header 'Accept' (if needed)
5010
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
5011
+ # HTTP header 'Content-Type'
5012
+ content_type = @api_client.select_header_content_type(['application/x-www-form-urlencoded'])
5013
+ if !content_type.nil?
5014
+ header_params['Content-Type'] = content_type
5015
+ end
5016
+
5017
+ # form parameters
5018
+ form_params = opts[:form_params] || {}
5019
+ form_params['grant_type'] = grant_type
5020
+ form_params['client_id'] = opts[:'client_id'] if !opts[:'client_id'].nil?
5021
+ form_params['code'] = opts[:'code'] if !opts[:'code'].nil?
5022
+ form_params['redirect_uri'] = opts[:'redirect_uri'] if !opts[:'redirect_uri'].nil?
5023
+ form_params['refresh_token'] = opts[:'refresh_token'] if !opts[:'refresh_token'].nil?
5024
+
5025
+ # http body (model)
5026
+ post_body = opts[:debug_body]
5027
+
5028
+ # return_type
5029
+ return_type = opts[:debug_return_type] || 'OAuth2TokenResponse'
5030
+
5031
+ # auth_names
5032
+ auth_names = opts[:debug_auth_names] || ['basic', 'oauth2']
5033
+
5034
+ new_options = opts.merge(
5035
+ :operation => :"V0alpha2Api.perform_o_auth2_token_flow",
5036
+ :header_params => header_params,
5037
+ :query_params => query_params,
5038
+ :form_params => form_params,
5039
+ :body => post_body,
5040
+ :auth_names => auth_names,
5041
+ :return_type => return_type
5042
+ )
5043
+
5044
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
5045
+ if @api_client.config.debugging
5046
+ @api_client.config.logger.debug "API called: V0alpha2Api#perform_o_auth2_token_flow\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
5047
+ end
5048
+ return data, status_code, headers
5049
+ end
5050
+
5051
+ # OpenID Connect Front- or Back-channel Enabled Logout
5052
+ # This endpoint initiates and completes user logout at Ory Hydra and initiates OpenID Connect Front- / Back-channel logout: https://openid.net/specs/openid-connect-frontchannel-1_0.html https://openid.net/specs/openid-connect-backchannel-1_0.html Back-channel logout is performed asynchronously and does not affect logout flow.
5053
+ # @param [Hash] opts the optional parameters
5054
+ # @return [nil]
5055
+ def perform_oidc_front_or_back_channel_logout(opts = {})
5056
+ perform_oidc_front_or_back_channel_logout_with_http_info(opts)
5057
+ nil
5058
+ end
5059
+
5060
+ # OpenID Connect Front- or Back-channel Enabled Logout
5061
+ # This endpoint initiates and completes user logout at Ory Hydra and initiates OpenID Connect Front- / Back-channel logout: https://openid.net/specs/openid-connect-frontchannel-1_0.html https://openid.net/specs/openid-connect-backchannel-1_0.html Back-channel logout is performed asynchronously and does not affect logout flow.
5062
+ # @param [Hash] opts the optional parameters
5063
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
5064
+ def perform_oidc_front_or_back_channel_logout_with_http_info(opts = {})
5065
+ if @api_client.config.debugging
5066
+ @api_client.config.logger.debug 'Calling API: V0alpha2Api.perform_oidc_front_or_back_channel_logout ...'
5067
+ end
5068
+ # resource path
5069
+ local_var_path = '/oauth2/sessions/logout'
5070
+
5071
+ # query parameters
5072
+ query_params = opts[:query_params] || {}
5073
+
5074
+ # header parameters
5075
+ header_params = opts[:header_params] || {}
5076
+
5077
+ # form parameters
5078
+ form_params = opts[:form_params] || {}
5079
+
5080
+ # http body (model)
5081
+ post_body = opts[:debug_body]
5082
+
5083
+ # return_type
5084
+ return_type = opts[:debug_return_type]
5085
+
5086
+ # auth_names
5087
+ auth_names = opts[:debug_auth_names] || []
5088
+
5089
+ new_options = opts.merge(
5090
+ :operation => :"V0alpha2Api.perform_oidc_front_or_back_channel_logout",
5091
+ :header_params => header_params,
5092
+ :query_params => query_params,
5093
+ :form_params => form_params,
5094
+ :body => post_body,
5095
+ :auth_names => auth_names,
5096
+ :return_type => return_type
5097
+ )
5098
+
5099
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
5100
+ if @api_client.config.debugging
5101
+ @api_client.config.logger.debug "API called: V0alpha2Api#perform_oidc_front_or_back_channel_logout\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
5102
+ end
5103
+ return data, status_code, headers
5104
+ end
5105
+
2288
5106
  # Irrecoverably Purge a Project
2289
5107
  # !! Use with extreme caution !! Using this API endpoint you can purge (completely delete) a project and its data. This action can not be undone and will delete ALL your data. !! Use with extreme caution !!
2290
5108
  # @param project_id [String] Project ID The project&#39;s ID.
@@ -2417,6 +5235,75 @@ module OryClient
2417
5235
  return data, status_code, headers
2418
5236
  end
2419
5237
 
5238
+ # Revoke an OAuth2 Access or Refresh Token
5239
+ # Revoking a token (both access and refresh) means that the tokens will be invalid. A revoked access token can no longer be used to make access requests, and a revoked refresh token can no longer be used to refresh an access token. Revoking a refresh token also invalidates the access token that was created with it. A token may only be revoked by the client the token was generated for.
5240
+ # @param token [String]
5241
+ # @param [Hash] opts the optional parameters
5242
+ # @return [nil]
5243
+ def revoke_o_auth2_token(token, opts = {})
5244
+ revoke_o_auth2_token_with_http_info(token, opts)
5245
+ nil
5246
+ end
5247
+
5248
+ # Revoke an OAuth2 Access or Refresh Token
5249
+ # Revoking a token (both access and refresh) means that the tokens will be invalid. A revoked access token can no longer be used to make access requests, and a revoked refresh token can no longer be used to refresh an access token. Revoking a refresh token also invalidates the access token that was created with it. A token may only be revoked by the client the token was generated for.
5250
+ # @param token [String]
5251
+ # @param [Hash] opts the optional parameters
5252
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
5253
+ def revoke_o_auth2_token_with_http_info(token, opts = {})
5254
+ if @api_client.config.debugging
5255
+ @api_client.config.logger.debug 'Calling API: V0alpha2Api.revoke_o_auth2_token ...'
5256
+ end
5257
+ # verify the required parameter 'token' is set
5258
+ if @api_client.config.client_side_validation && token.nil?
5259
+ fail ArgumentError, "Missing the required parameter 'token' when calling V0alpha2Api.revoke_o_auth2_token"
5260
+ end
5261
+ # resource path
5262
+ local_var_path = '/oauth2/revoke'
5263
+
5264
+ # query parameters
5265
+ query_params = opts[:query_params] || {}
5266
+
5267
+ # header parameters
5268
+ header_params = opts[:header_params] || {}
5269
+ # HTTP header 'Accept' (if needed)
5270
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
5271
+ # HTTP header 'Content-Type'
5272
+ content_type = @api_client.select_header_content_type(['application/x-www-form-urlencoded'])
5273
+ if !content_type.nil?
5274
+ header_params['Content-Type'] = content_type
5275
+ end
5276
+
5277
+ # form parameters
5278
+ form_params = opts[:form_params] || {}
5279
+ form_params['token'] = token
5280
+
5281
+ # http body (model)
5282
+ post_body = opts[:debug_body]
5283
+
5284
+ # return_type
5285
+ return_type = opts[:debug_return_type]
5286
+
5287
+ # auth_names
5288
+ auth_names = opts[:debug_auth_names] || ['basic', 'oauth2']
5289
+
5290
+ new_options = opts.merge(
5291
+ :operation => :"V0alpha2Api.revoke_o_auth2_token",
5292
+ :header_params => header_params,
5293
+ :query_params => query_params,
5294
+ :form_params => form_params,
5295
+ :body => post_body,
5296
+ :auth_names => auth_names,
5297
+ :return_type => return_type
5298
+ )
5299
+
5300
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
5301
+ if @api_client.config.debugging
5302
+ @api_client.config.logger.debug "API called: V0alpha2Api#revoke_o_auth2_token\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
5303
+ end
5304
+ return data, status_code, headers
5305
+ end
5306
+
2420
5307
  # Calling this endpoint invalidates the specified session. The current session cannot be revoked. Session data are not deleted.
2421
5308
  # This endpoint is useful for: To forcefully logout the current user from another device or session
2422
5309
  # @param id [String] ID is the session&#39;s ID.
@@ -2627,7 +5514,7 @@ module OryClient
2627
5514
  # Complete Self-Service Logout
2628
5515
  # This endpoint logs out an identity in a self-service manner. If the `Accept` HTTP header is not set to `application/json`, the browser will be redirected (HTTP 303 See Other) to the `return_to` parameter of the initial request or fall back to `urls.default_return_to`. If the `Accept` HTTP header is set to `application/json`, a 204 No Content response will be sent on successful logout instead. This endpoint is NOT INTENDED for API clients and only works with browsers (Chrome, Firefox, ...). For API clients you can call the `/self-service/logout/api` URL directly with the Ory Session Token. More information can be found at [Ory Kratos User Logout Documentation](https://www.ory.sh/docs/next/kratos/self-service/flows/user-logout).
2629
5516
  # @param [Hash] opts the optional parameters
2630
- # @option opts [String] :token A Valid Logout Token If you do not have a logout token because you only have a session cookie, call &#x60;/self-service/logout/urls&#x60; to generate a URL for this endpoint.
5517
+ # @option opts [String] :token A Valid Logout Token If you do not have a logout token because you only have a session cookie, call &#x60;/self-service/logout/browser&#x60; to generate a URL for this endpoint.
2631
5518
  # @option opts [String] :return_to The URL to return to after the logout was completed.
2632
5519
  # @return [nil]
2633
5520
  def submit_self_service_logout_flow(opts = {})
@@ -2638,7 +5525,7 @@ module OryClient
2638
5525
  # Complete Self-Service Logout
2639
5526
  # This endpoint logs out an identity in a self-service manner. If the &#x60;Accept&#x60; HTTP header is not set to &#x60;application/json&#x60;, the browser will be redirected (HTTP 303 See Other) to the &#x60;return_to&#x60; parameter of the initial request or fall back to &#x60;urls.default_return_to&#x60;. If the &#x60;Accept&#x60; HTTP header is set to &#x60;application/json&#x60;, a 204 No Content response will be sent on successful logout instead. This endpoint is NOT INTENDED for API clients and only works with browsers (Chrome, Firefox, ...). For API clients you can call the &#x60;/self-service/logout/api&#x60; URL directly with the Ory Session Token. More information can be found at [Ory Kratos User Logout Documentation](https://www.ory.sh/docs/next/kratos/self-service/flows/user-logout).
2640
5527
  # @param [Hash] opts the optional parameters
2641
- # @option opts [String] :token A Valid Logout Token If you do not have a logout token because you only have a session cookie, call &#x60;/self-service/logout/urls&#x60; to generate a URL for this endpoint.
5528
+ # @option opts [String] :token A Valid Logout Token If you do not have a logout token because you only have a session cookie, call &#x60;/self-service/logout/browser&#x60; to generate a URL for this endpoint.
2642
5529
  # @option opts [String] :return_to The URL to return to after the logout was completed.
2643
5530
  # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
2644
5531
  def submit_self_service_logout_flow_with_http_info(opts = {})