authlete_ruby_test 0.0.1.beta
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/lib/authlete/authorization.rb +1062 -0
- data/lib/authlete/authorization_management.rb +349 -0
- data/lib/authlete/ciba.rb +1064 -0
- data/lib/authlete/client.rb +118 -0
- data/lib/authlete/client_management.rb +1703 -0
- data/lib/authlete/clients.rb +784 -0
- data/lib/authlete/device_flow.rb +647 -0
- data/lib/authlete/dynamic_client_registration.rb +939 -0
- data/lib/authlete/federation.rb +433 -0
- data/lib/authlete/grant_management.rb +198 -0
- data/lib/authlete/hardware_security_keys.rb +620 -0
- data/lib/authlete/introspection.rb +540 -0
- data/lib/authlete/jose_object.rb +196 -0
- data/lib/authlete/jwk_set_endpoint.rb +195 -0
- data/lib/authlete/models/callbacks.rb +12 -0
- data/lib/authlete/models/components/access_token.rb +85 -0
- data/lib/authlete/models/components/access_token.rbi +35 -0
- data/lib/authlete/models/components/application_type.rb +24 -0
- data/lib/authlete/models/components/application_type.rbi +11 -0
- data/lib/authlete/models/components/attachment_type.rb +25 -0
- data/lib/authlete/models/components/attachment_type.rbi +11 -0
- data/lib/authlete/models/components/authorization_details_element.rb +90 -0
- data/lib/authlete/models/components/authorization_details_element.rbi +25 -0
- data/lib/authlete/models/components/authorization_fail_request.rb +45 -0
- data/lib/authlete/models/components/authorization_fail_request.rbi +17 -0
- data/lib/authlete/models/components/authorization_fail_request_reason.rb +35 -0
- data/lib/authlete/models/components/authorization_fail_request_reason.rbi +11 -0
- data/lib/authlete/models/components/authorization_fail_response.rb +47 -0
- data/lib/authlete/models/components/authorization_fail_response.rbi +19 -0
- data/lib/authlete/models/components/authorization_fail_response_action.rb +24 -0
- data/lib/authlete/models/components/authorization_fail_response_action.rbi +11 -0
- data/lib/authlete/models/components/authorization_issue_request.rb +204 -0
- data/lib/authlete/models/components/authorization_issue_request.rbi +47 -0
- data/lib/authlete/models/components/authorization_issue_response.rb +86 -0
- data/lib/authlete/models/components/authorization_issue_response.rbi +33 -0
- data/lib/authlete/models/components/authorization_issue_response_action.rb +24 -0
- data/lib/authlete/models/components/authorization_issue_response_action.rbi +11 -0
- data/lib/authlete/models/components/authorization_request.rb +57 -0
- data/lib/authlete/models/components/authorization_request.rbi +17 -0
- data/lib/authlete/models/components/authorization_response.rb +485 -0
- data/lib/authlete/models/components/authorization_response.rbi +93 -0
- data/lib/authlete/models/components/authorization_response_action.rb +26 -0
- data/lib/authlete/models/components/authorization_response_action.rbi +11 -0
- data/lib/authlete/models/components/authorization_ticket_info.rb +34 -0
- data/lib/authlete/models/components/authorization_ticket_info.rbi +13 -0
- data/lib/authlete/models/components/authorization_ticket_info_request.rb +33 -0
- data/lib/authlete/models/components/authorization_ticket_info_request.rbi +13 -0
- data/lib/authlete/models/components/authorization_ticket_info_response.rb +45 -0
- data/lib/authlete/models/components/authorization_ticket_info_response.rbi +19 -0
- data/lib/authlete/models/components/authorization_ticket_info_response_action.rb +24 -0
- data/lib/authlete/models/components/authorization_ticket_info_response_action.rbi +11 -0
- data/lib/authlete/models/components/authorization_ticket_update_request.rb +37 -0
- data/lib/authlete/models/components/authorization_ticket_update_request.rbi +15 -0
- data/lib/authlete/models/components/authorization_ticket_update_response.rb +45 -0
- data/lib/authlete/models/components/authorization_ticket_update_response.rbi +19 -0
- data/lib/authlete/models/components/authorization_ticket_update_response_action.rb +24 -0
- data/lib/authlete/models/components/authorization_ticket_update_response_action.rbi +11 -0
- data/lib/authlete/models/components/authz_details.rb +37 -0
- data/lib/authlete/models/components/authz_details.rbi +13 -0
- data/lib/authlete/models/components/backchannel_authentication_complete_request.rb +142 -0
- data/lib/authlete/models/components/backchannel_authentication_complete_request.rbi +47 -0
- data/lib/authlete/models/components/backchannel_authentication_complete_request_result.rb +25 -0
- data/lib/authlete/models/components/backchannel_authentication_complete_request_result.rbi +11 -0
- data/lib/authlete/models/components/backchannel_authentication_complete_response.rb +186 -0
- data/lib/authlete/models/components/backchannel_authentication_complete_response.rbi +67 -0
- data/lib/authlete/models/components/backchannel_authentication_complete_response_action.rb +24 -0
- data/lib/authlete/models/components/backchannel_authentication_complete_response_action.rbi +11 -0
- data/lib/authlete/models/components/backchannel_authentication_fail_request.rb +56 -0
- data/lib/authlete/models/components/backchannel_authentication_fail_request.rbi +19 -0
- data/lib/authlete/models/components/backchannel_authentication_fail_request_reason.rb +32 -0
- data/lib/authlete/models/components/backchannel_authentication_fail_request_reason.rbi +11 -0
- data/lib/authlete/models/components/backchannel_authentication_fail_response.rb +47 -0
- data/lib/authlete/models/components/backchannel_authentication_fail_response.rbi +19 -0
- data/lib/authlete/models/components/backchannel_authentication_fail_response_action.rb +23 -0
- data/lib/authlete/models/components/backchannel_authentication_fail_response_action.rbi +11 -0
- data/lib/authlete/models/components/backchannel_authentication_issue_request.rb +34 -0
- data/lib/authlete/models/components/backchannel_authentication_issue_request.rbi +13 -0
- data/lib/authlete/models/components/backchannel_authentication_issue_response.rb +63 -0
- data/lib/authlete/models/components/backchannel_authentication_issue_response.rbi +25 -0
- data/lib/authlete/models/components/backchannel_authentication_issue_response_action.rb +23 -0
- data/lib/authlete/models/components/backchannel_authentication_issue_response_action.rbi +11 -0
- data/lib/authlete/models/components/backchannel_authentication_request.rb +91 -0
- data/lib/authlete/models/components/backchannel_authentication_request.rbi +27 -0
- data/lib/authlete/models/components/backchannel_authentication_response.rb +272 -0
- data/lib/authlete/models/components/backchannel_authentication_response.rbi +85 -0
- data/lib/authlete/models/components/backchannel_authentication_response_action.rb +24 -0
- data/lib/authlete/models/components/backchannel_authentication_response_action.rbi +11 -0
- data/lib/authlete/models/components/cimd_options.rb +67 -0
- data/lib/authlete/models/components/cimd_options.rbi +17 -0
- data/lib/authlete/models/components/claim_type.rb +23 -0
- data/lib/authlete/models/components/claim_type.rbi +11 -0
- data/lib/authlete/models/components/client.rb +920 -0
- data/lib/authlete/models/components/client.rbi +219 -0
- data/lib/authlete/models/components/client_auth_method.rb +31 -0
- data/lib/authlete/models/components/client_auth_method.rbi +11 -0
- data/lib/authlete/models/components/client_authorization_delete_response.rb +71 -0
- data/lib/authlete/models/components/client_authorization_delete_response.rbi +27 -0
- data/lib/authlete/models/components/client_authorization_get_list_response.rb +59 -0
- data/lib/authlete/models/components/client_authorization_get_list_response.rbi +23 -0
- data/lib/authlete/models/components/client_authorization_update_request.rb +43 -0
- data/lib/authlete/models/components/client_authorization_update_request.rbi +15 -0
- data/lib/authlete/models/components/client_authorization_update_response.rb +37 -0
- data/lib/authlete/models/components/client_authorization_update_response.rbi +15 -0
- data/lib/authlete/models/components/client_extension.rb +94 -0
- data/lib/authlete/models/components/client_extension.rbi +23 -0
- data/lib/authlete/models/components/client_extension_requestable_scopes_get_response.rb +33 -0
- data/lib/authlete/models/components/client_extension_requestable_scopes_get_response.rbi +13 -0
- data/lib/authlete/models/components/client_extension_requestable_scopes_update_request.rb +43 -0
- data/lib/authlete/models/components/client_extension_requestable_scopes_update_request.rbi +13 -0
- data/lib/authlete/models/components/client_extension_requestable_scopes_update_response.rb +33 -0
- data/lib/authlete/models/components/client_extension_requestable_scopes_update_response.rbi +13 -0
- data/lib/authlete/models/components/client_flag_update_request.rb +34 -0
- data/lib/authlete/models/components/client_flag_update_request.rbi +13 -0
- data/lib/authlete/models/components/client_flag_update_response.rb +37 -0
- data/lib/authlete/models/components/client_flag_update_response.rbi +15 -0
- data/lib/authlete/models/components/client_get_list_response.rb +50 -0
- data/lib/authlete/models/components/client_get_list_response.rbi +19 -0
- data/lib/authlete/models/components/client_granted_scopes_delete_response.rb +37 -0
- data/lib/authlete/models/components/client_granted_scopes_delete_response.rbi +15 -0
- data/lib/authlete/models/components/client_input.rb +868 -0
- data/lib/authlete/models/components/client_input.rbi +203 -0
- data/lib/authlete/models/components/client_limited.rb +76 -0
- data/lib/authlete/models/components/client_limited.rbi +29 -0
- data/lib/authlete/models/components/client_limited_authorization.rb +120 -0
- data/lib/authlete/models/components/client_limited_authorization.rbi +41 -0
- data/lib/authlete/models/components/client_registration_response.rb +52 -0
- data/lib/authlete/models/components/client_registration_response.rbi +21 -0
- data/lib/authlete/models/components/client_registration_response_action.rb +28 -0
- data/lib/authlete/models/components/client_registration_response_action.rbi +11 -0
- data/lib/authlete/models/components/client_registration_type.rb +25 -0
- data/lib/authlete/models/components/client_registration_type.rbi +11 -0
- data/lib/authlete/models/components/client_secret_refresh_response.rb +47 -0
- data/lib/authlete/models/components/client_secret_refresh_response.rbi +19 -0
- data/lib/authlete/models/components/client_secret_update_request.rb +35 -0
- data/lib/authlete/models/components/client_secret_update_request.rbi +13 -0
- data/lib/authlete/models/components/client_secret_update_response.rb +47 -0
- data/lib/authlete/models/components/client_secret_update_response.rbi +19 -0
- data/lib/authlete/models/components/client_type.rb +24 -0
- data/lib/authlete/models/components/client_type.rbi +11 -0
- data/lib/authlete/models/components/clientsource.rb +26 -0
- data/lib/authlete/models/components/clientsource.rbi +11 -0
- data/lib/authlete/models/components/credential_issuance_order.rb +51 -0
- data/lib/authlete/models/components/credential_issuance_order.rbi +21 -0
- data/lib/authlete/models/components/credential_issuer_metadata.rb +79 -0
- data/lib/authlete/models/components/credential_issuer_metadata.rbi +29 -0
- data/lib/authlete/models/components/credential_offer_info.rb +136 -0
- data/lib/authlete/models/components/credential_offer_info.rbi +49 -0
- data/lib/authlete/models/components/credential_request_info.rb +49 -0
- data/lib/authlete/models/components/credential_request_info.rbi +21 -0
- data/lib/authlete/models/components/delivery_mode.rb +23 -0
- data/lib/authlete/models/components/delivery_mode.rbi +11 -0
- data/lib/authlete/models/components/device_authorization_request.rb +91 -0
- data/lib/authlete/models/components/device_authorization_request.rbi +27 -0
- data/lib/authlete/models/components/device_authorization_response.rb +243 -0
- data/lib/authlete/models/components/device_authorization_response.rbi +75 -0
- data/lib/authlete/models/components/device_authorization_response_action.rb +24 -0
- data/lib/authlete/models/components/device_authorization_response_action.rbi +11 -0
- data/lib/authlete/models/components/device_complete_request.rb +137 -0
- data/lib/authlete/models/components/device_complete_request.rbi +45 -0
- data/lib/authlete/models/components/device_complete_request_result.rb +25 -0
- data/lib/authlete/models/components/device_complete_request_result.rbi +11 -0
- data/lib/authlete/models/components/device_complete_response.rb +42 -0
- data/lib/authlete/models/components/device_complete_response.rbi +17 -0
- data/lib/authlete/models/components/device_complete_response_action.rb +26 -0
- data/lib/authlete/models/components/device_complete_response_action.rbi +11 -0
- data/lib/authlete/models/components/device_verification_request.rb +34 -0
- data/lib/authlete/models/components/device_verification_request.rbi +13 -0
- data/lib/authlete/models/components/device_verification_response.rb +188 -0
- data/lib/authlete/models/components/device_verification_response.rbi +59 -0
- data/lib/authlete/models/components/device_verification_response_action.rb +24 -0
- data/lib/authlete/models/components/device_verification_response_action.rbi +11 -0
- data/lib/authlete/models/components/display.rb +33 -0
- data/lib/authlete/models/components/display.rbi +11 -0
- data/lib/authlete/models/components/dynamic_scope.rb +37 -0
- data/lib/authlete/models/components/dynamic_scope.rbi +15 -0
- data/lib/authlete/models/components/fapi_mode.rb +26 -0
- data/lib/authlete/models/components/fapi_mode.rbi +11 -0
- data/lib/authlete/models/components/federation_configuration_response.rb +47 -0
- data/lib/authlete/models/components/federation_configuration_response.rbi +19 -0
- data/lib/authlete/models/components/federation_configuration_response_action.rb +23 -0
- data/lib/authlete/models/components/federation_configuration_response_action.rbi +11 -0
- data/lib/authlete/models/components/federation_registration_request.rb +39 -0
- data/lib/authlete/models/components/federation_registration_request.rbi +15 -0
- data/lib/authlete/models/components/federation_registration_response.rb +51 -0
- data/lib/authlete/models/components/federation_registration_response.rbi +21 -0
- data/lib/authlete/models/components/federation_registration_response_action.rb +24 -0
- data/lib/authlete/models/components/federation_registration_response_action.rbi +11 -0
- data/lib/authlete/models/components/g_m_request.rb +90 -0
- data/lib/authlete/models/components/g_m_request.rbi +27 -0
- data/lib/authlete/models/components/g_m_response.rb +53 -0
- data/lib/authlete/models/components/g_m_response.rbi +21 -0
- data/lib/authlete/models/components/g_m_response_action.rb +27 -0
- data/lib/authlete/models/components/g_m_response_action.rbi +11 -0
- data/lib/authlete/models/components/grant.rb +45 -0
- data/lib/authlete/models/components/grant.rbi +17 -0
- data/lib/authlete/models/components/grant_management_action.rb +29 -0
- data/lib/authlete/models/components/grant_management_action.rbi +11 -0
- data/lib/authlete/models/components/grant_scope.rb +39 -0
- data/lib/authlete/models/components/grant_scope.rbi +15 -0
- data/lib/authlete/models/components/grant_type.rb +31 -0
- data/lib/authlete/models/components/grant_type.rbi +11 -0
- data/lib/authlete/models/components/hsk.rb +71 -0
- data/lib/authlete/models/components/hsk.rbi +25 -0
- data/lib/authlete/models/components/hsk_create_request.rb +63 -0
- data/lib/authlete/models/components/hsk_create_request.rbi +21 -0
- data/lib/authlete/models/components/hsk_create_response.rb +46 -0
- data/lib/authlete/models/components/hsk_create_response.rbi +19 -0
- data/lib/authlete/models/components/hsk_create_response_action.rb +24 -0
- data/lib/authlete/models/components/hsk_create_response_action.rbi +11 -0
- data/lib/authlete/models/components/hsk_delete_response.rb +46 -0
- data/lib/authlete/models/components/hsk_delete_response.rbi +19 -0
- data/lib/authlete/models/components/hsk_delete_response_action.rb +24 -0
- data/lib/authlete/models/components/hsk_delete_response_action.rbi +11 -0
- data/lib/authlete/models/components/hsk_get_list_response.rb +45 -0
- data/lib/authlete/models/components/hsk_get_list_response.rbi +19 -0
- data/lib/authlete/models/components/hsk_get_list_response_action.rb +23 -0
- data/lib/authlete/models/components/hsk_get_list_response_action.rbi +11 -0
- data/lib/authlete/models/components/hsk_get_response.rb +46 -0
- data/lib/authlete/models/components/hsk_get_response.rbi +19 -0
- data/lib/authlete/models/components/hsk_get_response_action.rb +24 -0
- data/lib/authlete/models/components/hsk_get_response_action.rbi +11 -0
- data/lib/authlete/models/components/idtoken_reissue_request.rb +82 -0
- data/lib/authlete/models/components/idtoken_reissue_request.rbi +23 -0
- data/lib/authlete/models/components/idtoken_reissue_response.rb +52 -0
- data/lib/authlete/models/components/idtoken_reissue_response.rbi +21 -0
- data/lib/authlete/models/components/idtoken_reissue_response_action.rb +23 -0
- data/lib/authlete/models/components/idtoken_reissue_response_action.rbi +11 -0
- data/lib/authlete/models/components/introspection_request.rb +166 -0
- data/lib/authlete/models/components/introspection_request.rbi +45 -0
- data/lib/authlete/models/components/introspection_response.rb +253 -0
- data/lib/authlete/models/components/introspection_response.rbi +89 -0
- data/lib/authlete/models/components/introspection_response_action.rb +25 -0
- data/lib/authlete/models/components/introspection_response_action.rbi +11 -0
- data/lib/authlete/models/components/jose_verify_request.rb +56 -0
- data/lib/authlete/models/components/jose_verify_request.rbi +21 -0
- data/lib/authlete/models/components/jose_verify_response.rb +62 -0
- data/lib/authlete/models/components/jose_verify_response.rbi +25 -0
- data/lib/authlete/models/components/jwe_alg.rb +44 -0
- data/lib/authlete/models/components/jwe_alg.rbi +11 -0
- data/lib/authlete/models/components/jwe_enc.rb +31 -0
- data/lib/authlete/models/components/jwe_enc.rbi +11 -0
- data/lib/authlete/models/components/jws_alg.rb +42 -0
- data/lib/authlete/models/components/jws_alg.rbi +11 -0
- data/lib/authlete/models/components/named_uri.rb +37 -0
- data/lib/authlete/models/components/named_uri.rbi +15 -0
- data/lib/authlete/models/components/native_sso_logout_request.rb +34 -0
- data/lib/authlete/models/components/native_sso_logout_request.rbi +13 -0
- data/lib/authlete/models/components/native_sso_logout_response.rb +47 -0
- data/lib/authlete/models/components/native_sso_logout_response.rbi +19 -0
- data/lib/authlete/models/components/native_sso_logout_response_action.rb +24 -0
- data/lib/authlete/models/components/native_sso_logout_response_action.rbi +11 -0
- data/lib/authlete/models/components/native_sso_request.rb +97 -0
- data/lib/authlete/models/components/native_sso_request.rbi +27 -0
- data/lib/authlete/models/components/native_sso_response.rb +53 -0
- data/lib/authlete/models/components/native_sso_response.rbi +21 -0
- data/lib/authlete/models/components/native_sso_response_action.rb +24 -0
- data/lib/authlete/models/components/native_sso_response_action.rbi +11 -0
- data/lib/authlete/models/components/pair.rb +37 -0
- data/lib/authlete/models/components/pair.rbi +15 -0
- data/lib/authlete/models/components/prompt.rb +30 -0
- data/lib/authlete/models/components/prompt.rbi +11 -0
- data/lib/authlete/models/components/property.rb +43 -0
- data/lib/authlete/models/components/property.rbi +17 -0
- data/lib/authlete/models/components/pushed_authorization_request.rb +91 -0
- data/lib/authlete/models/components/pushed_authorization_request.rbi +33 -0
- data/lib/authlete/models/components/pushed_authorization_response.rb +65 -0
- data/lib/authlete/models/components/pushed_authorization_response.rbi +25 -0
- data/lib/authlete/models/components/pushed_authorization_response_action.rb +26 -0
- data/lib/authlete/models/components/pushed_authorization_response_action.rbi +11 -0
- data/lib/authlete/models/components/pushed_authorization_response_clientauthmethod.rb +30 -0
- data/lib/authlete/models/components/pushed_authorization_response_clientauthmethod.rbi +11 -0
- data/lib/authlete/models/components/response_type.rb +28 -0
- data/lib/authlete/models/components/response_type.rbi +11 -0
- data/lib/authlete/models/components/responsemode.rb +27 -0
- data/lib/authlete/models/components/responsemode.rbi +11 -0
- data/lib/authlete/models/components/revocation_request.rb +79 -0
- data/lib/authlete/models/components/revocation_request.rbi +25 -0
- data/lib/authlete/models/components/revocation_response.rb +47 -0
- data/lib/authlete/models/components/revocation_response.rbi +19 -0
- data/lib/authlete/models/components/revocation_response_action.rb +24 -0
- data/lib/authlete/models/components/revocation_response_action.rbi +11 -0
- data/lib/authlete/models/components/scope.rb +49 -0
- data/lib/authlete/models/components/scope.rbi +21 -0
- data/lib/authlete/models/components/security.rb +33 -0
- data/lib/authlete/models/components/security.rbi +13 -0
- data/lib/authlete/models/components/service.rb +1634 -0
- data/lib/authlete/models/components/service.rbi +377 -0
- data/lib/authlete/models/components/service_get_list_response.rb +52 -0
- data/lib/authlete/models/components/service_get_list_response.rbi +19 -0
- data/lib/authlete/models/components/service_input.rb +1594 -0
- data/lib/authlete/models/components/service_input.rbi +363 -0
- data/lib/authlete/models/components/service_jwks_get_response.rb +33 -0
- data/lib/authlete/models/components/service_jwks_get_response.rbi +13 -0
- data/lib/authlete/models/components/service_profile.rb +22 -0
- data/lib/authlete/models/components/service_profile.rbi +11 -0
- data/lib/authlete/models/components/sns_credentials.rb +41 -0
- data/lib/authlete/models/components/sns_credentials.rbi +17 -0
- data/lib/authlete/models/components/standard_introspection_request.rb +129 -0
- data/lib/authlete/models/components/standard_introspection_request.rbi +31 -0
- data/lib/authlete/models/components/standard_introspection_response.rb +47 -0
- data/lib/authlete/models/components/standard_introspection_response.rbi +19 -0
- data/lib/authlete/models/components/standard_introspection_response_action.rb +23 -0
- data/lib/authlete/models/components/standard_introspection_response_action.rbi +11 -0
- data/lib/authlete/models/components/subject_type.rb +27 -0
- data/lib/authlete/models/components/subject_type.rbi +11 -0
- data/lib/authlete/models/components/supportedsnse.rb +21 -0
- data/lib/authlete/models/components/supportedsnse.rbi +11 -0
- data/lib/authlete/models/components/tagged_value.rb +37 -0
- data/lib/authlete/models/components/tagged_value.rbi +15 -0
- data/lib/authlete/models/components/token_create_request.rb +206 -0
- data/lib/authlete/models/components/token_create_request.rbi +57 -0
- data/lib/authlete/models/components/token_create_response.rb +135 -0
- data/lib/authlete/models/components/token_create_response.rbi +51 -0
- data/lib/authlete/models/components/token_create_response_action.rb +24 -0
- data/lib/authlete/models/components/token_create_response_action.rbi +11 -0
- data/lib/authlete/models/components/token_fail_request.rb +39 -0
- data/lib/authlete/models/components/token_fail_request.rbi +15 -0
- data/lib/authlete/models/components/token_fail_request_reason.rb +24 -0
- data/lib/authlete/models/components/token_fail_request_reason.rbi +11 -0
- data/lib/authlete/models/components/token_fail_response.rb +47 -0
- data/lib/authlete/models/components/token_fail_response.rbi +19 -0
- data/lib/authlete/models/components/token_fail_response_action.rb +22 -0
- data/lib/authlete/models/components/token_fail_response_action.rbi +11 -0
- data/lib/authlete/models/components/token_get_list_response.rb +58 -0
- data/lib/authlete/models/components/token_get_list_response.rbi +23 -0
- data/lib/authlete/models/components/token_info.rb +89 -0
- data/lib/authlete/models/components/token_info.rbi +37 -0
- data/lib/authlete/models/components/token_issue_request.rb +74 -0
- data/lib/authlete/models/components/token_issue_request.rbi +25 -0
- data/lib/authlete/models/components/token_issue_response.rb +169 -0
- data/lib/authlete/models/components/token_issue_response.rbi +63 -0
- data/lib/authlete/models/components/token_issue_response_action.rb +22 -0
- data/lib/authlete/models/components/token_issue_response_action.rbi +11 -0
- data/lib/authlete/models/components/token_request.rb +153 -0
- data/lib/authlete/models/components/token_request.rbi +45 -0
- data/lib/authlete/models/components/token_response.rb +333 -0
- data/lib/authlete/models/components/token_response.rbi +115 -0
- data/lib/authlete/models/components/token_response_action.rb +27 -0
- data/lib/authlete/models/components/token_response_action.rbi +11 -0
- data/lib/authlete/models/components/token_revoke_request.rb +56 -0
- data/lib/authlete/models/components/token_revoke_request.rbi +19 -0
- data/lib/authlete/models/components/token_revoke_response.rb +41 -0
- data/lib/authlete/models/components/token_revoke_response.rbi +17 -0
- data/lib/authlete/models/components/token_type.rb +32 -0
- data/lib/authlete/models/components/token_type.rbi +11 -0
- data/lib/authlete/models/components/token_update_request.rb +133 -0
- data/lib/authlete/models/components/token_update_request.rbi +41 -0
- data/lib/authlete/models/components/token_update_response.rb +89 -0
- data/lib/authlete/models/components/token_update_response.rbi +35 -0
- data/lib/authlete/models/components/token_update_response_action.rb +25 -0
- data/lib/authlete/models/components/token_update_response_action.rbi +11 -0
- data/lib/authlete/models/components/trust_anchor.rb +39 -0
- data/lib/authlete/models/components/trust_anchor.rbi +15 -0
- data/lib/authlete/models/components/user_code_charset.rb +23 -0
- data/lib/authlete/models/components/user_code_charset.rbi +11 -0
- data/lib/authlete/models/components/userinfo_issue_request.rb +127 -0
- data/lib/authlete/models/components/userinfo_issue_request.rbi +25 -0
- data/lib/authlete/models/components/userinfo_issue_response.rb +62 -0
- data/lib/authlete/models/components/userinfo_issue_response.rbi +25 -0
- data/lib/authlete/models/components/userinfo_issue_response_action.rb +26 -0
- data/lib/authlete/models/components/userinfo_issue_response_action.rbi +11 -0
- data/lib/authlete/models/components/userinfo_request.rb +128 -0
- data/lib/authlete/models/components/userinfo_request.rbi +33 -0
- data/lib/authlete/models/components/userinfo_response.rb +256 -0
- data/lib/authlete/models/components/userinfo_response.rbi +59 -0
- data/lib/authlete/models/components/userinfo_response_action.rb +25 -0
- data/lib/authlete/models/components/userinfo_response_action.rbi +11 -0
- data/lib/authlete/models/components/vci_batch_issue_request.rb +37 -0
- data/lib/authlete/models/components/vci_batch_issue_request.rbi +15 -0
- data/lib/authlete/models/components/vci_batch_issue_response.rb +49 -0
- data/lib/authlete/models/components/vci_batch_issue_response.rbi +19 -0
- data/lib/authlete/models/components/vci_batch_issue_response_action.rb +27 -0
- data/lib/authlete/models/components/vci_batch_issue_response_action.rbi +11 -0
- data/lib/authlete/models/components/vci_batch_parse_request.rb +37 -0
- data/lib/authlete/models/components/vci_batch_parse_request.rbi +15 -0
- data/lib/authlete/models/components/vci_batch_parse_response.rb +51 -0
- data/lib/authlete/models/components/vci_batch_parse_response.rbi +21 -0
- data/lib/authlete/models/components/vci_batch_parse_response_action.rb +25 -0
- data/lib/authlete/models/components/vci_batch_parse_response_action.rbi +11 -0
- data/lib/authlete/models/components/vci_deferred_issue_request.rb +33 -0
- data/lib/authlete/models/components/vci_deferred_issue_request.rbi +13 -0
- data/lib/authlete/models/components/vci_deferred_issue_response.rb +49 -0
- data/lib/authlete/models/components/vci_deferred_issue_response.rbi +19 -0
- data/lib/authlete/models/components/vci_deferred_issue_response_action.rb +26 -0
- data/lib/authlete/models/components/vci_deferred_issue_response_action.rbi +11 -0
- data/lib/authlete/models/components/vci_deferred_parse_request.rb +37 -0
- data/lib/authlete/models/components/vci_deferred_parse_request.rbi +15 -0
- data/lib/authlete/models/components/vci_deferred_parse_response.rb +49 -0
- data/lib/authlete/models/components/vci_deferred_parse_response.rbi +21 -0
- data/lib/authlete/models/components/vci_deferred_parse_response_action.rb +25 -0
- data/lib/authlete/models/components/vci_deferred_parse_response_action.rbi +11 -0
- data/lib/authlete/models/components/vci_jwks_request.rb +35 -0
- data/lib/authlete/models/components/vci_jwks_request.rbi +13 -0
- data/lib/authlete/models/components/vci_jwks_response.rb +50 -0
- data/lib/authlete/models/components/vci_jwks_response.rbi +19 -0
- data/lib/authlete/models/components/vci_jwks_response_action.rb +26 -0
- data/lib/authlete/models/components/vci_jwks_response_action.rbi +11 -0
- data/lib/authlete/models/components/vci_jwtissuer_request.rb +35 -0
- data/lib/authlete/models/components/vci_jwtissuer_request.rbi +13 -0
- data/lib/authlete/models/components/vci_jwtissuer_response.rb +50 -0
- data/lib/authlete/models/components/vci_jwtissuer_response.rbi +19 -0
- data/lib/authlete/models/components/vci_jwtissuer_response_action.rb +26 -0
- data/lib/authlete/models/components/vci_jwtissuer_response_action.rbi +11 -0
- data/lib/authlete/models/components/vci_metadata_request.rb +35 -0
- data/lib/authlete/models/components/vci_metadata_request.rbi +13 -0
- data/lib/authlete/models/components/vci_metadata_response.rb +51 -0
- data/lib/authlete/models/components/vci_metadata_response.rbi +19 -0
- data/lib/authlete/models/components/vci_metadata_response_action.rb +27 -0
- data/lib/authlete/models/components/vci_metadata_response_action.rbi +11 -0
- data/lib/authlete/models/components/vci_offer_create_request.rb +172 -0
- data/lib/authlete/models/components/vci_offer_create_request.rbi +39 -0
- data/lib/authlete/models/components/vci_offer_create_response.rb +45 -0
- data/lib/authlete/models/components/vci_offer_create_response.rbi +19 -0
- data/lib/authlete/models/components/vci_offer_create_response_action.rb +24 -0
- data/lib/authlete/models/components/vci_offer_create_response_action.rbi +11 -0
- data/lib/authlete/models/components/vci_offer_info_request.rb +33 -0
- data/lib/authlete/models/components/vci_offer_info_request.rbi +13 -0
- data/lib/authlete/models/components/vci_offer_info_response.rb +45 -0
- data/lib/authlete/models/components/vci_offer_info_response.rbi +19 -0
- data/lib/authlete/models/components/vci_offer_info_response_action.rb +25 -0
- data/lib/authlete/models/components/vci_offer_info_response_action.rbi +11 -0
- data/lib/authlete/models/components/vci_single_issue_request.rb +37 -0
- data/lib/authlete/models/components/vci_single_issue_request.rbi +15 -0
- data/lib/authlete/models/components/vci_single_issue_response.rb +54 -0
- data/lib/authlete/models/components/vci_single_issue_response.rbi +21 -0
- data/lib/authlete/models/components/vci_single_issue_response_action.rb +28 -0
- data/lib/authlete/models/components/vci_single_issue_response_action.rbi +11 -0
- data/lib/authlete/models/components/vci_single_parse_request.rb +37 -0
- data/lib/authlete/models/components/vci_single_parse_request.rbi +15 -0
- data/lib/authlete/models/components/vci_single_parse_response.rb +49 -0
- data/lib/authlete/models/components/vci_single_parse_response.rbi +21 -0
- data/lib/authlete/models/components/vci_single_parse_response_action.rb +25 -0
- data/lib/authlete/models/components/vci_single_parse_response_action.rbi +11 -0
- data/lib/authlete/models/components/verified_claims_validation_schema.rb +23 -0
- data/lib/authlete/models/components/verified_claims_validation_schema.rbi +11 -0
- data/lib/authlete/models/components.rb +221 -0
- data/lib/authlete/models/errors/apierror.rb +37 -0
- data/lib/authlete/models/errors/apierror.rbi +16 -0
- data/lib/authlete/models/errors/result_error.rb +41 -0
- data/lib/authlete/models/errors/result_error.rbi +17 -0
- data/lib/authlete/models/errors.rb +13 -0
- data/lib/authlete/models/operations/auth_authorization_api_request.rb +37 -0
- data/lib/authlete/models/operations/auth_authorization_api_request.rbi +15 -0
- data/lib/authlete/models/operations/auth_authorization_api_response.rb +45 -0
- data/lib/authlete/models/operations/auth_authorization_api_response.rbi +19 -0
- data/lib/authlete/models/operations/auth_authorization_fail_api_request.rb +37 -0
- data/lib/authlete/models/operations/auth_authorization_fail_api_request.rbi +15 -0
- data/lib/authlete/models/operations/auth_authorization_fail_api_response.rb +45 -0
- data/lib/authlete/models/operations/auth_authorization_fail_api_response.rbi +19 -0
- data/lib/authlete/models/operations/auth_authorization_issue_api_request.rb +37 -0
- data/lib/authlete/models/operations/auth_authorization_issue_api_request.rbi +15 -0
- data/lib/authlete/models/operations/auth_authorization_issue_api_response.rb +45 -0
- data/lib/authlete/models/operations/auth_authorization_issue_api_response.rbi +19 -0
- data/lib/authlete/models/operations/auth_introspection_api_request.rb +37 -0
- data/lib/authlete/models/operations/auth_introspection_api_request.rbi +15 -0
- data/lib/authlete/models/operations/auth_introspection_api_response.rb +45 -0
- data/lib/authlete/models/operations/auth_introspection_api_response.rbi +19 -0
- data/lib/authlete/models/operations/auth_introspection_standard_api_request.rb +37 -0
- data/lib/authlete/models/operations/auth_introspection_standard_api_request.rbi +15 -0
- data/lib/authlete/models/operations/auth_introspection_standard_api_response.rb +45 -0
- data/lib/authlete/models/operations/auth_introspection_standard_api_response.rbi +19 -0
- data/lib/authlete/models/operations/auth_revocation_api_request.rb +37 -0
- data/lib/authlete/models/operations/auth_revocation_api_request.rbi +15 -0
- data/lib/authlete/models/operations/auth_revocation_api_response.rb +45 -0
- data/lib/authlete/models/operations/auth_revocation_api_response.rbi +19 -0
- data/lib/authlete/models/operations/auth_token_api_request.rb +37 -0
- data/lib/authlete/models/operations/auth_token_api_request.rbi +15 -0
- data/lib/authlete/models/operations/auth_token_api_response.rb +45 -0
- data/lib/authlete/models/operations/auth_token_api_response.rbi +19 -0
- data/lib/authlete/models/operations/auth_token_create_api_request.rb +37 -0
- data/lib/authlete/models/operations/auth_token_create_api_request.rbi +15 -0
- data/lib/authlete/models/operations/auth_token_create_api_response.rb +45 -0
- data/lib/authlete/models/operations/auth_token_create_api_response.rbi +19 -0
- data/lib/authlete/models/operations/auth_token_delete_api_request.rb +39 -0
- data/lib/authlete/models/operations/auth_token_delete_api_request.rbi +15 -0
- data/lib/authlete/models/operations/auth_token_delete_api_response.rb +41 -0
- data/lib/authlete/models/operations/auth_token_delete_api_response.rbi +17 -0
- data/lib/authlete/models/operations/auth_token_fail_api_request.rb +37 -0
- data/lib/authlete/models/operations/auth_token_fail_api_request.rbi +15 -0
- data/lib/authlete/models/operations/auth_token_fail_api_response.rb +45 -0
- data/lib/authlete/models/operations/auth_token_fail_api_response.rbi +19 -0
- data/lib/authlete/models/operations/auth_token_get_list_api_request.rb +52 -0
- data/lib/authlete/models/operations/auth_token_get_list_api_request.rbi +21 -0
- data/lib/authlete/models/operations/auth_token_get_list_api_response.rb +45 -0
- data/lib/authlete/models/operations/auth_token_get_list_api_response.rbi +19 -0
- data/lib/authlete/models/operations/auth_token_issue_api_request.rb +37 -0
- data/lib/authlete/models/operations/auth_token_issue_api_request.rbi +15 -0
- data/lib/authlete/models/operations/auth_token_issue_api_response.rb +45 -0
- data/lib/authlete/models/operations/auth_token_issue_api_response.rbi +19 -0
- data/lib/authlete/models/operations/auth_token_revoke_api_request.rb +37 -0
- data/lib/authlete/models/operations/auth_token_revoke_api_request.rbi +15 -0
- data/lib/authlete/models/operations/auth_token_revoke_api_response.rb +45 -0
- data/lib/authlete/models/operations/auth_token_revoke_api_response.rbi +19 -0
- data/lib/authlete/models/operations/auth_token_update_api_request.rb +37 -0
- data/lib/authlete/models/operations/auth_token_update_api_request.rbi +15 -0
- data/lib/authlete/models/operations/auth_token_update_api_response.rb +45 -0
- data/lib/authlete/models/operations/auth_token_update_api_response.rbi +19 -0
- data/lib/authlete/models/operations/auth_userinfo_api_request.rb +37 -0
- data/lib/authlete/models/operations/auth_userinfo_api_request.rbi +15 -0
- data/lib/authlete/models/operations/auth_userinfo_api_response.rb +45 -0
- data/lib/authlete/models/operations/auth_userinfo_api_response.rbi +19 -0
- data/lib/authlete/models/operations/auth_userinfo_issue_api_request.rb +37 -0
- data/lib/authlete/models/operations/auth_userinfo_issue_api_request.rbi +15 -0
- data/lib/authlete/models/operations/auth_userinfo_issue_api_response.rb +45 -0
- data/lib/authlete/models/operations/auth_userinfo_issue_api_response.rbi +19 -0
- data/lib/authlete/models/operations/authorization_ticket_info_post_api_request.rb +37 -0
- data/lib/authlete/models/operations/authorization_ticket_info_post_api_request.rbi +15 -0
- data/lib/authlete/models/operations/authorization_ticket_info_post_api_response.rb +45 -0
- data/lib/authlete/models/operations/authorization_ticket_info_post_api_response.rbi +19 -0
- data/lib/authlete/models/operations/backchannel_authentication_api_request.rb +37 -0
- data/lib/authlete/models/operations/backchannel_authentication_api_request.rbi +15 -0
- data/lib/authlete/models/operations/backchannel_authentication_api_response.rb +45 -0
- data/lib/authlete/models/operations/backchannel_authentication_api_response.rbi +19 -0
- data/lib/authlete/models/operations/backchannel_authentication_complete_api_request.rb +37 -0
- data/lib/authlete/models/operations/backchannel_authentication_complete_api_request.rbi +15 -0
- data/lib/authlete/models/operations/backchannel_authentication_complete_api_response.rb +45 -0
- data/lib/authlete/models/operations/backchannel_authentication_complete_api_response.rbi +19 -0
- data/lib/authlete/models/operations/backchannel_authentication_fail_api_request.rb +37 -0
- data/lib/authlete/models/operations/backchannel_authentication_fail_api_request.rbi +15 -0
- data/lib/authlete/models/operations/backchannel_authentication_fail_api_response.rb +45 -0
- data/lib/authlete/models/operations/backchannel_authentication_fail_api_response.rbi +19 -0
- data/lib/authlete/models/operations/backchannel_authentication_issue_api_request.rb +37 -0
- data/lib/authlete/models/operations/backchannel_authentication_issue_api_request.rbi +15 -0
- data/lib/authlete/models/operations/backchannel_authentication_issue_api_response.rb +45 -0
- data/lib/authlete/models/operations/backchannel_authentication_issue_api_response.rbi +19 -0
- data/lib/authlete/models/operations/client_authorization_delete_api_request.rb +48 -0
- data/lib/authlete/models/operations/client_authorization_delete_api_request.rbi +19 -0
- data/lib/authlete/models/operations/client_authorization_delete_api_response.rb +45 -0
- data/lib/authlete/models/operations/client_authorization_delete_api_response.rbi +19 -0
- data/lib/authlete/models/operations/client_authorization_get_list_api_request.rb +57 -0
- data/lib/authlete/models/operations/client_authorization_get_list_api_request.rbi +23 -0
- data/lib/authlete/models/operations/client_authorization_get_list_api_response.rb +45 -0
- data/lib/authlete/models/operations/client_authorization_get_list_api_response.rbi +19 -0
- data/lib/authlete/models/operations/client_authorization_update_api_request.rb +42 -0
- data/lib/authlete/models/operations/client_authorization_update_api_request.rbi +17 -0
- data/lib/authlete/models/operations/client_authorization_update_api_response.rb +45 -0
- data/lib/authlete/models/operations/client_authorization_update_api_response.rbi +19 -0
- data/lib/authlete/models/operations/client_create_api_request.rb +37 -0
- data/lib/authlete/models/operations/client_create_api_request.rbi +15 -0
- data/lib/authlete/models/operations/client_create_api_response.rb +45 -0
- data/lib/authlete/models/operations/client_create_api_response.rbi +19 -0
- data/lib/authlete/models/operations/client_delete_api_request.rb +37 -0
- data/lib/authlete/models/operations/client_delete_api_request.rbi +15 -0
- data/lib/authlete/models/operations/client_delete_api_response.rb +41 -0
- data/lib/authlete/models/operations/client_delete_api_response.rbi +17 -0
- data/lib/authlete/models/operations/client_extension_requestables_scopes_delete_api_request.rb +38 -0
- data/lib/authlete/models/operations/client_extension_requestables_scopes_delete_api_request.rbi +15 -0
- data/lib/authlete/models/operations/client_extension_requestables_scopes_delete_api_response.rb +41 -0
- data/lib/authlete/models/operations/client_extension_requestables_scopes_delete_api_response.rbi +17 -0
- data/lib/authlete/models/operations/client_extension_requestables_scopes_get_api_request.rb +38 -0
- data/lib/authlete/models/operations/client_extension_requestables_scopes_get_api_request.rbi +15 -0
- data/lib/authlete/models/operations/client_extension_requestables_scopes_get_api_response.rb +45 -0
- data/lib/authlete/models/operations/client_extension_requestables_scopes_get_api_response.rbi +19 -0
- data/lib/authlete/models/operations/client_extension_requestables_scopes_update_api_request.rb +42 -0
- data/lib/authlete/models/operations/client_extension_requestables_scopes_update_api_request.rbi +17 -0
- data/lib/authlete/models/operations/client_extension_requestables_scopes_update_api_response.rb +45 -0
- data/lib/authlete/models/operations/client_extension_requestables_scopes_update_api_response.rbi +19 -0
- data/lib/authlete/models/operations/client_flag_update_api_request.rb +41 -0
- data/lib/authlete/models/operations/client_flag_update_api_request.rbi +17 -0
- data/lib/authlete/models/operations/client_flag_update_api_response.rb +45 -0
- data/lib/authlete/models/operations/client_flag_update_api_response.rbi +19 -0
- data/lib/authlete/models/operations/client_get_api_request.rb +37 -0
- data/lib/authlete/models/operations/client_get_api_request.rbi +15 -0
- data/lib/authlete/models/operations/client_get_api_response.rb +45 -0
- data/lib/authlete/models/operations/client_get_api_response.rbi +19 -0
- data/lib/authlete/models/operations/client_get_list_api_request.rb +48 -0
- data/lib/authlete/models/operations/client_get_list_api_request.rbi +19 -0
- data/lib/authlete/models/operations/client_get_list_api_response.rb +45 -0
- data/lib/authlete/models/operations/client_get_list_api_response.rbi +19 -0
- data/lib/authlete/models/operations/client_granted_scopes_delete_api_request.rb +48 -0
- data/lib/authlete/models/operations/client_granted_scopes_delete_api_request.rbi +19 -0
- data/lib/authlete/models/operations/client_granted_scopes_delete_api_response.rb +45 -0
- data/lib/authlete/models/operations/client_granted_scopes_delete_api_response.rbi +19 -0
- data/lib/authlete/models/operations/client_granted_scopes_get_api_request.rb +48 -0
- data/lib/authlete/models/operations/client_granted_scopes_get_api_request.rbi +19 -0
- data/lib/authlete/models/operations/client_granted_scopes_get_api_response.rb +45 -0
- data/lib/authlete/models/operations/client_granted_scopes_get_api_response.rbi +19 -0
- data/lib/authlete/models/operations/client_registration_api_request.rb +37 -0
- data/lib/authlete/models/operations/client_registration_api_request.rbi +15 -0
- data/lib/authlete/models/operations/client_registration_api_requestbody.rb +45 -0
- data/lib/authlete/models/operations/client_registration_api_requestbody.rbi +17 -0
- data/lib/authlete/models/operations/client_registration_api_response.rb +45 -0
- data/lib/authlete/models/operations/client_registration_api_response.rbi +19 -0
- data/lib/authlete/models/operations/client_registration_delete_api_request.rb +37 -0
- data/lib/authlete/models/operations/client_registration_delete_api_request.rbi +15 -0
- data/lib/authlete/models/operations/client_registration_delete_api_requestbody.rb +45 -0
- data/lib/authlete/models/operations/client_registration_delete_api_requestbody.rbi +17 -0
- data/lib/authlete/models/operations/client_registration_delete_api_response.rb +45 -0
- data/lib/authlete/models/operations/client_registration_delete_api_response.rbi +19 -0
- data/lib/authlete/models/operations/client_registration_get_api_request.rb +37 -0
- data/lib/authlete/models/operations/client_registration_get_api_request.rbi +15 -0
- data/lib/authlete/models/operations/client_registration_get_api_requestbody.rb +45 -0
- data/lib/authlete/models/operations/client_registration_get_api_requestbody.rbi +17 -0
- data/lib/authlete/models/operations/client_registration_get_api_response.rb +45 -0
- data/lib/authlete/models/operations/client_registration_get_api_response.rbi +19 -0
- data/lib/authlete/models/operations/client_registration_update_api_request.rb +37 -0
- data/lib/authlete/models/operations/client_registration_update_api_request.rbi +15 -0
- data/lib/authlete/models/operations/client_registration_update_api_requestbody.rb +45 -0
- data/lib/authlete/models/operations/client_registration_update_api_requestbody.rbi +17 -0
- data/lib/authlete/models/operations/client_registration_update_api_response.rb +45 -0
- data/lib/authlete/models/operations/client_registration_update_api_response.rbi +19 -0
- data/lib/authlete/models/operations/client_secret_refresh_api_request.rb +38 -0
- data/lib/authlete/models/operations/client_secret_refresh_api_request.rbi +15 -0
- data/lib/authlete/models/operations/client_secret_refresh_api_response.rb +45 -0
- data/lib/authlete/models/operations/client_secret_refresh_api_response.rbi +19 -0
- data/lib/authlete/models/operations/client_secret_update_api_request.rb +42 -0
- data/lib/authlete/models/operations/client_secret_update_api_request.rbi +17 -0
- data/lib/authlete/models/operations/client_secret_update_api_response.rb +45 -0
- data/lib/authlete/models/operations/client_secret_update_api_response.rbi +19 -0
- data/lib/authlete/models/operations/client_update_api_request.rb +41 -0
- data/lib/authlete/models/operations/client_update_api_request.rbi +17 -0
- data/lib/authlete/models/operations/client_update_api_response.rb +45 -0
- data/lib/authlete/models/operations/client_update_api_response.rbi +19 -0
- data/lib/authlete/models/operations/device_authorization_api_request.rb +37 -0
- data/lib/authlete/models/operations/device_authorization_api_request.rbi +15 -0
- data/lib/authlete/models/operations/device_authorization_api_response.rb +45 -0
- data/lib/authlete/models/operations/device_authorization_api_response.rbi +19 -0
- data/lib/authlete/models/operations/device_complete_api_request.rb +37 -0
- data/lib/authlete/models/operations/device_complete_api_request.rbi +15 -0
- data/lib/authlete/models/operations/device_complete_api_response.rb +45 -0
- data/lib/authlete/models/operations/device_complete_api_response.rbi +19 -0
- data/lib/authlete/models/operations/device_verification_api_request.rb +37 -0
- data/lib/authlete/models/operations/device_verification_api_request.rbi +15 -0
- data/lib/authlete/models/operations/device_verification_api_response.rb +45 -0
- data/lib/authlete/models/operations/device_verification_api_response.rbi +19 -0
- data/lib/authlete/models/operations/federation_configuration_api_request.rb +37 -0
- data/lib/authlete/models/operations/federation_configuration_api_request.rbi +15 -0
- data/lib/authlete/models/operations/federation_configuration_api_requestbody.rb +28 -0
- data/lib/authlete/models/operations/federation_configuration_api_requestbody.rbi +11 -0
- data/lib/authlete/models/operations/federation_configuration_api_response.rb +45 -0
- data/lib/authlete/models/operations/federation_configuration_api_response.rbi +19 -0
- data/lib/authlete/models/operations/federation_registration_api_request.rb +37 -0
- data/lib/authlete/models/operations/federation_registration_api_request.rbi +15 -0
- data/lib/authlete/models/operations/federation_registration_api_response.rb +45 -0
- data/lib/authlete/models/operations/federation_registration_api_response.rbi +19 -0
- data/lib/authlete/models/operations/grant_m_api_request.rb +37 -0
- data/lib/authlete/models/operations/grant_m_api_request.rbi +15 -0
- data/lib/authlete/models/operations/grant_m_api_response.rb +45 -0
- data/lib/authlete/models/operations/grant_m_api_response.rbi +19 -0
- data/lib/authlete/models/operations/hsk_create_api_request.rb +37 -0
- data/lib/authlete/models/operations/hsk_create_api_request.rbi +15 -0
- data/lib/authlete/models/operations/hsk_create_api_response.rb +45 -0
- data/lib/authlete/models/operations/hsk_create_api_response.rbi +19 -0
- data/lib/authlete/models/operations/hsk_delete_api_request.rb +37 -0
- data/lib/authlete/models/operations/hsk_delete_api_request.rbi +15 -0
- data/lib/authlete/models/operations/hsk_delete_api_response.rb +45 -0
- data/lib/authlete/models/operations/hsk_delete_api_response.rbi +19 -0
- data/lib/authlete/models/operations/hsk_get_api_request.rb +37 -0
- data/lib/authlete/models/operations/hsk_get_api_request.rbi +15 -0
- data/lib/authlete/models/operations/hsk_get_api_response.rb +45 -0
- data/lib/authlete/models/operations/hsk_get_api_response.rbi +19 -0
- data/lib/authlete/models/operations/hsk_get_list_api_request.rb +33 -0
- data/lib/authlete/models/operations/hsk_get_list_api_request.rbi +13 -0
- data/lib/authlete/models/operations/hsk_get_list_api_response.rb +45 -0
- data/lib/authlete/models/operations/hsk_get_list_api_response.rbi +19 -0
- data/lib/authlete/models/operations/idtoken_reissue_api_request.rb +37 -0
- data/lib/authlete/models/operations/idtoken_reissue_api_request.rbi +15 -0
- data/lib/authlete/models/operations/idtoken_reissue_api_response.rb +45 -0
- data/lib/authlete/models/operations/idtoken_reissue_api_response.rbi +19 -0
- data/lib/authlete/models/operations/jose_verify_api_request.rb +37 -0
- data/lib/authlete/models/operations/jose_verify_api_request.rbi +15 -0
- data/lib/authlete/models/operations/jose_verify_api_response.rb +45 -0
- data/lib/authlete/models/operations/jose_verify_api_response.rbi +19 -0
- data/lib/authlete/models/operations/native_sso_api_request.rb +37 -0
- data/lib/authlete/models/operations/native_sso_api_request.rbi +15 -0
- data/lib/authlete/models/operations/native_sso_api_response.rb +45 -0
- data/lib/authlete/models/operations/native_sso_api_response.rbi +19 -0
- data/lib/authlete/models/operations/native_sso_logout_api_request.rb +37 -0
- data/lib/authlete/models/operations/native_sso_logout_api_request.rbi +15 -0
- data/lib/authlete/models/operations/native_sso_logout_api_response.rb +45 -0
- data/lib/authlete/models/operations/native_sso_logout_api_response.rbi +19 -0
- data/lib/authlete/models/operations/pushed_auth_req_api_request.rb +37 -0
- data/lib/authlete/models/operations/pushed_auth_req_api_request.rbi +15 -0
- data/lib/authlete/models/operations/pushed_auth_req_api_response.rb +45 -0
- data/lib/authlete/models/operations/pushed_auth_req_api_response.rbi +19 -0
- data/lib/authlete/models/operations/service_configuration_api_request.rb +41 -0
- data/lib/authlete/models/operations/service_configuration_api_request.rbi +17 -0
- data/lib/authlete/models/operations/service_configuration_api_response.rb +45 -0
- data/lib/authlete/models/operations/service_configuration_api_response.rbi +19 -0
- data/lib/authlete/models/operations/service_configuration_api_responsebody.rb +29 -0
- data/lib/authlete/models/operations/service_configuration_api_responsebody.rbi +11 -0
- data/lib/authlete/models/operations/service_create_api_response.rb +45 -0
- data/lib/authlete/models/operations/service_create_api_response.rbi +19 -0
- data/lib/authlete/models/operations/service_delete_api_request.rb +33 -0
- data/lib/authlete/models/operations/service_delete_api_request.rbi +13 -0
- data/lib/authlete/models/operations/service_delete_api_response.rb +41 -0
- data/lib/authlete/models/operations/service_delete_api_response.rbi +17 -0
- data/lib/authlete/models/operations/service_get_api_request.rb +33 -0
- data/lib/authlete/models/operations/service_get_api_request.rbi +13 -0
- data/lib/authlete/models/operations/service_get_api_response.rb +45 -0
- data/lib/authlete/models/operations/service_get_api_response.rbi +19 -0
- data/lib/authlete/models/operations/service_get_list_api_request.rb +37 -0
- data/lib/authlete/models/operations/service_get_list_api_request.rbi +15 -0
- data/lib/authlete/models/operations/service_get_list_api_response.rb +45 -0
- data/lib/authlete/models/operations/service_get_list_api_response.rbi +19 -0
- data/lib/authlete/models/operations/service_jwks_get_api_request.rb +41 -0
- data/lib/authlete/models/operations/service_jwks_get_api_request.rbi +17 -0
- data/lib/authlete/models/operations/service_jwks_get_api_response.rb +45 -0
- data/lib/authlete/models/operations/service_jwks_get_api_response.rbi +19 -0
- data/lib/authlete/models/operations/service_update_api_request.rb +37 -0
- data/lib/authlete/models/operations/service_update_api_request.rbi +15 -0
- data/lib/authlete/models/operations/service_update_api_response.rb +45 -0
- data/lib/authlete/models/operations/service_update_api_response.rbi +19 -0
- data/lib/authlete/models/operations/updateauthorizationticket_request.rb +37 -0
- data/lib/authlete/models/operations/updateauthorizationticket_request.rbi +15 -0
- data/lib/authlete/models/operations/updateauthorizationticket_response.rb +45 -0
- data/lib/authlete/models/operations/updateauthorizationticket_response.rbi +19 -0
- data/lib/authlete/models/operations/vci_batch_issue_api_request.rb +37 -0
- data/lib/authlete/models/operations/vci_batch_issue_api_request.rbi +15 -0
- data/lib/authlete/models/operations/vci_batch_issue_api_response.rb +45 -0
- data/lib/authlete/models/operations/vci_batch_issue_api_response.rbi +19 -0
- data/lib/authlete/models/operations/vci_batch_parse_api_request.rb +37 -0
- data/lib/authlete/models/operations/vci_batch_parse_api_request.rbi +15 -0
- data/lib/authlete/models/operations/vci_batch_parse_api_response.rb +45 -0
- data/lib/authlete/models/operations/vci_batch_parse_api_response.rbi +19 -0
- data/lib/authlete/models/operations/vci_deferred_issue_api_request.rb +37 -0
- data/lib/authlete/models/operations/vci_deferred_issue_api_request.rbi +15 -0
- data/lib/authlete/models/operations/vci_deferred_issue_api_response.rb +45 -0
- data/lib/authlete/models/operations/vci_deferred_issue_api_response.rbi +19 -0
- data/lib/authlete/models/operations/vci_deferred_parse_api_request.rb +37 -0
- data/lib/authlete/models/operations/vci_deferred_parse_api_request.rbi +15 -0
- data/lib/authlete/models/operations/vci_deferred_parse_api_response.rb +45 -0
- data/lib/authlete/models/operations/vci_deferred_parse_api_response.rbi +19 -0
- data/lib/authlete/models/operations/vci_jwks_api_request.rb +37 -0
- data/lib/authlete/models/operations/vci_jwks_api_request.rbi +15 -0
- data/lib/authlete/models/operations/vci_jwks_api_response.rb +45 -0
- data/lib/authlete/models/operations/vci_jwks_api_response.rbi +19 -0
- data/lib/authlete/models/operations/vci_jwtissuer_api_request.rb +37 -0
- data/lib/authlete/models/operations/vci_jwtissuer_api_request.rbi +15 -0
- data/lib/authlete/models/operations/vci_jwtissuer_api_response.rb +45 -0
- data/lib/authlete/models/operations/vci_jwtissuer_api_response.rbi +19 -0
- data/lib/authlete/models/operations/vci_metadata_api_request.rb +37 -0
- data/lib/authlete/models/operations/vci_metadata_api_request.rbi +15 -0
- data/lib/authlete/models/operations/vci_metadata_api_response.rb +45 -0
- data/lib/authlete/models/operations/vci_metadata_api_response.rbi +19 -0
- data/lib/authlete/models/operations/vci_offer_create_api_request.rb +37 -0
- data/lib/authlete/models/operations/vci_offer_create_api_request.rbi +15 -0
- data/lib/authlete/models/operations/vci_offer_create_api_response.rb +45 -0
- data/lib/authlete/models/operations/vci_offer_create_api_response.rbi +19 -0
- data/lib/authlete/models/operations/vci_offer_info_api_request.rb +37 -0
- data/lib/authlete/models/operations/vci_offer_info_api_request.rbi +15 -0
- data/lib/authlete/models/operations/vci_offer_info_api_response.rb +45 -0
- data/lib/authlete/models/operations/vci_offer_info_api_response.rbi +19 -0
- data/lib/authlete/models/operations/vci_single_issue_api_request.rb +37 -0
- data/lib/authlete/models/operations/vci_single_issue_api_request.rbi +15 -0
- data/lib/authlete/models/operations/vci_single_issue_api_response.rb +45 -0
- data/lib/authlete/models/operations/vci_single_issue_api_response.rbi +19 -0
- data/lib/authlete/models/operations/vci_single_parse_api_request.rb +37 -0
- data/lib/authlete/models/operations/vci_single_parse_api_request.rbi +15 -0
- data/lib/authlete/models/operations/vci_single_parse_api_response.rb +45 -0
- data/lib/authlete/models/operations/vci_single_parse_api_response.rbi +19 -0
- data/lib/authlete/models/operations.rb +166 -0
- data/lib/authlete/native_sso.rb +422 -0
- data/lib/authlete/pushed_authorization.rb +197 -0
- data/lib/authlete/revocation.rb +290 -0
- data/lib/authlete/sdk_hooks/hooks.rb +95 -0
- data/lib/authlete/sdk_hooks/types.rb +170 -0
- data/lib/authlete/sdkconfiguration.rb +107 -0
- data/lib/authlete/sdkconfiguration.rbi +57 -0
- data/lib/authlete/services.rb +923 -0
- data/lib/authlete/token_management.rb +945 -0
- data/lib/authlete/tokens.rb +953 -0
- data/lib/authlete/userinfo.rb +568 -0
- data/lib/authlete/utils/forms.rb +206 -0
- data/lib/authlete/utils/headers.rb +77 -0
- data/lib/authlete/utils/query_params.rb +131 -0
- data/lib/authlete/utils/request_bodies.rb +61 -0
- data/lib/authlete/utils/retries.rb +95 -0
- data/lib/authlete/utils/security.rb +130 -0
- data/lib/authlete/utils/url.rb +100 -0
- data/lib/authlete/utils/utils.rb +187 -0
- data/lib/authlete/verifiable_credentials.rb +1746 -0
- data/lib/authlete_ruby_test.rb +45 -0
- data/lib/crystalline/metadata_fields.rb +209 -0
- data/lib/crystalline/module.rb +92 -0
- data/lib/crystalline/types.rb +78 -0
- data/lib/crystalline/utils.rb +56 -0
- data/lib/crystalline.rb +13 -0
- metadata +997 -0
|
@@ -0,0 +1,1064 @@
|
|
|
1
|
+
# Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
2
|
+
|
|
3
|
+
# typed: true
|
|
4
|
+
# frozen_string_literal: true
|
|
5
|
+
|
|
6
|
+
require 'faraday'
|
|
7
|
+
require 'faraday/multipart'
|
|
8
|
+
require 'faraday/retry'
|
|
9
|
+
require 'sorbet-runtime'
|
|
10
|
+
require_relative 'sdk_hooks/hooks'
|
|
11
|
+
require_relative 'utils/retries'
|
|
12
|
+
|
|
13
|
+
module Authlete
|
|
14
|
+
extend T::Sig
|
|
15
|
+
class Ciba
|
|
16
|
+
extend T::Sig
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
sig { params(sdk_config: SDKConfiguration).void }
|
|
21
|
+
def initialize(sdk_config)
|
|
22
|
+
@sdk_configuration = sdk_config
|
|
23
|
+
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
sig { params(base_url: String, url_variables: T.nilable(T::Hash[Symbol, T.any(String, T::Enum)])).returns(String) }
|
|
27
|
+
def get_url(base_url:, url_variables: nil)
|
|
28
|
+
sd_base_url, sd_options = @sdk_configuration.get_server_details
|
|
29
|
+
|
|
30
|
+
if base_url.nil?
|
|
31
|
+
base_url = sd_base_url
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
if url_variables.nil?
|
|
35
|
+
url_variables = sd_options
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
return Utils.template_url base_url, url_variables
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
sig { params(backchannel_authentication_request: Models::Components::BackchannelAuthenticationRequest, service_id: ::String, timeout_ms: T.nilable(Integer)).returns(Models::Operations::BackchannelAuthenticationApiResponse) }
|
|
43
|
+
def process_authentication(backchannel_authentication_request:, service_id:, timeout_ms: nil)
|
|
44
|
+
# process_authentication - Process Backchannel Authentication Request
|
|
45
|
+
# This API parses request parameters of a [backchannel authentication request](https://openid.net/specs/openid-client-initiated-backchannel-authentication-core-1\_0.html#auth\_request)
|
|
46
|
+
# and returns necessary data for the authorization server implementation to process the backchannel
|
|
47
|
+
# authentication request further.
|
|
48
|
+
# ### Description
|
|
49
|
+
# This API is supposed to be called from within the implementation of the [backchannel authentication
|
|
50
|
+
# endpoint](https://openid.net/specs/openid-client-initiated-backchannel-authentication-core-1\_0.html#auth\_backchannel\_endpoint)
|
|
51
|
+
# of the service. The endpoint implementation must extract the request parameters from the
|
|
52
|
+
# backchannel authentication request from the client application and pass them as the value of parameters
|
|
53
|
+
# request parameter for Authlete's `/backchannel/authentication` API.
|
|
54
|
+
# The value of parameters is the entire entity body (which is formatted in `application/x-www-form-urlencoded`)
|
|
55
|
+
# of the request from the client application.
|
|
56
|
+
# The following code snippet is an example in JAX-RS showing how to extract request parameters from
|
|
57
|
+
# the backchannel authentication request.
|
|
58
|
+
# ```java
|
|
59
|
+
# @POST
|
|
60
|
+
# @Consumes(MediaType.APPLICATION\_FORM\_URLENCODED)
|
|
61
|
+
# public Response post(String parameters)
|
|
62
|
+
# {
|
|
63
|
+
# // 'parameters' is the entity body of the backchannel authentication request.
|
|
64
|
+
# ......
|
|
65
|
+
# }
|
|
66
|
+
# ```
|
|
67
|
+
# The endpoint implementation does not have to parse the request parameters from the client application
|
|
68
|
+
# because Authlete's `/backchannel/authentication` API does it.
|
|
69
|
+
# The response from `/backchannel/authentication` API has various parameters. Among them, it is `action`
|
|
70
|
+
# parameter that the authorization server implementation should check first because it denotes the
|
|
71
|
+
# next action that the authorization server implementation should take. According to the value of
|
|
72
|
+
# `action`, the service implementation must take the steps described below.
|
|
73
|
+
# **INTERNAL\_SERVER\_ERROR**
|
|
74
|
+
# When the value of `action` is `INTERNAL\_SERVER\_ERROR`, it means that the request from the authorization
|
|
75
|
+
# server implementation was wrong or that an error occurred in Authlete.
|
|
76
|
+
# In either case, from the viewpoint of the client application, it is an error on the server side.
|
|
77
|
+
# Therefore, the service implementation should generate a response to the client application with
|
|
78
|
+
# HTTP status of "500 Internal Server Error" and `application/json`.
|
|
79
|
+
# The value of `responseContent` is a JSON string which describes the error, so it can be used
|
|
80
|
+
# as the entity body of the response.
|
|
81
|
+
# The following illustrates the response which the service implementation should generate and return
|
|
82
|
+
# to the client application.
|
|
83
|
+
# ```
|
|
84
|
+
# HTTP/1.1 500 Internal Server Error
|
|
85
|
+
# Content-Type: application/json
|
|
86
|
+
# Cache-Control: no-store
|
|
87
|
+
# Pragma: no-cache
|
|
88
|
+
# {responseContent}
|
|
89
|
+
# ```
|
|
90
|
+
# **BAD\_REQUEST**
|
|
91
|
+
# When the value of `action` is `BAD\_REQUEST`, it means that the request from the client application
|
|
92
|
+
# is invalid.
|
|
93
|
+
# The authorization server implementation should generate a response to the client application with
|
|
94
|
+
# "400 Bad Request" and `application/json`.
|
|
95
|
+
# The value of `responseContent` is a JSON string which describes the error, so it can be used as
|
|
96
|
+
# the entity body of the response.
|
|
97
|
+
# The following illustrates the response which the service implementation should generate and return
|
|
98
|
+
# to the client application.
|
|
99
|
+
# ```
|
|
100
|
+
# HTTP/1.1 400 Bad Request
|
|
101
|
+
# Content-Type: application/json
|
|
102
|
+
# Cache-Control: no-store
|
|
103
|
+
# Pragma: no-cache
|
|
104
|
+
# {responseContent}
|
|
105
|
+
# ```
|
|
106
|
+
# **UNAUTHORIZED**
|
|
107
|
+
# When the value of `action` is `UNAUTHORIZED`, it means that client authentication of the backchannel
|
|
108
|
+
# authentication request failed. Note that client authentication is always required at the backchannel
|
|
109
|
+
# authentication endpoint. This implies that public clients are not allowed to use the backchannel
|
|
110
|
+
# authentication endpoint.
|
|
111
|
+
# The authorization server implementation should generate a response to the client application with
|
|
112
|
+
# "401 Unauthorized" and `application/json`.
|
|
113
|
+
# The value of `responseContent` is a JSON string which describes the error, so it can be used as
|
|
114
|
+
# the entity body of the response.
|
|
115
|
+
# The following illustrates the response which the service implementation must generate and return
|
|
116
|
+
# to the client application.
|
|
117
|
+
# ```
|
|
118
|
+
# HTTP/1.1 401 Unauthorized
|
|
119
|
+
# WWW-Authenticate: (challenge)
|
|
120
|
+
# Content-Type: application/json
|
|
121
|
+
# Cache-Control: no-store
|
|
122
|
+
# Pragma: no-cache
|
|
123
|
+
# {responseContent}
|
|
124
|
+
# ```
|
|
125
|
+
# **USER\_IDENTIFICATION**
|
|
126
|
+
# When the value of `action` is `USER\_IDENTIFICATION`, it means that the backchannel authentication
|
|
127
|
+
# request from the client application is valid. The authorization server implementation has to follow
|
|
128
|
+
# the steps below.
|
|
129
|
+
# [1] END-USER IDENTIFICATION
|
|
130
|
+
# The first step is to determine the subject (= unique identifier) of the end-user from whom the
|
|
131
|
+
# client application wants to get authorization.
|
|
132
|
+
# According to the CIBA specification, a backchannel authentication request contains one (and only
|
|
133
|
+
# one) of the `login\_hint\_token`, `id\_token\_hint` and `login\_hint` request parameters as a hint
|
|
134
|
+
# by which the authorization server identifies the subject of an end-user.
|
|
135
|
+
# The authorization server implementation can know which hint is included in the backchannel authentication
|
|
136
|
+
# request by the `hintType` parameter. For example, when the value of the parameter `LOGIN\_HINT`,
|
|
137
|
+
# it means that the backchannel authentication request contains the `login\_hint` request parameter
|
|
138
|
+
# as a hint.
|
|
139
|
+
# The value of the `hint` parameter is the value of the hint. For example, when the value of the
|
|
140
|
+
# `hintType` parameter is `LOGIN\_HINT`, The value of the `hint` parameter is the value of the `login\_hint`
|
|
141
|
+
# request parameter.
|
|
142
|
+
# It is up to the authorization server implementation how to determine the subject of the end-user
|
|
143
|
+
# from the hint. Only when the `id\_token\_hint` request parameter is used, authorization server
|
|
144
|
+
# implementation can use the sub response parameter, which holds the value of the sub claim in the
|
|
145
|
+
# `id\_token\_hint` request parameter.
|
|
146
|
+
# [2] END-USER IDENTIFICATION ERROR
|
|
147
|
+
# There are some cases where the authorization server implementation encounters an error during
|
|
148
|
+
# the user identification process. In any error case, the service implementation has to return an
|
|
149
|
+
# HTTP response with the error response parameter to the client application. The following is an
|
|
150
|
+
# example of such error responses.
|
|
151
|
+
# ```
|
|
152
|
+
# HTTP/1.1 400 Bad Request
|
|
153
|
+
# Content-Type: application/json
|
|
154
|
+
# Cache-Control: no-store
|
|
155
|
+
# Pragma: no-cache
|
|
156
|
+
# { "error":"unknown\_user\_id" }
|
|
157
|
+
# ```
|
|
158
|
+
# Authlete provides `/backchannel/authentication/fail` API that builds the response body (JSON)
|
|
159
|
+
# of an error response. However, because it is easy to build an error response manually, you may
|
|
160
|
+
# choose not to call the API. One good thing in using the API is that the API call can trigger
|
|
161
|
+
# deletion of the ticket which has been issued from Authlete's `/backchannel/authentication` API.
|
|
162
|
+
# If you don't call `/backchannel/authentication/fail` API, the ticket will continue to exist in
|
|
163
|
+
# the database until it is cleaned up by the batch program after the ticket expires.
|
|
164
|
+
# Possible error cases that the authorization server implementation itself has to handle are as
|
|
165
|
+
# follows. Other error cases have already been covered by `/backchannel/authentication` API.
|
|
166
|
+
# - `expired\_login\_hint\_token`
|
|
167
|
+
# The authorization server implementation detected that the hint presented by the `login\_hint\_token`
|
|
168
|
+
# request parameter has expired.
|
|
169
|
+
# Note that the format of `login\_hint\_token` is not described in the CIBA Core spec at all and
|
|
170
|
+
# so there is no consensus on how to detect expiration of `login\_hint\_token`. Interpretation
|
|
171
|
+
# of `login\_hint\_token` is left to each authorization server implementation.
|
|
172
|
+
# - `unknown\_user\_id`
|
|
173
|
+
# The authorization server implementation could not determine the subject of the end-user by
|
|
174
|
+
# the presented hint.
|
|
175
|
+
# - `unauthorized\_client`
|
|
176
|
+
# The authorization server implementation has custom rules to reject backchannel authentication
|
|
177
|
+
# requests from some particular clients and found that the client which has made the backchannel
|
|
178
|
+
# authentication request is one of the particular clients.
|
|
179
|
+
# Note that `/backchannel/authentication` API does not return `action=USER\_IDENTIFICATION` in
|
|
180
|
+
# cases where the client does not exist or client authentication has failed. Therefore, the
|
|
181
|
+
# authorization server implementation will never have to use the error code `unauthorized\_client`
|
|
182
|
+
# unless the server has intentionally implemented custom rules to reject backchannel authentication
|
|
183
|
+
# requests based on clients.
|
|
184
|
+
# - `missing\_user\_code`
|
|
185
|
+
# The authorization server implementation has custom rules to require that a backchannel authentication
|
|
186
|
+
# request include a user code for some particular users and found that the user identified by
|
|
187
|
+
# the hint is one of the particular users.
|
|
188
|
+
# Note that `/backchannel/authentication` API does not return `action=USER\_IDENTIFICATION` when
|
|
189
|
+
# both the `backchannel\_user\_code\_parameter\_supported` metadata of the server and the
|
|
190
|
+
# `backchannel\_user\_code\_parameter` metadata of the client are true and the backchannel authentication
|
|
191
|
+
# request does not include the user\_code request parameter. In this case, `/backchannel/authentication`
|
|
192
|
+
# API returns action=BAD\_REQUEST with JSON containing `"error":"missing\_user\_code"`. Therefore,
|
|
193
|
+
# the authorization server implementation will never have to use the error code `missing\_user\_code`
|
|
194
|
+
# unless the server has intentionally implemented custom rules to require a user code based
|
|
195
|
+
# on users even in the case where the `backchannel\_user\_code\_parameter` metadata of the client
|
|
196
|
+
# which has made the backchannel authentication request is `false`.
|
|
197
|
+
# - `invalid\_user\_code`
|
|
198
|
+
# The authorization server implementation detected that the presented user code is invalid.
|
|
199
|
+
# Note that the format of user\_code is not described in the CIBA Core spec at all and so there
|
|
200
|
+
# is no consensus on how to judge whether a user code is valid or not. It is up to each authorization
|
|
201
|
+
# server implementation how to handle user codes.
|
|
202
|
+
# - `invalid\_binding\_message`
|
|
203
|
+
# The authorization server implementation detected that the presented binding message is invalid.
|
|
204
|
+
# Note that the format of binding\_message is not described in the CIBA Core spec at all and
|
|
205
|
+
# so there is no consensus on how to judge whether a binding message is valid or not. It is
|
|
206
|
+
# up to each authorization server implementation how to handle binding messages.
|
|
207
|
+
# - `invalid\_target`
|
|
208
|
+
# The authorization server implementation rejects the requested target resources.
|
|
209
|
+
# The error code invalid\_target is from "Resource Indicators for OAuth 2.0". The specification
|
|
210
|
+
# defines the resource request parameter. By using the parameter, client applications can request
|
|
211
|
+
# target resources that should be bound to the access token being issued. If the authorization
|
|
212
|
+
# server wants to reject the request, call `/backchannel/authentication/fail` API with `INVALID\_TARGET`.
|
|
213
|
+
# - `access\_denined`
|
|
214
|
+
# The authorization server implementation has custom rules to reject backchannel authentication
|
|
215
|
+
# requests without asking the end-user and respond to the client as if the end-user had rejected
|
|
216
|
+
# the request in some particular cases and found that the backchannel authentication request
|
|
217
|
+
# is one of the particular cases.
|
|
218
|
+
# The authorization server implementation will never have to use the error code `access\_denied`
|
|
219
|
+
# at this timing unless the server has intentionally implemented custom rules to reject backchannel
|
|
220
|
+
# authentication requests without asking the end-user and respond to the client as if the end-user
|
|
221
|
+
# had rejected the request.
|
|
222
|
+
# [3] AUTH\_REQ\_ID ISSUE
|
|
223
|
+
# If the authorization server implementation has successfully determined the subject of the end-user,
|
|
224
|
+
# the next action is to return an HTTP response to the client application which contains `auth\_req\_id`.
|
|
225
|
+
# Authlete provides `/backchannel/authentication/issue` API which generates a JSON containing `auth\_req\_id`,
|
|
226
|
+
# so, your next action is (1) call the API, (2) receive the response from the API, (3) build a response
|
|
227
|
+
# to the client application using the content of the API response, and (4) return the response to
|
|
228
|
+
# the client application. See the description of `/backchannel/authentication/issue` API for details.
|
|
229
|
+
# [4] END-USER AUTHENTICATION AND AUTHORIZATION
|
|
230
|
+
# After sending a JSON containing `auth\_req\_id` back to the client application, the service implementation
|
|
231
|
+
# starts to communicate with an authentication device of the end-user. It is assumed that end-user
|
|
232
|
+
# authentication is performed on the authentication device and the end-user confirms the content of
|
|
233
|
+
# the backchannel authentication request and grants authorization to the client application if everything
|
|
234
|
+
# is okay. The authorization server implementation must be able to receive the result of the end-user
|
|
235
|
+
# authentication and authorization from the authentication device.
|
|
236
|
+
# How to communicate with an authentication device and achieve end-user authentication and authorization
|
|
237
|
+
# is up to each authorization server implementation, but the following request parameters of the backchannel
|
|
238
|
+
# authentication request should be taken into consideration in any implementation.
|
|
239
|
+
# - `acr\_values`
|
|
240
|
+
# A backchannel authentication request may contain an array of ACRs (Authentication Context Class
|
|
241
|
+
# References) in preference order. If multiple authentication devices are registered for the end-user,
|
|
242
|
+
# the authorization server implementation should take the ACRs into consideration when selecting
|
|
243
|
+
# the best authentication device.
|
|
244
|
+
# - `scope`
|
|
245
|
+
# A backchannel authentication request always contains a list of scopes. At least, `openid` is
|
|
246
|
+
# included in the list (otherwise `/backchannel/authentication` API returns `action=BAD\_REQUEST`).
|
|
247
|
+
# It would be better to show the requested scopes to the end-user on the authentication device
|
|
248
|
+
# or somewhere appropriate.
|
|
249
|
+
# If the scope request parameter contains `address`, `email`, `phone` and/or `profile`, they are
|
|
250
|
+
# interpreted as defined in "5.4. Requesting Claims using Scope Values of OpenID Connect Core 1.0".
|
|
251
|
+
# That is, they are expanded into a list of claim names. The claimNames parameter returns the expanded
|
|
252
|
+
# result.
|
|
253
|
+
# - `binding\_message`
|
|
254
|
+
# A backchannel authentication request may contain a binding message. It is a human readable identifier
|
|
255
|
+
# or message intended to be displayed on both the consumption device (client application) and the
|
|
256
|
+
# authentication device.
|
|
257
|
+
# - `user\_code`
|
|
258
|
+
# A backchannel authentication request may contain a user code. It is a secret code, such as password
|
|
259
|
+
# or pin, known only to the end-user but verifiable by the authorization server. The user code should
|
|
260
|
+
# be used to authorize sending a request to the authentication device.
|
|
261
|
+
# [5] END-USER AUTHENTICATION AND AUTHORIZATION COMPLETION
|
|
262
|
+
# After receiving the result of end-user authentication and authorization, the authorization server
|
|
263
|
+
# implementation must call Authlete's `/backchannel/authentication/complete` API to tell Authlete
|
|
264
|
+
# the result and pass necessary data so that Authlete can generate an ID token, an access token and
|
|
265
|
+
# optionally a refresh token. See the description of the API for details.
|
|
266
|
+
# [6] CLIENT NOTIFICATION
|
|
267
|
+
# When the backchannel token delivery mode is either `ping` or `push`, the authorization server implementation
|
|
268
|
+
# must send a notification to the pre-registered notification endpoint of the client after the end-user
|
|
269
|
+
# authentication and authorization. In this case, the `action` parameter in a response from `/backchannel/authentication/complete`
|
|
270
|
+
# API is `NOTIFICATION`. See the description of `/backchannel/authentication/complete` API for details.
|
|
271
|
+
# [7] TOKEN REQUEST
|
|
272
|
+
# When the backchannel token delivery mode is either `ping` or `poll`, the client application will make
|
|
273
|
+
# a token request to the token endpoint to get an ID token, an access token and optionally a refresh
|
|
274
|
+
# token.
|
|
275
|
+
# A token request that corresponds to a backchannel authentication request uses `urn:openid:params:grant-type:ciba`
|
|
276
|
+
# as the value of the `grant\_type` request parameter. Authlete's `/auth/token` API recognizes the
|
|
277
|
+
# grant type automatically and behaves properly, so the existing token endpoint implementation does
|
|
278
|
+
# not have to be changed to support CIBA.
|
|
279
|
+
#
|
|
280
|
+
request = Models::Operations::BackchannelAuthenticationApiRequest.new(
|
|
281
|
+
service_id: service_id,
|
|
282
|
+
backchannel_authentication_request: backchannel_authentication_request
|
|
283
|
+
)
|
|
284
|
+
url, params = @sdk_configuration.get_server_details
|
|
285
|
+
base_url = Utils.template_url(url, params)
|
|
286
|
+
url = Utils.generate_url(
|
|
287
|
+
Models::Operations::BackchannelAuthenticationApiRequest,
|
|
288
|
+
base_url,
|
|
289
|
+
'/api/{serviceId}/backchannel/authentication',
|
|
290
|
+
request
|
|
291
|
+
)
|
|
292
|
+
headers = {}
|
|
293
|
+
headers = T.cast(headers, T::Hash[String, String])
|
|
294
|
+
req_content_type, data, form = Utils.serialize_request_body(request, false, false, :backchannel_authentication_request, :json)
|
|
295
|
+
headers['content-type'] = req_content_type
|
|
296
|
+
raise StandardError, 'request body is required' if data.nil? && form.nil?
|
|
297
|
+
|
|
298
|
+
if form
|
|
299
|
+
body = Utils.encode_form(form)
|
|
300
|
+
elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
|
|
301
|
+
body = URI.encode_www_form(T.cast(data, T::Hash[Symbol, Object]))
|
|
302
|
+
else
|
|
303
|
+
body = data
|
|
304
|
+
end
|
|
305
|
+
headers['Accept'] = 'application/json'
|
|
306
|
+
headers['user-agent'] = @sdk_configuration.user_agent
|
|
307
|
+
|
|
308
|
+
security = @sdk_configuration.security_source&.call
|
|
309
|
+
|
|
310
|
+
timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
|
|
311
|
+
timeout ||= @sdk_configuration.timeout
|
|
312
|
+
|
|
313
|
+
|
|
314
|
+
connection = @sdk_configuration.client
|
|
315
|
+
|
|
316
|
+
hook_ctx = SDKHooks::HookContext.new(
|
|
317
|
+
config: @sdk_configuration,
|
|
318
|
+
base_url: base_url,
|
|
319
|
+
oauth2_scopes: [],
|
|
320
|
+
operation_id: 'backchannel_authentication_api',
|
|
321
|
+
security_source: @sdk_configuration.security_source
|
|
322
|
+
)
|
|
323
|
+
|
|
324
|
+
error = T.let(nil, T.nilable(StandardError))
|
|
325
|
+
http_response = T.let(nil, T.nilable(Faraday::Response))
|
|
326
|
+
|
|
327
|
+
|
|
328
|
+
begin
|
|
329
|
+
http_response = T.must(connection).post(url) do |req|
|
|
330
|
+
req.body = body
|
|
331
|
+
req.headers.merge!(headers)
|
|
332
|
+
req.options.timeout = timeout unless timeout.nil?
|
|
333
|
+
Utils.configure_request_security(req, security)
|
|
334
|
+
|
|
335
|
+
@sdk_configuration.hooks.before_request(
|
|
336
|
+
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
|
337
|
+
hook_ctx: hook_ctx
|
|
338
|
+
),
|
|
339
|
+
request: req
|
|
340
|
+
)
|
|
341
|
+
end
|
|
342
|
+
rescue StandardError => e
|
|
343
|
+
error = e
|
|
344
|
+
ensure
|
|
345
|
+
if http_response.nil? || Utils.error_status?(http_response.status)
|
|
346
|
+
http_response = @sdk_configuration.hooks.after_error(
|
|
347
|
+
error: error,
|
|
348
|
+
hook_ctx: SDKHooks::AfterErrorHookContext.new(
|
|
349
|
+
hook_ctx: hook_ctx
|
|
350
|
+
),
|
|
351
|
+
response: http_response
|
|
352
|
+
)
|
|
353
|
+
else
|
|
354
|
+
http_response = @sdk_configuration.hooks.after_success(
|
|
355
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
|
356
|
+
hook_ctx: hook_ctx
|
|
357
|
+
),
|
|
358
|
+
response: http_response
|
|
359
|
+
)
|
|
360
|
+
end
|
|
361
|
+
|
|
362
|
+
if http_response.nil?
|
|
363
|
+
raise error if !error.nil?
|
|
364
|
+
raise 'no response'
|
|
365
|
+
end
|
|
366
|
+
end
|
|
367
|
+
|
|
368
|
+
content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream')
|
|
369
|
+
if Utils.match_status_code(http_response.status, ['200'])
|
|
370
|
+
if Utils.match_content_type(content_type, 'application/json')
|
|
371
|
+
http_response = @sdk_configuration.hooks.after_success(
|
|
372
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
|
373
|
+
hook_ctx: hook_ctx
|
|
374
|
+
),
|
|
375
|
+
response: http_response
|
|
376
|
+
)
|
|
377
|
+
response_data = http_response.env.response_body
|
|
378
|
+
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Components::BackchannelAuthenticationResponse)
|
|
379
|
+
response = Models::Operations::BackchannelAuthenticationApiResponse.new(
|
|
380
|
+
status_code: http_response.status,
|
|
381
|
+
content_type: content_type,
|
|
382
|
+
raw_response: http_response,
|
|
383
|
+
backchannel_authentication_response: T.unsafe(obj)
|
|
384
|
+
)
|
|
385
|
+
|
|
386
|
+
return response
|
|
387
|
+
else
|
|
388
|
+
raise ::Authlete::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
|
389
|
+
end
|
|
390
|
+
elsif Utils.match_status_code(http_response.status, ['400', '401', '403'])
|
|
391
|
+
if Utils.match_content_type(content_type, 'application/json')
|
|
392
|
+
http_response = @sdk_configuration.hooks.after_success(
|
|
393
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
|
394
|
+
hook_ctx: hook_ctx
|
|
395
|
+
),
|
|
396
|
+
response: http_response
|
|
397
|
+
)
|
|
398
|
+
response_data = http_response.env.response_body
|
|
399
|
+
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::ResultError)
|
|
400
|
+
obj.raw_response = http_response
|
|
401
|
+
throw obj
|
|
402
|
+
else
|
|
403
|
+
raise ::Authlete::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
|
404
|
+
end
|
|
405
|
+
elsif Utils.match_status_code(http_response.status, ['500'])
|
|
406
|
+
if Utils.match_content_type(content_type, 'application/json')
|
|
407
|
+
http_response = @sdk_configuration.hooks.after_success(
|
|
408
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
|
409
|
+
hook_ctx: hook_ctx
|
|
410
|
+
),
|
|
411
|
+
response: http_response
|
|
412
|
+
)
|
|
413
|
+
response_data = http_response.env.response_body
|
|
414
|
+
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::ResultError)
|
|
415
|
+
obj.raw_response = http_response
|
|
416
|
+
throw obj
|
|
417
|
+
else
|
|
418
|
+
raise ::Authlete::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
|
419
|
+
end
|
|
420
|
+
elsif Utils.match_status_code(http_response.status, ['4XX'])
|
|
421
|
+
raise ::Authlete::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
|
|
422
|
+
elsif Utils.match_status_code(http_response.status, ['5XX'])
|
|
423
|
+
raise ::Authlete::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
|
|
424
|
+
else
|
|
425
|
+
raise ::Authlete::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received'
|
|
426
|
+
|
|
427
|
+
end
|
|
428
|
+
end
|
|
429
|
+
|
|
430
|
+
|
|
431
|
+
sig { params(backchannel_authentication_issue_request: Models::Components::BackchannelAuthenticationIssueRequest, service_id: ::String, timeout_ms: T.nilable(Integer)).returns(Models::Operations::BackchannelAuthenticationIssueApiResponse) }
|
|
432
|
+
def issue_response(backchannel_authentication_issue_request:, service_id:, timeout_ms: nil)
|
|
433
|
+
# issue_response - Issue Backchannel Authentication Response
|
|
434
|
+
# This API prepares JSON that contains an `auth\_req\_id`. The JSON should be used as the response body
|
|
435
|
+
# of the response which is returned to the client from the [backchannel authentication endpoint](https://openid.net/specs/openid-client-initiated-backchannel-authentication-core-1\_0.html#auth\_backchannel\_endpoint)
|
|
436
|
+
# ### Description
|
|
437
|
+
# This API is supposed to be called from within the implementation of the backchannel authentication
|
|
438
|
+
# endpoint of the service in order to generate a successful response to the client application.
|
|
439
|
+
# The description of the `/backchannel/authentication` API describes the timing when this API should
|
|
440
|
+
# be called and the meaning of request parameters. See [AUTH\_REQ\_ID ISSUE] in `USER\_IDENTIFICATION`.
|
|
441
|
+
# The response from `/backchannel/authentication/issue` API has some parameters. Among them, it is
|
|
442
|
+
# `action` parameter that the authorization server implementation should check first because it denotes
|
|
443
|
+
# the next `action` that the authorization server implementation should take. According to the value
|
|
444
|
+
# of `action`, the authorization server implementation must take the steps described below.
|
|
445
|
+
# ```java
|
|
446
|
+
# @POST
|
|
447
|
+
# @Consumes(MediaType.APPLICATION\_FORM\_URLENCODED)
|
|
448
|
+
# public Response post(String parameters)
|
|
449
|
+
# {
|
|
450
|
+
# // 'parameters' is the entity body of the backchannel authentication request.
|
|
451
|
+
# ......
|
|
452
|
+
# }
|
|
453
|
+
# ```
|
|
454
|
+
# The endpoint implementation does not have to parse the request parameters from the client application
|
|
455
|
+
# because Authlete's `/backchannel/authentication` API does it.
|
|
456
|
+
# The response from `/backchannel/authentication` API has various parameters. Among them, it is `action`
|
|
457
|
+
# parameter that the authorization server implementation should check first because it denotes the
|
|
458
|
+
# next action that the authorization server implementation should take. According to the value of
|
|
459
|
+
# `action`, the service implementation must take the steps described below.
|
|
460
|
+
# **INTERNAL\_SERVER\_ERROR**
|
|
461
|
+
# When the value of `action` is `INTERNAL\_SERVER\_ERROR`, it means that the request from the authorization
|
|
462
|
+
# server implementation was wrong or that an error occurred in Authlete.
|
|
463
|
+
# In either case, from the viewpoint of the client application, it is an error on the server side.
|
|
464
|
+
# Therefore, the service implementation should generate a response to the client application with
|
|
465
|
+
# HTTP status of "500 Internal Server Error" and `application/json`.
|
|
466
|
+
# The value of `responseContent` is a JSON string which describes the error, so it can be used as
|
|
467
|
+
# the entity body of the response.
|
|
468
|
+
# The following illustrates the response which the service implementation should generate and return
|
|
469
|
+
# to the client application.
|
|
470
|
+
# ```
|
|
471
|
+
# HTTP/1.1 500 Internal Server Error
|
|
472
|
+
# Content-Type: application/json
|
|
473
|
+
# Cache-Control: no-store
|
|
474
|
+
# Pragma: no-cache
|
|
475
|
+
# {responseContent}
|
|
476
|
+
# ```
|
|
477
|
+
# **INVALID\_TICKET**
|
|
478
|
+
# When the value of `action` is `INVALID\_TICKET`, it means that the ticket included in the API call
|
|
479
|
+
# was invalid. For example, it does not exist or has expired.
|
|
480
|
+
# From a viewpoint of the client application, this is an error on the server side. Therefore, the
|
|
481
|
+
# authorization server implementation should generate a response to the client application with
|
|
482
|
+
# "500 Internal Server Error" and `application/json`.
|
|
483
|
+
# You can build an error response in the same way as shown in the description for the case of `INTERNAL\_SERVER\_ERROR`.
|
|
484
|
+
# **OK**
|
|
485
|
+
# When the value of `action` is `OK`, it means that Authlete has succeeded in preparing JSON that
|
|
486
|
+
# contains an `auth\_req\_id`. The JSON should be used as the response body of the response that is
|
|
487
|
+
# returned to the client from the backchannel authentication endpoint. `responseContent` contains
|
|
488
|
+
# the JSON.
|
|
489
|
+
# The following illustrates the response which the authorization server implementation should generate
|
|
490
|
+
# and return to the client application.
|
|
491
|
+
# ```
|
|
492
|
+
# HTTP/1.1 200 OK
|
|
493
|
+
# Content-Type: text/html;charset=UTF-8
|
|
494
|
+
# Cache-Control: no-store
|
|
495
|
+
# Pragma: no-cache
|
|
496
|
+
# {responseContent}
|
|
497
|
+
# ```
|
|
498
|
+
#
|
|
499
|
+
request = Models::Operations::BackchannelAuthenticationIssueApiRequest.new(
|
|
500
|
+
service_id: service_id,
|
|
501
|
+
backchannel_authentication_issue_request: backchannel_authentication_issue_request
|
|
502
|
+
)
|
|
503
|
+
url, params = @sdk_configuration.get_server_details
|
|
504
|
+
base_url = Utils.template_url(url, params)
|
|
505
|
+
url = Utils.generate_url(
|
|
506
|
+
Models::Operations::BackchannelAuthenticationIssueApiRequest,
|
|
507
|
+
base_url,
|
|
508
|
+
'/api/{serviceId}/backchannel/authentication/issue',
|
|
509
|
+
request
|
|
510
|
+
)
|
|
511
|
+
headers = {}
|
|
512
|
+
headers = T.cast(headers, T::Hash[String, String])
|
|
513
|
+
req_content_type, data, form = Utils.serialize_request_body(request, false, false, :backchannel_authentication_issue_request, :json)
|
|
514
|
+
headers['content-type'] = req_content_type
|
|
515
|
+
raise StandardError, 'request body is required' if data.nil? && form.nil?
|
|
516
|
+
|
|
517
|
+
if form
|
|
518
|
+
body = Utils.encode_form(form)
|
|
519
|
+
elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
|
|
520
|
+
body = URI.encode_www_form(T.cast(data, T::Hash[Symbol, Object]))
|
|
521
|
+
else
|
|
522
|
+
body = data
|
|
523
|
+
end
|
|
524
|
+
headers['Accept'] = 'application/json'
|
|
525
|
+
headers['user-agent'] = @sdk_configuration.user_agent
|
|
526
|
+
|
|
527
|
+
security = @sdk_configuration.security_source&.call
|
|
528
|
+
|
|
529
|
+
timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
|
|
530
|
+
timeout ||= @sdk_configuration.timeout
|
|
531
|
+
|
|
532
|
+
|
|
533
|
+
connection = @sdk_configuration.client
|
|
534
|
+
|
|
535
|
+
hook_ctx = SDKHooks::HookContext.new(
|
|
536
|
+
config: @sdk_configuration,
|
|
537
|
+
base_url: base_url,
|
|
538
|
+
oauth2_scopes: [],
|
|
539
|
+
operation_id: 'backchannel_authentication_issue_api',
|
|
540
|
+
security_source: @sdk_configuration.security_source
|
|
541
|
+
)
|
|
542
|
+
|
|
543
|
+
error = T.let(nil, T.nilable(StandardError))
|
|
544
|
+
http_response = T.let(nil, T.nilable(Faraday::Response))
|
|
545
|
+
|
|
546
|
+
|
|
547
|
+
begin
|
|
548
|
+
http_response = T.must(connection).post(url) do |req|
|
|
549
|
+
req.body = body
|
|
550
|
+
req.headers.merge!(headers)
|
|
551
|
+
req.options.timeout = timeout unless timeout.nil?
|
|
552
|
+
Utils.configure_request_security(req, security)
|
|
553
|
+
|
|
554
|
+
@sdk_configuration.hooks.before_request(
|
|
555
|
+
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
|
556
|
+
hook_ctx: hook_ctx
|
|
557
|
+
),
|
|
558
|
+
request: req
|
|
559
|
+
)
|
|
560
|
+
end
|
|
561
|
+
rescue StandardError => e
|
|
562
|
+
error = e
|
|
563
|
+
ensure
|
|
564
|
+
if http_response.nil? || Utils.error_status?(http_response.status)
|
|
565
|
+
http_response = @sdk_configuration.hooks.after_error(
|
|
566
|
+
error: error,
|
|
567
|
+
hook_ctx: SDKHooks::AfterErrorHookContext.new(
|
|
568
|
+
hook_ctx: hook_ctx
|
|
569
|
+
),
|
|
570
|
+
response: http_response
|
|
571
|
+
)
|
|
572
|
+
else
|
|
573
|
+
http_response = @sdk_configuration.hooks.after_success(
|
|
574
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
|
575
|
+
hook_ctx: hook_ctx
|
|
576
|
+
),
|
|
577
|
+
response: http_response
|
|
578
|
+
)
|
|
579
|
+
end
|
|
580
|
+
|
|
581
|
+
if http_response.nil?
|
|
582
|
+
raise error if !error.nil?
|
|
583
|
+
raise 'no response'
|
|
584
|
+
end
|
|
585
|
+
end
|
|
586
|
+
|
|
587
|
+
content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream')
|
|
588
|
+
if Utils.match_status_code(http_response.status, ['200'])
|
|
589
|
+
if Utils.match_content_type(content_type, 'application/json')
|
|
590
|
+
http_response = @sdk_configuration.hooks.after_success(
|
|
591
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
|
592
|
+
hook_ctx: hook_ctx
|
|
593
|
+
),
|
|
594
|
+
response: http_response
|
|
595
|
+
)
|
|
596
|
+
response_data = http_response.env.response_body
|
|
597
|
+
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Components::BackchannelAuthenticationIssueResponse)
|
|
598
|
+
response = Models::Operations::BackchannelAuthenticationIssueApiResponse.new(
|
|
599
|
+
status_code: http_response.status,
|
|
600
|
+
content_type: content_type,
|
|
601
|
+
raw_response: http_response,
|
|
602
|
+
backchannel_authentication_issue_response: T.unsafe(obj)
|
|
603
|
+
)
|
|
604
|
+
|
|
605
|
+
return response
|
|
606
|
+
else
|
|
607
|
+
raise ::Authlete::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
|
608
|
+
end
|
|
609
|
+
elsif Utils.match_status_code(http_response.status, ['400', '401', '403'])
|
|
610
|
+
if Utils.match_content_type(content_type, 'application/json')
|
|
611
|
+
http_response = @sdk_configuration.hooks.after_success(
|
|
612
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
|
613
|
+
hook_ctx: hook_ctx
|
|
614
|
+
),
|
|
615
|
+
response: http_response
|
|
616
|
+
)
|
|
617
|
+
response_data = http_response.env.response_body
|
|
618
|
+
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::ResultError)
|
|
619
|
+
obj.raw_response = http_response
|
|
620
|
+
throw obj
|
|
621
|
+
else
|
|
622
|
+
raise ::Authlete::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
|
623
|
+
end
|
|
624
|
+
elsif Utils.match_status_code(http_response.status, ['500'])
|
|
625
|
+
if Utils.match_content_type(content_type, 'application/json')
|
|
626
|
+
http_response = @sdk_configuration.hooks.after_success(
|
|
627
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
|
628
|
+
hook_ctx: hook_ctx
|
|
629
|
+
),
|
|
630
|
+
response: http_response
|
|
631
|
+
)
|
|
632
|
+
response_data = http_response.env.response_body
|
|
633
|
+
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::ResultError)
|
|
634
|
+
obj.raw_response = http_response
|
|
635
|
+
throw obj
|
|
636
|
+
else
|
|
637
|
+
raise ::Authlete::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
|
638
|
+
end
|
|
639
|
+
elsif Utils.match_status_code(http_response.status, ['4XX'])
|
|
640
|
+
raise ::Authlete::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
|
|
641
|
+
elsif Utils.match_status_code(http_response.status, ['5XX'])
|
|
642
|
+
raise ::Authlete::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
|
|
643
|
+
else
|
|
644
|
+
raise ::Authlete::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received'
|
|
645
|
+
|
|
646
|
+
end
|
|
647
|
+
end
|
|
648
|
+
|
|
649
|
+
|
|
650
|
+
sig { params(backchannel_authentication_fail_request: Models::Components::BackchannelAuthenticationFailRequest, service_id: ::String, timeout_ms: T.nilable(Integer)).returns(Models::Operations::BackchannelAuthenticationFailApiResponse) }
|
|
651
|
+
def fail_request(backchannel_authentication_fail_request:, service_id:, timeout_ms: nil)
|
|
652
|
+
# fail_request - Fail Backchannel Authentication Request
|
|
653
|
+
# The API prepares JSON that contains an error. The JSON should be used as the response body of the
|
|
654
|
+
# response which is returned to the client from the [backchannel authentication endpoint](https://openid.net/specs/openid-client-initiated-backchannel-authentication-core-1\_0.html#auth\_backchannel\_endpoint).
|
|
655
|
+
# ### Description
|
|
656
|
+
# This API is supposed to be called from within the implementation of the [backchannel authentication
|
|
657
|
+
# endpoint](https://openid.net/specs/openid-client-initiated-backchannel-authentication-core-1\_0.html#auth\_backchannel\_endpoint)
|
|
658
|
+
# of the service in order to generate an error response to the client application.
|
|
659
|
+
# The response from `/backchannel/authentication/fails` API has some parameters. Among them, it is
|
|
660
|
+
# `action` parameter that the authorization server implementation should check first because it denotes
|
|
661
|
+
# the next action that the authorization server implementation should take. According to the value
|
|
662
|
+
# of `action`, the authorization server implementation must take the steps described below.
|
|
663
|
+
# **INTERNAL\_SERVER\_ERROR**
|
|
664
|
+
# When the value of `action` is `INTERNAL\_SERVER\_ERROR`, it means that (1) the `reason` request parameter
|
|
665
|
+
# of the API call was `SERVER\_ERROR`, (2) an error occurred on Authlete side, or (3) the request parameters
|
|
666
|
+
# of the API call were wrong. In this case, the authorization server implementation should return
|
|
667
|
+
# a "500 Internal Server Error" response to the client application. However, in most cases, commercial
|
|
668
|
+
# implementations prefer to use other HTTP status code than 5xx.
|
|
669
|
+
# **BAD\_REQUEST**
|
|
670
|
+
# When the value of `action` is `BAD\_REQUEST`, the authorization server implementation should return a
|
|
671
|
+
# "400 Bad Request" response to the client application.
|
|
672
|
+
# **FORBIDDEN**
|
|
673
|
+
# When the value of `action` is `FORBIDDEN`, it means that the `reason` request parameter of the API call
|
|
674
|
+
# was `ACCESS\_DENIED`. In this case, the backchannel authentication endpoint of the authorization
|
|
675
|
+
# server implementation should return a "403 Forbidden" response to the client application.
|
|
676
|
+
#
|
|
677
|
+
request = Models::Operations::BackchannelAuthenticationFailApiRequest.new(
|
|
678
|
+
service_id: service_id,
|
|
679
|
+
backchannel_authentication_fail_request: backchannel_authentication_fail_request
|
|
680
|
+
)
|
|
681
|
+
url, params = @sdk_configuration.get_server_details
|
|
682
|
+
base_url = Utils.template_url(url, params)
|
|
683
|
+
url = Utils.generate_url(
|
|
684
|
+
Models::Operations::BackchannelAuthenticationFailApiRequest,
|
|
685
|
+
base_url,
|
|
686
|
+
'/api/{serviceId}/backchannel/authentication/fail',
|
|
687
|
+
request
|
|
688
|
+
)
|
|
689
|
+
headers = {}
|
|
690
|
+
headers = T.cast(headers, T::Hash[String, String])
|
|
691
|
+
req_content_type, data, form = Utils.serialize_request_body(request, false, false, :backchannel_authentication_fail_request, :json)
|
|
692
|
+
headers['content-type'] = req_content_type
|
|
693
|
+
raise StandardError, 'request body is required' if data.nil? && form.nil?
|
|
694
|
+
|
|
695
|
+
if form
|
|
696
|
+
body = Utils.encode_form(form)
|
|
697
|
+
elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
|
|
698
|
+
body = URI.encode_www_form(T.cast(data, T::Hash[Symbol, Object]))
|
|
699
|
+
else
|
|
700
|
+
body = data
|
|
701
|
+
end
|
|
702
|
+
headers['Accept'] = 'application/json'
|
|
703
|
+
headers['user-agent'] = @sdk_configuration.user_agent
|
|
704
|
+
|
|
705
|
+
security = @sdk_configuration.security_source&.call
|
|
706
|
+
|
|
707
|
+
timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
|
|
708
|
+
timeout ||= @sdk_configuration.timeout
|
|
709
|
+
|
|
710
|
+
|
|
711
|
+
connection = @sdk_configuration.client
|
|
712
|
+
|
|
713
|
+
hook_ctx = SDKHooks::HookContext.new(
|
|
714
|
+
config: @sdk_configuration,
|
|
715
|
+
base_url: base_url,
|
|
716
|
+
oauth2_scopes: [],
|
|
717
|
+
operation_id: 'backchannel_authentication_fail_api',
|
|
718
|
+
security_source: @sdk_configuration.security_source
|
|
719
|
+
)
|
|
720
|
+
|
|
721
|
+
error = T.let(nil, T.nilable(StandardError))
|
|
722
|
+
http_response = T.let(nil, T.nilable(Faraday::Response))
|
|
723
|
+
|
|
724
|
+
|
|
725
|
+
begin
|
|
726
|
+
http_response = T.must(connection).post(url) do |req|
|
|
727
|
+
req.body = body
|
|
728
|
+
req.headers.merge!(headers)
|
|
729
|
+
req.options.timeout = timeout unless timeout.nil?
|
|
730
|
+
Utils.configure_request_security(req, security)
|
|
731
|
+
|
|
732
|
+
@sdk_configuration.hooks.before_request(
|
|
733
|
+
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
|
734
|
+
hook_ctx: hook_ctx
|
|
735
|
+
),
|
|
736
|
+
request: req
|
|
737
|
+
)
|
|
738
|
+
end
|
|
739
|
+
rescue StandardError => e
|
|
740
|
+
error = e
|
|
741
|
+
ensure
|
|
742
|
+
if http_response.nil? || Utils.error_status?(http_response.status)
|
|
743
|
+
http_response = @sdk_configuration.hooks.after_error(
|
|
744
|
+
error: error,
|
|
745
|
+
hook_ctx: SDKHooks::AfterErrorHookContext.new(
|
|
746
|
+
hook_ctx: hook_ctx
|
|
747
|
+
),
|
|
748
|
+
response: http_response
|
|
749
|
+
)
|
|
750
|
+
else
|
|
751
|
+
http_response = @sdk_configuration.hooks.after_success(
|
|
752
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
|
753
|
+
hook_ctx: hook_ctx
|
|
754
|
+
),
|
|
755
|
+
response: http_response
|
|
756
|
+
)
|
|
757
|
+
end
|
|
758
|
+
|
|
759
|
+
if http_response.nil?
|
|
760
|
+
raise error if !error.nil?
|
|
761
|
+
raise 'no response'
|
|
762
|
+
end
|
|
763
|
+
end
|
|
764
|
+
|
|
765
|
+
content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream')
|
|
766
|
+
if Utils.match_status_code(http_response.status, ['200'])
|
|
767
|
+
if Utils.match_content_type(content_type, 'application/json')
|
|
768
|
+
http_response = @sdk_configuration.hooks.after_success(
|
|
769
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
|
770
|
+
hook_ctx: hook_ctx
|
|
771
|
+
),
|
|
772
|
+
response: http_response
|
|
773
|
+
)
|
|
774
|
+
response_data = http_response.env.response_body
|
|
775
|
+
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Components::BackchannelAuthenticationFailResponse)
|
|
776
|
+
response = Models::Operations::BackchannelAuthenticationFailApiResponse.new(
|
|
777
|
+
status_code: http_response.status,
|
|
778
|
+
content_type: content_type,
|
|
779
|
+
raw_response: http_response,
|
|
780
|
+
backchannel_authentication_fail_response: T.unsafe(obj)
|
|
781
|
+
)
|
|
782
|
+
|
|
783
|
+
return response
|
|
784
|
+
else
|
|
785
|
+
raise ::Authlete::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
|
786
|
+
end
|
|
787
|
+
elsif Utils.match_status_code(http_response.status, ['400', '401', '403'])
|
|
788
|
+
if Utils.match_content_type(content_type, 'application/json')
|
|
789
|
+
http_response = @sdk_configuration.hooks.after_success(
|
|
790
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
|
791
|
+
hook_ctx: hook_ctx
|
|
792
|
+
),
|
|
793
|
+
response: http_response
|
|
794
|
+
)
|
|
795
|
+
response_data = http_response.env.response_body
|
|
796
|
+
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::ResultError)
|
|
797
|
+
obj.raw_response = http_response
|
|
798
|
+
throw obj
|
|
799
|
+
else
|
|
800
|
+
raise ::Authlete::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
|
801
|
+
end
|
|
802
|
+
elsif Utils.match_status_code(http_response.status, ['500'])
|
|
803
|
+
if Utils.match_content_type(content_type, 'application/json')
|
|
804
|
+
http_response = @sdk_configuration.hooks.after_success(
|
|
805
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
|
806
|
+
hook_ctx: hook_ctx
|
|
807
|
+
),
|
|
808
|
+
response: http_response
|
|
809
|
+
)
|
|
810
|
+
response_data = http_response.env.response_body
|
|
811
|
+
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::ResultError)
|
|
812
|
+
obj.raw_response = http_response
|
|
813
|
+
throw obj
|
|
814
|
+
else
|
|
815
|
+
raise ::Authlete::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
|
816
|
+
end
|
|
817
|
+
elsif Utils.match_status_code(http_response.status, ['4XX'])
|
|
818
|
+
raise ::Authlete::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
|
|
819
|
+
elsif Utils.match_status_code(http_response.status, ['5XX'])
|
|
820
|
+
raise ::Authlete::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
|
|
821
|
+
else
|
|
822
|
+
raise ::Authlete::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received'
|
|
823
|
+
|
|
824
|
+
end
|
|
825
|
+
end
|
|
826
|
+
|
|
827
|
+
|
|
828
|
+
sig { params(backchannel_authentication_complete_request: Models::Components::BackchannelAuthenticationCompleteRequest, service_id: ::String, timeout_ms: T.nilable(Integer)).returns(Models::Operations::BackchannelAuthenticationCompleteApiResponse) }
|
|
829
|
+
def complete_request(backchannel_authentication_complete_request:, service_id:, timeout_ms: nil)
|
|
830
|
+
# complete_request - Complete Backchannel Authentication
|
|
831
|
+
# This API returns information about what action the authorization server should take after it receives
|
|
832
|
+
# the result of end-user's decision about whether the end-user has approved or rejected a client application's
|
|
833
|
+
# request on the authentication device.
|
|
834
|
+
# ### Description
|
|
835
|
+
# After the implementation of the backchannel authentication endpoint returns JSON containing an
|
|
836
|
+
# `auth\_req\_id` to the client, the authorization server starts a background process that communicates
|
|
837
|
+
# with the authentication device of the end-user. On the authentication device, end-user authentication
|
|
838
|
+
# is performed and the end-user is asked whether they give authorization to the client or not. The
|
|
839
|
+
# authorization server will receive the result of end-user authentication and authorization from
|
|
840
|
+
# the authentication device.
|
|
841
|
+
# After the authorization server receives the result from the authentication device, or even in the
|
|
842
|
+
# case where the server gave up receiving a response from the authentication device for some reasons,
|
|
843
|
+
# the server should call the `/backchannel/authentication/complete` API to tell Authlete the result.
|
|
844
|
+
# When the end-user was authenticated and authorization was granted to the client by the end-user,
|
|
845
|
+
# the authorization server should call the API with `result=AUTHORIZED`. In this successful case,
|
|
846
|
+
# the `subject` request parameter is mandatory. If the token delivery mode is `push`, the API will generate
|
|
847
|
+
# an access token, an ID token and optionally a refresh token. On the other hand, if the token delivery
|
|
848
|
+
# mode is `poll` or `ping`, the API will just update the database record so that `/auth/token` API
|
|
849
|
+
# can generate tokens later.
|
|
850
|
+
# When the authorization server received the decision of the end-user from the authentication device
|
|
851
|
+
# and it indicates that the end-user has rejected to give authorization to the client, the authorization
|
|
852
|
+
# server should call the API with `result=ACCESS\_DENIED`. In this case, if the token delivery mode
|
|
853
|
+
# is `push`, the API will generate an error response that contains the error response parameter and
|
|
854
|
+
# optionally the `error\_description` and error\_uri response parameters (if the `errorDescription`
|
|
855
|
+
# and `errorUri` request parameters have been given). On the other hand, if the token delivery mode
|
|
856
|
+
# is `poll` or `ping`, the API will just update the database record so that `/auth/token` API can
|
|
857
|
+
# generate an error response later. In any token delivery mode, the value of the error parameter will
|
|
858
|
+
# become `access\_denied`.
|
|
859
|
+
# When the authorization server could not get the result of end-user authentication and authorization
|
|
860
|
+
# from the authentication device for some reasons, the authorization server should call the API with
|
|
861
|
+
# `result=TRANSACTION\_FAILED`. In this error case, the API will behave in the same way as in the case
|
|
862
|
+
# of `ACCESS\_DENIED`. The only difference is that `expired\_token` is used as the value of the `error`
|
|
863
|
+
# parameter.
|
|
864
|
+
# The response from `/backchannel/authentication/complete` API has various parameters. Among them,
|
|
865
|
+
# it is `action` parameter that the authorization server implementation should check first because
|
|
866
|
+
# it denotes the next action that the authorization server implementation should take. According to
|
|
867
|
+
# the value of `action`, the service implementation must take the steps described below.
|
|
868
|
+
# **SERVER\_ERROR**
|
|
869
|
+
# When the value of `action` is `SERVER\_ERROR`, it means either (1) that the request from the authorization
|
|
870
|
+
# server to Authlete was wrong, or (2) that an error occurred on Authlete side.
|
|
871
|
+
# When the backchannel token delivery mode is `ping` or `push`, `SERVER\_ERROR` is used only when
|
|
872
|
+
# an error is detected before the record of the ticket (which is included in the API call to `/backchannel/authentication/complete`)
|
|
873
|
+
# is retrieved from the database successfully. If an error is detected after the record of the ticket
|
|
874
|
+
# is retrieved from the database, `NOTIFICATION` is used instead of `SERVER\_ERROR`.
|
|
875
|
+
# When the backchannel token delivery mode is `poll`, `SERVER\_ERROR` is used regardless of whether
|
|
876
|
+
# it is before or after the record of the ticket is retrieved from the database.
|
|
877
|
+
# **NO\_ACTION**
|
|
878
|
+
# When the value of `action` is `NO\_ACTION`, it means that the authorization server does not have
|
|
879
|
+
# to take any immediate action.
|
|
880
|
+
# `NO\_ACTION` is returned when the backchannel token delivery mode is `poll`. In this case, the client
|
|
881
|
+
# will receive the final result at the token endpoint.
|
|
882
|
+
# **NOTIFICATION**
|
|
883
|
+
# When the value of `action` is `NOTIFICATION`, it means that the authorization server must send a
|
|
884
|
+
# notification to the client notification endpoint.
|
|
885
|
+
# According to the CIBA Core specification, the notification is an HTTP POST request whose request
|
|
886
|
+
# body is JSON and whose `Authorization` header contains the client notification token, which was
|
|
887
|
+
# included in the backchannel authentication request as the value of the `client\_notification\_token`
|
|
888
|
+
# request parameter, as a bearer token.
|
|
889
|
+
# When the backchannel token delivery mode is `ping`, the request body of the notification is JSON
|
|
890
|
+
# which contains the `auth\_req\_id` property only. When the backchannel token delivery mode is `push`,
|
|
891
|
+
# the request body will additionally contain an access token, an ID token and other properties. Note
|
|
892
|
+
# that when the backchannel token delivery mode is `poll`, a notification does not have to be sent
|
|
893
|
+
# to the client notification endpoint.
|
|
894
|
+
# In error cases, in the ping mode, however, the content of a notification is not different from the
|
|
895
|
+
# content in successful cases. That is, the notification contains the `auth\_req\_id` property only.
|
|
896
|
+
# The client will know the error when it accesses the token endpoint. On the other hand, in the
|
|
897
|
+
# `push` mode, in error cases, the content of a notification will include the `error` property instead
|
|
898
|
+
# of an access token and an ID token. The client will know the error by detecting that error is included
|
|
899
|
+
# in the notification.
|
|
900
|
+
# In any case, the value of `responseContent` is JSON which can be used as the request body of the
|
|
901
|
+
# notification.
|
|
902
|
+
# The client notification endpoint that the notification should be sent to the value of the `clientNotificationEndpoint`
|
|
903
|
+
# parameter. Likewise, the client notification token that the notification should include as a bearer
|
|
904
|
+
# token is the `clientNotificationToken` parameter. With these methods, the notification can be built
|
|
905
|
+
# like the following.
|
|
906
|
+
# ```
|
|
907
|
+
# POST {clientNotificationEndpoint} HTTP/1.1
|
|
908
|
+
# HOST: {The host of clientNotificationEndpoint}
|
|
909
|
+
# Authorization: Bearer {notificationToken}
|
|
910
|
+
# Content-Type: application/json
|
|
911
|
+
# {responseContent}
|
|
912
|
+
# ```
|
|
913
|
+
#
|
|
914
|
+
request = Models::Operations::BackchannelAuthenticationCompleteApiRequest.new(
|
|
915
|
+
service_id: service_id,
|
|
916
|
+
backchannel_authentication_complete_request: backchannel_authentication_complete_request
|
|
917
|
+
)
|
|
918
|
+
url, params = @sdk_configuration.get_server_details
|
|
919
|
+
base_url = Utils.template_url(url, params)
|
|
920
|
+
url = Utils.generate_url(
|
|
921
|
+
Models::Operations::BackchannelAuthenticationCompleteApiRequest,
|
|
922
|
+
base_url,
|
|
923
|
+
'/api/{serviceId}/backchannel/authentication/complete',
|
|
924
|
+
request
|
|
925
|
+
)
|
|
926
|
+
headers = {}
|
|
927
|
+
headers = T.cast(headers, T::Hash[String, String])
|
|
928
|
+
req_content_type, data, form = Utils.serialize_request_body(request, false, false, :backchannel_authentication_complete_request, :json)
|
|
929
|
+
headers['content-type'] = req_content_type
|
|
930
|
+
raise StandardError, 'request body is required' if data.nil? && form.nil?
|
|
931
|
+
|
|
932
|
+
if form
|
|
933
|
+
body = Utils.encode_form(form)
|
|
934
|
+
elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
|
|
935
|
+
body = URI.encode_www_form(T.cast(data, T::Hash[Symbol, Object]))
|
|
936
|
+
else
|
|
937
|
+
body = data
|
|
938
|
+
end
|
|
939
|
+
headers['Accept'] = 'application/json'
|
|
940
|
+
headers['user-agent'] = @sdk_configuration.user_agent
|
|
941
|
+
|
|
942
|
+
security = @sdk_configuration.security_source&.call
|
|
943
|
+
|
|
944
|
+
timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
|
|
945
|
+
timeout ||= @sdk_configuration.timeout
|
|
946
|
+
|
|
947
|
+
|
|
948
|
+
connection = @sdk_configuration.client
|
|
949
|
+
|
|
950
|
+
hook_ctx = SDKHooks::HookContext.new(
|
|
951
|
+
config: @sdk_configuration,
|
|
952
|
+
base_url: base_url,
|
|
953
|
+
oauth2_scopes: [],
|
|
954
|
+
operation_id: 'backchannel_authentication_complete_api',
|
|
955
|
+
security_source: @sdk_configuration.security_source
|
|
956
|
+
)
|
|
957
|
+
|
|
958
|
+
error = T.let(nil, T.nilable(StandardError))
|
|
959
|
+
http_response = T.let(nil, T.nilable(Faraday::Response))
|
|
960
|
+
|
|
961
|
+
|
|
962
|
+
begin
|
|
963
|
+
http_response = T.must(connection).post(url) do |req|
|
|
964
|
+
req.body = body
|
|
965
|
+
req.headers.merge!(headers)
|
|
966
|
+
req.options.timeout = timeout unless timeout.nil?
|
|
967
|
+
Utils.configure_request_security(req, security)
|
|
968
|
+
|
|
969
|
+
@sdk_configuration.hooks.before_request(
|
|
970
|
+
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
|
971
|
+
hook_ctx: hook_ctx
|
|
972
|
+
),
|
|
973
|
+
request: req
|
|
974
|
+
)
|
|
975
|
+
end
|
|
976
|
+
rescue StandardError => e
|
|
977
|
+
error = e
|
|
978
|
+
ensure
|
|
979
|
+
if http_response.nil? || Utils.error_status?(http_response.status)
|
|
980
|
+
http_response = @sdk_configuration.hooks.after_error(
|
|
981
|
+
error: error,
|
|
982
|
+
hook_ctx: SDKHooks::AfterErrorHookContext.new(
|
|
983
|
+
hook_ctx: hook_ctx
|
|
984
|
+
),
|
|
985
|
+
response: http_response
|
|
986
|
+
)
|
|
987
|
+
else
|
|
988
|
+
http_response = @sdk_configuration.hooks.after_success(
|
|
989
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
|
990
|
+
hook_ctx: hook_ctx
|
|
991
|
+
),
|
|
992
|
+
response: http_response
|
|
993
|
+
)
|
|
994
|
+
end
|
|
995
|
+
|
|
996
|
+
if http_response.nil?
|
|
997
|
+
raise error if !error.nil?
|
|
998
|
+
raise 'no response'
|
|
999
|
+
end
|
|
1000
|
+
end
|
|
1001
|
+
|
|
1002
|
+
content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream')
|
|
1003
|
+
if Utils.match_status_code(http_response.status, ['200'])
|
|
1004
|
+
if Utils.match_content_type(content_type, 'application/json')
|
|
1005
|
+
http_response = @sdk_configuration.hooks.after_success(
|
|
1006
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
|
1007
|
+
hook_ctx: hook_ctx
|
|
1008
|
+
),
|
|
1009
|
+
response: http_response
|
|
1010
|
+
)
|
|
1011
|
+
response_data = http_response.env.response_body
|
|
1012
|
+
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Components::BackchannelAuthenticationCompleteResponse)
|
|
1013
|
+
response = Models::Operations::BackchannelAuthenticationCompleteApiResponse.new(
|
|
1014
|
+
status_code: http_response.status,
|
|
1015
|
+
content_type: content_type,
|
|
1016
|
+
raw_response: http_response,
|
|
1017
|
+
backchannel_authentication_complete_response: T.unsafe(obj)
|
|
1018
|
+
)
|
|
1019
|
+
|
|
1020
|
+
return response
|
|
1021
|
+
else
|
|
1022
|
+
raise ::Authlete::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
|
1023
|
+
end
|
|
1024
|
+
elsif Utils.match_status_code(http_response.status, ['400', '401', '403'])
|
|
1025
|
+
if Utils.match_content_type(content_type, 'application/json')
|
|
1026
|
+
http_response = @sdk_configuration.hooks.after_success(
|
|
1027
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
|
1028
|
+
hook_ctx: hook_ctx
|
|
1029
|
+
),
|
|
1030
|
+
response: http_response
|
|
1031
|
+
)
|
|
1032
|
+
response_data = http_response.env.response_body
|
|
1033
|
+
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::ResultError)
|
|
1034
|
+
obj.raw_response = http_response
|
|
1035
|
+
throw obj
|
|
1036
|
+
else
|
|
1037
|
+
raise ::Authlete::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
|
1038
|
+
end
|
|
1039
|
+
elsif Utils.match_status_code(http_response.status, ['500'])
|
|
1040
|
+
if Utils.match_content_type(content_type, 'application/json')
|
|
1041
|
+
http_response = @sdk_configuration.hooks.after_success(
|
|
1042
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
|
1043
|
+
hook_ctx: hook_ctx
|
|
1044
|
+
),
|
|
1045
|
+
response: http_response
|
|
1046
|
+
)
|
|
1047
|
+
response_data = http_response.env.response_body
|
|
1048
|
+
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::ResultError)
|
|
1049
|
+
obj.raw_response = http_response
|
|
1050
|
+
throw obj
|
|
1051
|
+
else
|
|
1052
|
+
raise ::Authlete::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown content type received'
|
|
1053
|
+
end
|
|
1054
|
+
elsif Utils.match_status_code(http_response.status, ['4XX'])
|
|
1055
|
+
raise ::Authlete::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
|
|
1056
|
+
elsif Utils.match_status_code(http_response.status, ['5XX'])
|
|
1057
|
+
raise ::Authlete::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
|
|
1058
|
+
else
|
|
1059
|
+
raise ::Authlete::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'Unknown status code received'
|
|
1060
|
+
|
|
1061
|
+
end
|
|
1062
|
+
end
|
|
1063
|
+
end
|
|
1064
|
+
end
|