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,1062 @@
|
|
|
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 Authorization
|
|
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(authorization_request: Models::Components::AuthorizationRequest, service_id: ::String, timeout_ms: T.nilable(Integer)).returns(Models::Operations::AuthAuthorizationApiResponse) }
|
|
43
|
+
def process_request(authorization_request:, service_id:, timeout_ms: nil)
|
|
44
|
+
# process_request - Process Authorization Request
|
|
45
|
+
# This API parses request parameters of an authorization request and returns necessary data for the authorization server
|
|
46
|
+
# implementation to process the authorization request further.
|
|
47
|
+
# ### Description
|
|
48
|
+
# This API is supposed to be called from within the implementation of the authorization endpoint of
|
|
49
|
+
# the service. The endpoint implementation must extract the request parameters from the authorization
|
|
50
|
+
# request from the client application and pass them as the value of parameters request parameter for
|
|
51
|
+
# Authlete's `/auth/authorization` API.
|
|
52
|
+
# The value of `parameters` is either (1) the entire query string when the HTTP method of the request
|
|
53
|
+
# from the client application is `GET` or (2) the entire entity body (which is formatted in
|
|
54
|
+
# `application/x-www-form-urlencoded`) when the HTTP method of the request from the client application
|
|
55
|
+
# is `POST`.
|
|
56
|
+
# The following code snippet is an example in JAX-RS showing how to extract request parameters from
|
|
57
|
+
# the authorization request.
|
|
58
|
+
# ```java
|
|
59
|
+
# @GET
|
|
60
|
+
# public Response get(@Context UriInfo uriInfo)
|
|
61
|
+
# {
|
|
62
|
+
# // The query parameters of the authorization request.
|
|
63
|
+
# String parameters = uriInfo.getRequestUri().getQuery();
|
|
64
|
+
# ......
|
|
65
|
+
# }
|
|
66
|
+
# @POST
|
|
67
|
+
# @Consumes(MediaType.APPLICATION\_FORM\_URLENCODED)
|
|
68
|
+
# public Response post(String parameters)
|
|
69
|
+
# {
|
|
70
|
+
# // 'parameters' is the entity body of the authorization request.
|
|
71
|
+
# ......
|
|
72
|
+
# }
|
|
73
|
+
# ```
|
|
74
|
+
# The endpoint implementation does not have to parse the request parameters from the client application
|
|
75
|
+
# because Authlete's `/auth/authorization` API does it.
|
|
76
|
+
# The response from `/auth/authorization` API has various parameters. Among them, it is `action`
|
|
77
|
+
# parameter that the authorization server implementation should check first because it denotes the
|
|
78
|
+
# next action that the authorization server implementation should take. According to the value of
|
|
79
|
+
# `action`, the service implementation must take the steps described below.
|
|
80
|
+
# **INTERNAL\_SERVER\_ERROR**
|
|
81
|
+
# When the value of `action` is `INTERNAL\_SERVER\_ERROR`, it means that the request from the authorization
|
|
82
|
+
# server implementation was wrong or that an error occurred in Authlete.
|
|
83
|
+
# In either case, from the viewpoint of the client application, it is an error on the server side.
|
|
84
|
+
# Therefore, the service implementation should generate a response to the client application with
|
|
85
|
+
# HTTP status of "500 Internal Server Error". Authlete recommends `application/json` as the content
|
|
86
|
+
# type although OAuth 2.0 specification does not mention the format of the error response when the
|
|
87
|
+
# redirect URI is not usable.
|
|
88
|
+
# The value of `responseContent` is a JSON string which describes the error, so it can be used as
|
|
89
|
+
# the entity body of the response.
|
|
90
|
+
# The following illustrates the response which the service implementation should generate and return
|
|
91
|
+
# to the client application.
|
|
92
|
+
# ```
|
|
93
|
+
# HTTP/1.1 500 Internal Server Error
|
|
94
|
+
# Content-Type: application/json
|
|
95
|
+
# Cache-Control: no-store
|
|
96
|
+
# Pragma: no-cache
|
|
97
|
+
# {responseContent}
|
|
98
|
+
# ```
|
|
99
|
+
# The endpoint implementation may return another different response to the client application
|
|
100
|
+
# since "500 Internal Server Error" is not required by OAuth 2.0.
|
|
101
|
+
# **BAD\_REQUEST**
|
|
102
|
+
# When the value of `action` is `BAD\_REQUEST`, it means that the request from the client application
|
|
103
|
+
# is invalid.
|
|
104
|
+
# A response with HTTP status of "400 Bad Request" should be returned to the client application and
|
|
105
|
+
# Authlete recommends `application/json` as the content type although OAuth 2.0 specification does
|
|
106
|
+
# not mention the format of the error response when the redirect URI is not usable.
|
|
107
|
+
# The value of `responseContent` is a JSON string which describes the error, so it can be used as
|
|
108
|
+
# the entity body of the response.
|
|
109
|
+
# The following illustrates the response which the service implementation should generate and return
|
|
110
|
+
# to the client application.
|
|
111
|
+
# ```
|
|
112
|
+
# HTTP/1.1 400 Bad Request
|
|
113
|
+
# Content-Type: application/json
|
|
114
|
+
# Cache-Control: no-store
|
|
115
|
+
# Pragma: no-cache
|
|
116
|
+
# {responseContent}
|
|
117
|
+
# ```
|
|
118
|
+
# The endpoint implementation may return another different response to the client application since
|
|
119
|
+
# "400 Bad Request" is not required by OAuth 2.0.
|
|
120
|
+
# **LOCATION**
|
|
121
|
+
# When the value of `action` is `LOCATION`, it means that the request from the client application
|
|
122
|
+
# is invalid but the redirect URI
|
|
123
|
+
# to which the error should be reported has been determined.
|
|
124
|
+
# A response with HTTP status of "302 Found" must be returned to the client application with `Location`
|
|
125
|
+
# header which has a redirect URI with error parameter.
|
|
126
|
+
# The value of `responseContent` is a redirect URI with `error` parameter, so it can be used as the
|
|
127
|
+
# value of `Location` header.
|
|
128
|
+
# The following illustrates the response which the service implementation must generate and return
|
|
129
|
+
# to the client application.
|
|
130
|
+
# ```
|
|
131
|
+
# HTTP/1.1 302 Found
|
|
132
|
+
# Location: {responseContent}
|
|
133
|
+
# Cache-Control: no-store
|
|
134
|
+
# Pragma: no-cache
|
|
135
|
+
# ```
|
|
136
|
+
# **FORM**
|
|
137
|
+
# When the value of `action` is `FORM`, it means that the request from the client application is
|
|
138
|
+
# invalid but the redirect URI to which the error should be reported has been determined, and that
|
|
139
|
+
# the authorization request contains `response\_mode=form\_post` as is defined in [OAuth 2.0 Form Post
|
|
140
|
+
# Response Mode](https://openid.net/specs/oauth-v2-form-post-response-mode-1\_0.html).
|
|
141
|
+
# The HTTP status of the response returned to the client application should be "200 OK" and the
|
|
142
|
+
# content type should be `text/html;charset=UTF-8`.
|
|
143
|
+
# The value of `responseContent` is an HTML which can be used as the entity body of the response.
|
|
144
|
+
# The following illustrates the response which the service implementation must generate and return
|
|
145
|
+
# to the client application.
|
|
146
|
+
# ```
|
|
147
|
+
# HTTP/1.1 200 OK
|
|
148
|
+
# Content-Type: text/html;charset=UTF-8
|
|
149
|
+
# Cache-Control: no-store
|
|
150
|
+
# Pragma: no-cache
|
|
151
|
+
# {responseContent}
|
|
152
|
+
# ```
|
|
153
|
+
# **NO\_INTERACTION**
|
|
154
|
+
# When the value of `action` is `NO\_INTERACTION`, it means that the request from the client application
|
|
155
|
+
# has no problem and requires the service to process the request without displaying any user interface
|
|
156
|
+
# pages for authentication or consent. This case happens when the authorization request contains
|
|
157
|
+
# `prompt=none`.
|
|
158
|
+
# The service must follow the steps described below.
|
|
159
|
+
# [1] END-USER AUTHENTICATION
|
|
160
|
+
# Check whether an end-user has already logged in. If an end-user has logged in, go to the next step ([MAX\_AGE]).
|
|
161
|
+
# Otherwise, call Authlete's `/auth/authorization/fail` API with `reason=NOT\_LOGGED\_IN` and use the response from
|
|
162
|
+
# the API to generate a response to the client application.
|
|
163
|
+
# [2] MAX AGE
|
|
164
|
+
# Get the value of `maxAge` parameter from the `/auth/authorization` API response. The value represents
|
|
165
|
+
# the maximum authentication age which has come from `max\_age` request parameter or `defaultMaxAge`
|
|
166
|
+
# configuration parameter of the client application. If the value is `0`, go to the next step ([SUBJECT]).
|
|
167
|
+
# Otherwise, follow the sub steps described below.
|
|
168
|
+
# (i) Get the time at which the end-user was authenticated. that this value is not managed by Authlete,
|
|
169
|
+
# meaning that it is expected that the service implementation manages the value. If the service implementation
|
|
170
|
+
# does not manage authentication time of end-users, call Authlete's `/auth/authorization/fail` API
|
|
171
|
+
# with `reason=MAX\_AGE\_NOT\_SUPPORTED` and use the API response to generate a response to the client
|
|
172
|
+
# application.
|
|
173
|
+
# (ii) Add the value of the maximum authentication age (which is represented in seconds) to the authentication
|
|
174
|
+
# time. The calculated value is the expiration time.
|
|
175
|
+
# (iii) Check whether the calculated value is equal to or greater than the current time. If this condition
|
|
176
|
+
# is satisfied, go to the next step ([SUBJECT]). Otherwise, call Authlete's `/auth/authorization/fail`
|
|
177
|
+
# API with `reason=EXCEEDS\_MAX\_AGE` and use the API response to generate a response to the client
|
|
178
|
+
# application.
|
|
179
|
+
# [3] SUBJECT
|
|
180
|
+
# Get the value of `subject` from the `/auth/authorization` API response. The value represents an
|
|
181
|
+
# end-user who the client application expects to grant authorization. If the value is `null`, go to
|
|
182
|
+
# the next step ([ACRs]). Otherwise, follow the sub steps described below.
|
|
183
|
+
# (i) Compare the value of the requested subject to the current end-user.
|
|
184
|
+
# (ii) If they are equal, go to the next step ([ACRs]). If they are not equal, call Authlete's
|
|
185
|
+
# `/auth/authorization/fail` API with `reason=DIFFERENT\_SUBJECT` and use the response from the API
|
|
186
|
+
# to generate a response to the client application.
|
|
187
|
+
# [4] ACRs
|
|
188
|
+
# Get the value of `acrs` from the `/auth/authorization` API response. The value represents a list
|
|
189
|
+
# of ACRs (Authentication Context Class References) and comes from (1) acr claim in `claims` request
|
|
190
|
+
# parameter, (2) `acr\_values` request parameter, or (3) `default\_acr\_values` configuration parameter
|
|
191
|
+
# of the client application.
|
|
192
|
+
# It is ensured that all the ACRs in acrs are supported by the authorization server implementation.
|
|
193
|
+
# In other words, it is ensured that all the ACRs are listed in `acr\_values\_supported` configuration
|
|
194
|
+
# parameter of the authorization server.
|
|
195
|
+
# If the value of ACRs is `null`, go to the next step ([ISSUE]). Otherwise, follow the sub steps
|
|
196
|
+
# described below.
|
|
197
|
+
# (i) Get the ACR performed for the authentication of the current end-user. Note that this value is
|
|
198
|
+
# managed not by Authlete but by the authorization server implementation. (If the authorization server
|
|
199
|
+
# implementation cannot handle ACRs, it should not have listed ACRs as `acr\_values\_supported`.)
|
|
200
|
+
# (ii) Compare the ACR value obtained in the above step to each element in the ACR array (`acrs`)
|
|
201
|
+
# in the listed order.
|
|
202
|
+
# (iii) If the ACR value was found in the array, (= the ACR performed for the authentication of the
|
|
203
|
+
# current end-user did not match any one of the ACRs requested by the client application), check
|
|
204
|
+
# whether one of the requested ACRs must be satisfied or not using `acrEssential` parameter in the
|
|
205
|
+
# `/auth/authorization` API response. If the value of `acrEssential` parameter is `true`, call Authlete's
|
|
206
|
+
# `/auth/authorization/fail` API with `reason=ACR\_NOT\_SATISFIED` and use the response from the API
|
|
207
|
+
# to generate a response to the client application. Otherwise, go to the next step ([SCOPES]).
|
|
208
|
+
# [5] SCOPES
|
|
209
|
+
# Get the value of `scopes` from the `/auth/authorization` API response. If the array contains a
|
|
210
|
+
# scope which has not been granted to the client application by the end-user in the past, call
|
|
211
|
+
# Authlete's `/auth/authorization/fail` API with `reason=CONSENT\_REQUIRED` and use the response from
|
|
212
|
+
# the API to generate a response to the client application. Otherwise, go to the next step ([RESOURCES]).
|
|
213
|
+
# Note that Authlete provides APIs to manage records of granted scopes (`/api/client/granted\_scopes/\*`
|
|
214
|
+
# APIs), which is only available in a dedicated/onpremise Authlete server (contact sales@authlete.com
|
|
215
|
+
# for details).
|
|
216
|
+
# [6] DYNAMIC SCOPES
|
|
217
|
+
# Get the value of `dynamicScopes` from the `/auth/authorization` API response. If the array contains
|
|
218
|
+
# a scope which has not been granted to the client application by the end-user in the past, call
|
|
219
|
+
# Authlete's `/auth/authorization/fail` API with `reason=CONSENT\_REQUIRED` and use the response from
|
|
220
|
+
# the API to generate a response to the client application. Otherwise, go to the next step ([RESOURCES]).
|
|
221
|
+
# Note that Authlete provides APIs to manage records of granted scopes (`/api/client/granted\_scopes/\*`
|
|
222
|
+
# APIs) but dynamic scopes are not remembered as granted scopes.
|
|
223
|
+
# [7] RESOURCES
|
|
224
|
+
# Get the value of `resources` from the `/auth/authorization` API response. The array represents
|
|
225
|
+
# the values of the `resource` request parameters. If you want to reject the request, call Authlete's
|
|
226
|
+
# `/auth/authorization/fail` API with `reason=INVALID\_TARGET` and use the response from the API to
|
|
227
|
+
# generate a response to the client application. Otherwise, go to the next step ([ISSUE]).
|
|
228
|
+
# See "Resource Indicators for OAuth 2.0" for details.
|
|
229
|
+
# [8] ISSUE
|
|
230
|
+
# If all the above steps succeeded, the last step is to issue an authorization code, an ID token
|
|
231
|
+
# and/or an access token. (There is a special case, though. In the case of `response\_type=none`,
|
|
232
|
+
# nothing is issued.) It can be performed by calling Authlete's `/auth/authorization/issue` API.
|
|
233
|
+
# The API requires the following parameters. Prepare these parameters and call `/auth/authorization/issue`
|
|
234
|
+
# API and use the response to generate a response to the client application.
|
|
235
|
+
# - `ticket` (required)
|
|
236
|
+
# This parameter represents a ticket which is exchanged with tokens at `/auth/authorization/issue`.
|
|
237
|
+
# Use the value of `ticket` contained in the `/auth/authorization` API response.
|
|
238
|
+
# - `subject` (required)
|
|
239
|
+
# This parameter represents the unique identifier of the current end-user. It is often called "user ID"
|
|
240
|
+
# and it may or may not be visible to the user. In any case, it is a number or a string assigned
|
|
241
|
+
# to an end-user by the authorization server implementation. Authlete does not care about the format
|
|
242
|
+
# of the value of subject, but it must consist of only ASCII letters and its length must not exceed 100.
|
|
243
|
+
# When the value of `subject` parameter in the /auth/authorization API response is not `null`,
|
|
244
|
+
# it is necessarily identical to the value of `subject` parameter in the `/auth/authorization/issue`
|
|
245
|
+
# API request.
|
|
246
|
+
# The value of this parameter will be embedded in an ID token as the value of `sub` claim. When
|
|
247
|
+
# the value of `subject\_type` configuration parameter of the client application is `PAIRWISE`,
|
|
248
|
+
# the value of sub claim is different from the value specified by this parameter, See [8. Subject
|
|
249
|
+
# Identifier Types](https://openid.net/specs/openid-connect-core-1\_0.html#SubjectIDTypes) of OpenID
|
|
250
|
+
# Connect Core 1.0 for details about subject types.
|
|
251
|
+
# You can use the `sub` request parameter to adjust the value of the `sub` claim in an ID token.
|
|
252
|
+
# See the description of the `sub` request parameter for details.
|
|
253
|
+
# - `authTime` (optional)
|
|
254
|
+
# This parameter represents the time when the end-user authentication occurred. Its value is the
|
|
255
|
+
# number of seconds from `1970-01-01`. The value of this parameter will be embedded in an ID token
|
|
256
|
+
# as the value of `auth\_time` claim.
|
|
257
|
+
# - `acr` (optional)
|
|
258
|
+
# This parameter represents the ACR (Authentication Context Class Reference) which the authentication
|
|
259
|
+
# of the end-user satisfies. When `acrs` in the `/auth/authorization` API response is a non-empty
|
|
260
|
+
# array and the value of `acrEssential` is `true`, the value of this parameter must be one of the
|
|
261
|
+
# array elements. Otherwise, even `null` is allowed. The value of this parameter will be embedded
|
|
262
|
+
# in an ID token as the value of `acr` claim.
|
|
263
|
+
# - `claims` (optional)
|
|
264
|
+
# This parameter represents claims of the end-user. "Claims" here are pieces of information about
|
|
265
|
+
# the end-user such as `"name"`, `"email"` and `"birthdate"`. The authorization server implementation
|
|
266
|
+
# is required to gather claims of the end-user, format the claim values into JSON and set the JSON
|
|
267
|
+
# string as the value of this parameter.
|
|
268
|
+
# The claims which the authorization server implementation is required to gather are listed in
|
|
269
|
+
# `claims` parameter in the `/auth/authorization` API response.
|
|
270
|
+
# For example, if claims parameter lists `"name"`, `"email"` and `"birthdate"`, the value of this
|
|
271
|
+
# parameter should look like the following.
|
|
272
|
+
# ```json
|
|
273
|
+
# {
|
|
274
|
+
# "name": "John Smith",
|
|
275
|
+
# "email": "john@example.com",
|
|
276
|
+
# "birthdate": "1974-05-06"
|
|
277
|
+
# }
|
|
278
|
+
# ```
|
|
279
|
+
# `claimsLocales` parameter in the `/auth/authorization` API response lists the end-user's preferred
|
|
280
|
+
# languages and scripts, ordered by preference. When `claimsLocales` parameter is a non-empty array,
|
|
281
|
+
# its elements should be taken into account when the authorization server implementation gathers
|
|
282
|
+
# claim values. Especially, note the excerpt below from [5.2. Claims Languages and Scripts](https://openid.net/specs/openid-connect-core-1\_0.html#ClaimsLanguagesAndScripts)
|
|
283
|
+
# of OpenID Connect Core 1.0.
|
|
284
|
+
# > When the OP determines, either through the `claims\_locales` parameter, or by other means, that
|
|
285
|
+
# the End-User and Client are requesting Claims in only one set of languages and scripts, it is
|
|
286
|
+
# RECOMMENDED that OPs return Claims without language tags when they employ this language and script.
|
|
287
|
+
# It is also RECOMMENDED that Clients be written in a manner that they can handle and utilize Claims
|
|
288
|
+
# using language tags.
|
|
289
|
+
# If `claims` parameter in the `/auth/authorization` API response is `null` or an empty array,
|
|
290
|
+
# the value of this parameter should be `null`.
|
|
291
|
+
# See [5.1. Standard Claims](https://openid.net/specs/openid-connect-core-1\_0.html#StandardClaims)
|
|
292
|
+
# of OpenID Connect core 1.0 for claim names and their value formats. Note (1) that the authorization
|
|
293
|
+
# server implementation support its special claims ([5.1.2. Additional Claims](https://openid.net/specs/openid-connect-core-1\_0.html#AdditionalClaims))
|
|
294
|
+
# and (2) that claim names may be followed by a language tag ([5.2. Claims Languages and Scripts](https://openid.net/specs/openid-connect-core-1\_0.html#ClaimsLanguagesAndScripts)).
|
|
295
|
+
# Read the specification of [OpenID Connect Core 1.0](https://openid.net/specs/openid-connect-core-1\_0.html)
|
|
296
|
+
# for details.
|
|
297
|
+
# The claim values in this parameter will be embedded in an ID token.
|
|
298
|
+
# Note that `idTokenClaims` parameter is available in the `/auth/authorization` API response.
|
|
299
|
+
# The parameter has the value of the `"id\_token"` property in the `claims` request parameter or
|
|
300
|
+
# in the `"claims"` property in a request object. The value of this parameter should be considered
|
|
301
|
+
# when you prepare claim values.
|
|
302
|
+
# - `properties` (optional)
|
|
303
|
+
# Extra properties to associate with an access token and/or an authorization code that may be issued
|
|
304
|
+
# by this request. Note that `properties` parameter is accepted only when `Content-Type` of the
|
|
305
|
+
# request is `application/json`, so don't use `application/x-www-form-urlencoded` for details.
|
|
306
|
+
# - `scopes` (optional)
|
|
307
|
+
# Scopes to associate with an access token and/or an authorization code. If this parameter is `null`,
|
|
308
|
+
# the scopes specified in the original authorization request from the client application are used.
|
|
309
|
+
# In other cases, including the case of an empty array, the specified scopes will replace the original
|
|
310
|
+
# scopes contained in the original authorization request.
|
|
311
|
+
# Even scopes that are not included in the original authorization request can be specified. However,
|
|
312
|
+
# as an exception, `openid` scope is ignored on the server side if it is not included in the original
|
|
313
|
+
# request. It is because the existence of `openid` scope considerably changes the validation steps
|
|
314
|
+
# and because adding `openid` triggers generation of an ID token (although the client application
|
|
315
|
+
# has not requested it) and the behavior is a major violation against the specification.
|
|
316
|
+
# If you add `offline\_access` scope although it is not included in the original request, keep in
|
|
317
|
+
# mind that the specification requires explicit consent from the user for the scope ([OpenID Connect
|
|
318
|
+
# Core 1.0, 11. Offline Access](https://openid.net/specs/openid-connect-core-1\_0.html#OfflineAccess)).
|
|
319
|
+
# When `offline\_access` is included in the original request, the current implementation of Authlete's
|
|
320
|
+
# `/auth/authorization` API checks whether the request has come along with `prompt` request parameter
|
|
321
|
+
# and the value includes consent. However, note that the implementation of Authlete's `/auth/authorization/issue`
|
|
322
|
+
# API does not perform such checking if `offline\_access` scope is added via this `scopes` parameter.
|
|
323
|
+
# - `sub` (optional)
|
|
324
|
+
# The value of the `sub` claim in an ID token. If the value of this request parameter is not empty,
|
|
325
|
+
# it is used as the value of the `sub` claim. Otherwise, the value of the `subject` request parameter
|
|
326
|
+
# is used as the value of the `sub` claim. The main purpose of this parameter is to hide the actual
|
|
327
|
+
# value of the subject from client applications.
|
|
328
|
+
# Note that even if this `sub` parameter is not empty, the value of the subject request parameter
|
|
329
|
+
# is used as the value of the subject which is associated with the access token.
|
|
330
|
+
# **INTERACTION**
|
|
331
|
+
# When the value of `action` is `INTERACTION`, it means that the request from the client application
|
|
332
|
+
# has no problem and requires the service to process the request with user interaction by an HTML form.
|
|
333
|
+
# The purpose of the UI displayed to the end-user is to ask the end-user to grant authorization to
|
|
334
|
+
# the client application. The items described below are some points which the service implementation
|
|
335
|
+
# should take into account when it builds the UI.
|
|
336
|
+
# [1] DISPLAY MODE
|
|
337
|
+
# The response from `/auth/authorization` API has `display` parameter. It is one of `PAGE` (default),
|
|
338
|
+
# `POPUP`, `TOUCH` and `WAP` The meanings of the values are described in [3.1.2.1. Authentication
|
|
339
|
+
# Request of OpenID Connect Core 1.0](https://openid.net/specs/openid-connect-core-1\_0.html#AuthRequest).
|
|
340
|
+
# Basically, the authorization server implementation should display the UI which is suitable for the
|
|
341
|
+
# display mode, but it is okay for the authorization server implementation to "attempt to detect the
|
|
342
|
+
# capabilities of the User Agent and present an appropriate display".
|
|
343
|
+
# It is ensured that the value of `display` is one of the supported display modes which are specified
|
|
344
|
+
# by `supportedDisplays` configuration parameter of the service.
|
|
345
|
+
# [2] UI LOCALE
|
|
346
|
+
# The response from `/auth/authorization` API has `uiLocales` parameter. It it is not `null`, it lists
|
|
347
|
+
# language tag values (such as `fr-CA`, `ja-JP` and `en`) ordered by preference. The service implementation
|
|
348
|
+
# should display the UI in one of the language listed in the parameter when possible. It is ensured
|
|
349
|
+
# that language tags listed in `uiLocales` are contained in the list of supported UI locales which
|
|
350
|
+
# are specified by `supportedUiLocales` configuration parameter of the service.
|
|
351
|
+
# [3] CLIENT INFORMATION
|
|
352
|
+
# The authorization server implementation should show information about the client application to
|
|
353
|
+
# the end-user. The information is embedded in `client` parameter in the response from `/auth/authorization`
|
|
354
|
+
# API.
|
|
355
|
+
# [4] SCOPES
|
|
356
|
+
# A client application requires authorization for specific permissions. In OAuth 2.0 specification,
|
|
357
|
+
# "scope" is a technical term which represents a permission. `scopes` parameter in the response
|
|
358
|
+
# from `/auth/authorization` API is a list of scopes requested by the client application. The service
|
|
359
|
+
# implementation should show the end-user the scopes.
|
|
360
|
+
# The authorization server implementation may choose not to show scopes to which the end-user has
|
|
361
|
+
# given consent in the past. To put it the other way around, the authorization server implementation
|
|
362
|
+
# may show only the scopes to which the end-user has not given consent yet. However, if the value
|
|
363
|
+
# of `prompts` response parameter contains `CONSENT`, the authorization server implementation has
|
|
364
|
+
# to obtain explicit consent from the end-user even if the end-user has given consent to all the
|
|
365
|
+
# requested scopes in the past.
|
|
366
|
+
# Note that Authlete provides APIs to manage records of granted scopes (`/api/client/granted\_scopes/\*`
|
|
367
|
+
# APIs), but the APIs work only in the case the Authlete server you use is a dedicated Authlete server
|
|
368
|
+
# (contact sales@authlete.com for details). In other words, the APIs of the shared Authlete server
|
|
369
|
+
# are disabled intentionally (in order to prevent garbage data from being accumulated) and they
|
|
370
|
+
# return 403 Forbidden.
|
|
371
|
+
# It is ensured that the values in `scopes` parameter are contained in the list of supported scopes
|
|
372
|
+
# which are specified by `supportedScopes` configuration parameter of the service.
|
|
373
|
+
# [5] DYNAMIC SCOPES
|
|
374
|
+
# The authorization request may include dynamic scopes. The list of recognized dynamic scopes are
|
|
375
|
+
# accessible by getDynamicScopes() method. See the description of the [DynamicScope](https://authlete.github.io/authlete-java-common/com/authlete/common/dto/DynamicScope.html)
|
|
376
|
+
# class for details about dynamic scopes.
|
|
377
|
+
# [6] AUTHORIZATION DETAILS
|
|
378
|
+
# The authorization server implementation should show the end-user "authorization details" if the
|
|
379
|
+
# request includes it. The value of `authorization\_details` parameter in the response is the content
|
|
380
|
+
# of the `authorization\_details` request parameter.
|
|
381
|
+
# See "OAuth 2.0 Rich Authorization Requests" for details.
|
|
382
|
+
# [7] PURPOSE
|
|
383
|
+
# The authorization server implementation must show the value of the `purpose` request parameter if
|
|
384
|
+
# it supports [OpenID Connect for Identity Assurance 1.0](https://openid.net/specs/openid-connect-4-identity-assurance-1\_0.html).
|
|
385
|
+
# See [8. Transaction-specific Purpose](https://openid.net/specs/openid-connect-4-identity-assurance-1\_0.html#rfc.section.8)
|
|
386
|
+
# in the specification for details.
|
|
387
|
+
# Note that the value of `purpose` response parameter is the value of the purpose request parameter.
|
|
388
|
+
# [7] END-USER AUTHENTICATION
|
|
389
|
+
# Necessarily, the end-user must be authenticated (= must login the service) before granting authorization
|
|
390
|
+
# to the client application. Simply put, a login form is expected to be displayed for end-user authentication.
|
|
391
|
+
# The service implementation must follow the steps described below to comply with OpenID Connect.
|
|
392
|
+
# (Or just always show a login form if it's too much of a bother.)
|
|
393
|
+
# (i) Get the value of `prompts` response parameter. It corresponds to the value of the `prompt`
|
|
394
|
+
# request parameter. Details of the request parameter are described in [3.1.2.1. Authentication
|
|
395
|
+
# Request](https://openid.net/specs/openid-connect-core-1\_0.html#AuthRequest) of OpenID Connect Core 1.0.
|
|
396
|
+
# (ii) If the value of `prompts` parameter is `SELECT\_ACCOUNT` display a form to let the end-user
|
|
397
|
+
# select on of his/her accounts for login. If `subject` response parameter is not `null`, it is the
|
|
398
|
+
# end-user ID that the client application expects, so the value should be used to determine the value
|
|
399
|
+
# of the login ID. Note that a subject and a login ID are not necessarily equal. If the value of
|
|
400
|
+
# `subject` response parameter is `null`, the value of `loginHint` response parameter should be referred
|
|
401
|
+
# to as a hint to determine the value of the login ID. The value of `loginHint` response parameter
|
|
402
|
+
# is simply the value of the `login\_hint` request parameter.
|
|
403
|
+
# (iii) If the value of `prompts` response parameter contains `LOGIN`, display a form to urge the
|
|
404
|
+
# end-user to login even if the end-user has already logged in. If the value of `subject` response
|
|
405
|
+
# parameter is not `null`, it is the end-user ID that the client application expects, so the value
|
|
406
|
+
# should be used to determine the value of the login ID. Note that a subject and a login ID are not
|
|
407
|
+
# necessarily equal. If the value of `subject` response parameter is `null`, the value of `loginHint`
|
|
408
|
+
# response parameter should be referred to as a hint to determine the value of the login ID. The value
|
|
409
|
+
# of `loginHint` response parameter is simply the value of the `login\_hint` request parameter.
|
|
410
|
+
# (iv) If the value of `prompts` response parameter does not contain `LOGIN`, the authorization server
|
|
411
|
+
# implementation does not have to authenticate the end-user if all the conditions described below
|
|
412
|
+
# are satisfied. If any one of the conditions is not satisfied, show a login form to authenticate
|
|
413
|
+
# the end-user.
|
|
414
|
+
# - An end-user has already logged in the service.
|
|
415
|
+
# - The login ID of the current end-user matches the value of `subject` response parameter.
|
|
416
|
+
# This check is required only when the value of `subject` response parameter is a non-null value.
|
|
417
|
+
# - The max age, which is the number of seconds contained in `maxAge` response parameter,
|
|
418
|
+
# has not passed since the current end-user logged in your service. This check is required only when
|
|
419
|
+
# the value of `maxAge` response parameter is a non-zero value.
|
|
420
|
+
# - If the authorization server implementation does not manage authentication time of end-users
|
|
421
|
+
# (= if the authorization server implementation cannot know when end-users logged in) and if the
|
|
422
|
+
# value of `maxAge` response parameter is a non-zero value, a login form should be displayed.
|
|
423
|
+
# - The ACR (Authentication Context Class Reference) of the authentication performed for
|
|
424
|
+
# the current end-user satisfies one of the ACRs listed in `acrs` response parameter. This check is
|
|
425
|
+
# required only when the value of `acrs` response parameter is a non-empty array.
|
|
426
|
+
# In every case, the end-user authentication must satisfy one of the ACRs listed in `acrs` response
|
|
427
|
+
# parameter when the value of `acrs` response parameter is a non-empty array and `acrEssential`
|
|
428
|
+
# response parameter is `true`.
|
|
429
|
+
# [9] GRANT/DENY BUTTONS
|
|
430
|
+
# The end-user is supposed to choose either (1) to grant authorization to the client application or
|
|
431
|
+
# (2) to deny the authorization request. The UI must have UI components to accept the judgment by
|
|
432
|
+
# the user. Usually, a button to grant authorization and a button to deny the request are provided.
|
|
433
|
+
# When the value of `subject` response parameter is not `null`, the end-user authentication must be
|
|
434
|
+
# performed for the subject, meaning that the authorization server implementation should repeatedly
|
|
435
|
+
# show a login form until the subject is successfully authenticated.
|
|
436
|
+
# The end-user will choose either (1) to grant authorization to the client application or (2) to
|
|
437
|
+
# deny the authorization request. When the end-user chose to deny the authorization request, call
|
|
438
|
+
# Authlete's `/auth/authorization/fail` API with `reason=DENIED` and use the response from the API
|
|
439
|
+
# to generate a response to the client application.
|
|
440
|
+
# When the end-user chose to grant authorization to the client application, the authorization server
|
|
441
|
+
# implementation has to issue an authorization code, an ID token, and/or an access token to the client
|
|
442
|
+
# application. (There is a special case. When `response\_type=none`, nothing is issued.) Issuing the
|
|
443
|
+
# tokens can be performed by calling Authlete's `/auth/authorization/issue` API. Read [ISSUE] written
|
|
444
|
+
# above in the description for the case of `action=NO\_INTERACTION`.
|
|
445
|
+
#
|
|
446
|
+
request = Models::Operations::AuthAuthorizationApiRequest.new(
|
|
447
|
+
service_id: service_id,
|
|
448
|
+
authorization_request: authorization_request
|
|
449
|
+
)
|
|
450
|
+
url, params = @sdk_configuration.get_server_details
|
|
451
|
+
base_url = Utils.template_url(url, params)
|
|
452
|
+
url = Utils.generate_url(
|
|
453
|
+
Models::Operations::AuthAuthorizationApiRequest,
|
|
454
|
+
base_url,
|
|
455
|
+
'/api/{serviceId}/auth/authorization',
|
|
456
|
+
request
|
|
457
|
+
)
|
|
458
|
+
headers = {}
|
|
459
|
+
headers = T.cast(headers, T::Hash[String, String])
|
|
460
|
+
req_content_type, data, form = Utils.serialize_request_body(request, false, false, :authorization_request, :json)
|
|
461
|
+
headers['content-type'] = req_content_type
|
|
462
|
+
raise StandardError, 'request body is required' if data.nil? && form.nil?
|
|
463
|
+
|
|
464
|
+
if form
|
|
465
|
+
body = Utils.encode_form(form)
|
|
466
|
+
elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
|
|
467
|
+
body = URI.encode_www_form(T.cast(data, T::Hash[Symbol, Object]))
|
|
468
|
+
else
|
|
469
|
+
body = data
|
|
470
|
+
end
|
|
471
|
+
headers['Accept'] = 'application/json'
|
|
472
|
+
headers['user-agent'] = @sdk_configuration.user_agent
|
|
473
|
+
|
|
474
|
+
security = @sdk_configuration.security_source&.call
|
|
475
|
+
|
|
476
|
+
timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
|
|
477
|
+
timeout ||= @sdk_configuration.timeout
|
|
478
|
+
|
|
479
|
+
|
|
480
|
+
connection = @sdk_configuration.client
|
|
481
|
+
|
|
482
|
+
hook_ctx = SDKHooks::HookContext.new(
|
|
483
|
+
config: @sdk_configuration,
|
|
484
|
+
base_url: base_url,
|
|
485
|
+
oauth2_scopes: [],
|
|
486
|
+
operation_id: 'auth_authorization_api',
|
|
487
|
+
security_source: @sdk_configuration.security_source
|
|
488
|
+
)
|
|
489
|
+
|
|
490
|
+
error = T.let(nil, T.nilable(StandardError))
|
|
491
|
+
http_response = T.let(nil, T.nilable(Faraday::Response))
|
|
492
|
+
|
|
493
|
+
|
|
494
|
+
begin
|
|
495
|
+
http_response = T.must(connection).post(url) do |req|
|
|
496
|
+
req.body = body
|
|
497
|
+
req.headers.merge!(headers)
|
|
498
|
+
req.options.timeout = timeout unless timeout.nil?
|
|
499
|
+
Utils.configure_request_security(req, security)
|
|
500
|
+
|
|
501
|
+
@sdk_configuration.hooks.before_request(
|
|
502
|
+
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
|
503
|
+
hook_ctx: hook_ctx
|
|
504
|
+
),
|
|
505
|
+
request: req
|
|
506
|
+
)
|
|
507
|
+
end
|
|
508
|
+
rescue StandardError => e
|
|
509
|
+
error = e
|
|
510
|
+
ensure
|
|
511
|
+
if http_response.nil? || Utils.error_status?(http_response.status)
|
|
512
|
+
http_response = @sdk_configuration.hooks.after_error(
|
|
513
|
+
error: error,
|
|
514
|
+
hook_ctx: SDKHooks::AfterErrorHookContext.new(
|
|
515
|
+
hook_ctx: hook_ctx
|
|
516
|
+
),
|
|
517
|
+
response: http_response
|
|
518
|
+
)
|
|
519
|
+
else
|
|
520
|
+
http_response = @sdk_configuration.hooks.after_success(
|
|
521
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
|
522
|
+
hook_ctx: hook_ctx
|
|
523
|
+
),
|
|
524
|
+
response: http_response
|
|
525
|
+
)
|
|
526
|
+
end
|
|
527
|
+
|
|
528
|
+
if http_response.nil?
|
|
529
|
+
raise error if !error.nil?
|
|
530
|
+
raise 'no response'
|
|
531
|
+
end
|
|
532
|
+
end
|
|
533
|
+
|
|
534
|
+
content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream')
|
|
535
|
+
if Utils.match_status_code(http_response.status, ['200'])
|
|
536
|
+
if Utils.match_content_type(content_type, 'application/json')
|
|
537
|
+
http_response = @sdk_configuration.hooks.after_success(
|
|
538
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
|
539
|
+
hook_ctx: hook_ctx
|
|
540
|
+
),
|
|
541
|
+
response: http_response
|
|
542
|
+
)
|
|
543
|
+
response_data = http_response.env.response_body
|
|
544
|
+
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Components::AuthorizationResponse)
|
|
545
|
+
response = Models::Operations::AuthAuthorizationApiResponse.new(
|
|
546
|
+
status_code: http_response.status,
|
|
547
|
+
content_type: content_type,
|
|
548
|
+
raw_response: http_response,
|
|
549
|
+
authorization_response: T.unsafe(obj)
|
|
550
|
+
)
|
|
551
|
+
|
|
552
|
+
return response
|
|
553
|
+
else
|
|
554
|
+
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'
|
|
555
|
+
end
|
|
556
|
+
elsif Utils.match_status_code(http_response.status, ['400', '401', '403'])
|
|
557
|
+
if Utils.match_content_type(content_type, 'application/json')
|
|
558
|
+
http_response = @sdk_configuration.hooks.after_success(
|
|
559
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
|
560
|
+
hook_ctx: hook_ctx
|
|
561
|
+
),
|
|
562
|
+
response: http_response
|
|
563
|
+
)
|
|
564
|
+
response_data = http_response.env.response_body
|
|
565
|
+
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::ResultError)
|
|
566
|
+
obj.raw_response = http_response
|
|
567
|
+
throw obj
|
|
568
|
+
else
|
|
569
|
+
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'
|
|
570
|
+
end
|
|
571
|
+
elsif Utils.match_status_code(http_response.status, ['500'])
|
|
572
|
+
if Utils.match_content_type(content_type, 'application/json')
|
|
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
|
+
response_data = http_response.env.response_body
|
|
580
|
+
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::ResultError)
|
|
581
|
+
obj.raw_response = http_response
|
|
582
|
+
throw obj
|
|
583
|
+
else
|
|
584
|
+
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'
|
|
585
|
+
end
|
|
586
|
+
elsif Utils.match_status_code(http_response.status, ['4XX'])
|
|
587
|
+
raise ::Authlete::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
|
|
588
|
+
elsif Utils.match_status_code(http_response.status, ['5XX'])
|
|
589
|
+
raise ::Authlete::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
|
|
590
|
+
else
|
|
591
|
+
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'
|
|
592
|
+
|
|
593
|
+
end
|
|
594
|
+
end
|
|
595
|
+
|
|
596
|
+
|
|
597
|
+
sig { params(authorization_fail_request: Models::Components::AuthorizationFailRequest, service_id: ::String, timeout_ms: T.nilable(Integer)).returns(Models::Operations::AuthAuthorizationFailApiResponse) }
|
|
598
|
+
def fail_request(authorization_fail_request:, service_id:, timeout_ms: nil)
|
|
599
|
+
# fail_request - Fail Authorization Request
|
|
600
|
+
# This API generates a content of an error authorization response that the authorization server implementation
|
|
601
|
+
# returns to the client application.
|
|
602
|
+
# ### Description
|
|
603
|
+
# This API is supposed to be called from within the implementation of the authorization endpoint of the service
|
|
604
|
+
# in order to generate an error response to the client application.
|
|
605
|
+
# The description of the `/auth/authorization` API describes the timing when this API should be called.
|
|
606
|
+
# The response from `/auth/authorization/fail` API has some parameters.
|
|
607
|
+
# Among them, it is `action` parameter that the authorization server implementation should check first because
|
|
608
|
+
# it denotes the next action that the authorization server implementation should take.
|
|
609
|
+
# According to the value of `action`, the authorization server implementation must take the steps described below.
|
|
610
|
+
# **INTERNAL\_SERVER\_ERROR**
|
|
611
|
+
# When the value of `action` is `INTERNAL\_SERVER\_ERROR`, it means that the request from the authorization
|
|
612
|
+
# server implementation was wrong or that an error occurred in Authlete.
|
|
613
|
+
# In either case, from the viewpoint of the client application, it is an error on the server side.
|
|
614
|
+
# Therefore, the service implementation should generate a response to the client application with
|
|
615
|
+
# HTTP status of "500 Internal Server Error". Authlete recommends `application/json` as the content type.
|
|
616
|
+
# The value of `responseContent` is a JSON string which describes the error, so it can be used
|
|
617
|
+
# as the entity body of the response.
|
|
618
|
+
# The following illustrates the response which the service implementation should generate and return
|
|
619
|
+
# to the client application.
|
|
620
|
+
# ```
|
|
621
|
+
# HTTP/1.1 500 Internal Server Error
|
|
622
|
+
# Content-Type: application/json
|
|
623
|
+
# Cache-Control: no-store
|
|
624
|
+
# Pragma: no-cache
|
|
625
|
+
# {responseContent}
|
|
626
|
+
# ```
|
|
627
|
+
# The endpoint implementation may return another different response to the client application since
|
|
628
|
+
# "500 Internal Server Error" is not required by OAuth 2.0.
|
|
629
|
+
# **BAD\_REQUEST**
|
|
630
|
+
# When the value of `action` is `BAD\_REQUEST`, it means that the ticket is no longer valid (deleted
|
|
631
|
+
# or expired) and that the reason of the invalidity was probably due to the end-user's too-delayed
|
|
632
|
+
# response to the authorization UI.
|
|
633
|
+
# A response with HTTP status of "400 Bad Request" should be returned to the client application and
|
|
634
|
+
# Authlete recommends `application/json` as the content type.
|
|
635
|
+
# The value of `responseContent` is a JSON string which describes the error, so it can be used
|
|
636
|
+
# as the entity body of the response.
|
|
637
|
+
# The following illustrates the response which the service implementation should generate and return
|
|
638
|
+
# to the client application.
|
|
639
|
+
# ```
|
|
640
|
+
# HTTP/1.1 400 Bad Request
|
|
641
|
+
# Content-Type: application/json
|
|
642
|
+
# Cache-Control: no-store
|
|
643
|
+
# Pragma: no-cache
|
|
644
|
+
# {responseContent}
|
|
645
|
+
# ```
|
|
646
|
+
# The endpoint implementation may return another different response to the client application since
|
|
647
|
+
# "400 Bad Request" is not required by OAuth 2.0.
|
|
648
|
+
# **LOCATION**
|
|
649
|
+
# When the value of `action` is `LOCATION`, it means that the response to the client application must
|
|
650
|
+
# be "302 Found" with Location header.
|
|
651
|
+
# The parameter responseContent contains a redirect URI with (1) an authorization code, an ID token
|
|
652
|
+
# and/or an access token (on success) or (2) an error code (on failure), so it can be used as the
|
|
653
|
+
# value of `Location` header.
|
|
654
|
+
# The following illustrates the response which the service implementation must generate and return
|
|
655
|
+
# to the client application.
|
|
656
|
+
# ```
|
|
657
|
+
# HTTP/1.1 302 Found
|
|
658
|
+
# Location: {responseContent}
|
|
659
|
+
# Cache-Control: no-store
|
|
660
|
+
# Pragma: no-cache
|
|
661
|
+
# ```
|
|
662
|
+
# **FORM**
|
|
663
|
+
# When the value of `action` is `FORM`, it means that the response to the client application must be 200 OK
|
|
664
|
+
# with an HTML which triggers redirection by JavaScript.
|
|
665
|
+
# This happens when the authorization request from the client application contained `response\_mode=form\_post`.
|
|
666
|
+
# The value of `responseContent` is an HTML which can be used as the entity body of the response.
|
|
667
|
+
# The following illustrates the response which the service implementation must generate and return
|
|
668
|
+
# to the client application.
|
|
669
|
+
# ```
|
|
670
|
+
# HTTP/1.1 200 OK
|
|
671
|
+
# Content-Type: text/html;charset=UTF-8
|
|
672
|
+
# Cache-Control: no-store
|
|
673
|
+
# Pragma: no-cache
|
|
674
|
+
# {responseContent}
|
|
675
|
+
# ```
|
|
676
|
+
#
|
|
677
|
+
request = Models::Operations::AuthAuthorizationFailApiRequest.new(
|
|
678
|
+
service_id: service_id,
|
|
679
|
+
authorization_fail_request: authorization_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::AuthAuthorizationFailApiRequest,
|
|
685
|
+
base_url,
|
|
686
|
+
'/api/{serviceId}/auth/authorization/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, :authorization_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: 'auth_authorization_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::AuthorizationFailResponse)
|
|
776
|
+
response = Models::Operations::AuthAuthorizationFailApiResponse.new(
|
|
777
|
+
status_code: http_response.status,
|
|
778
|
+
content_type: content_type,
|
|
779
|
+
raw_response: http_response,
|
|
780
|
+
authorization_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(authorization_issue_request: Models::Components::AuthorizationIssueRequest, service_id: ::String, timeout_ms: T.nilable(Integer)).returns(Models::Operations::AuthAuthorizationIssueApiResponse) }
|
|
829
|
+
def issue_response(authorization_issue_request:, service_id:, timeout_ms: nil)
|
|
830
|
+
# issue_response - Issue Authorization Response
|
|
831
|
+
# This API parses request parameters of an authorization request and returns necessary data for the
|
|
832
|
+
# authorization server implementation to process the authorization request further.
|
|
833
|
+
# ### Description
|
|
834
|
+
# This API is supposed to be called from within the implementation of the authorization endpoint of
|
|
835
|
+
# the service in order to generate a successful response to the client application.
|
|
836
|
+
# The description of the `/auth/authorization` API describes the timing when this API should be called
|
|
837
|
+
# and the meaning of request parameters. See [ISSUE] in `NO\_INTERACTION`.
|
|
838
|
+
# The response from `/auth/authorization/issue` API has some parameters.
|
|
839
|
+
# Among them, it is `action` parameter that the authorization server implementation should check first
|
|
840
|
+
# because it denotes the next action that the authorization server implementation should take.
|
|
841
|
+
# According to the value of `action`, the authorization server implementation must take the steps
|
|
842
|
+
# described below.
|
|
843
|
+
# **INTERNAL\_SERVER\_ERROR**
|
|
844
|
+
# When the value of `action` is `INTERNAL\_SERVER\_ERROR`, it means that the request from the authorization
|
|
845
|
+
# server implementation was wrong or that an error occurred in Authlete.
|
|
846
|
+
# In either case, from the viewpoint of the client application, it is an error on the server side.
|
|
847
|
+
# Therefore, the service implementation should generate a response to the client application with
|
|
848
|
+
# HTTP status of "500 Internal Server Error".
|
|
849
|
+
# The value of `responseContent` is a JSON string which describes the error, so it can be used as
|
|
850
|
+
# the entity body of the response.
|
|
851
|
+
# The following illustrates the response which the service implementation should generate and return
|
|
852
|
+
# to the client application.
|
|
853
|
+
# ```
|
|
854
|
+
# HTTP/1.1 500 Internal Server Error
|
|
855
|
+
# Content-Type: application/json
|
|
856
|
+
# Cache-Control: no-store
|
|
857
|
+
# Pragma: no-cache
|
|
858
|
+
# {responseContent}
|
|
859
|
+
# ```
|
|
860
|
+
# The endpoint implementation may return another different response to the client application since
|
|
861
|
+
# "500 Internal Server Error" is not required by OAuth 2.0.
|
|
862
|
+
# **BAD\_REQUEST**
|
|
863
|
+
# When the value of "action" is `BAD\_REQUEST`, it means that the ticket is no longer valid (deleted
|
|
864
|
+
# or expired) and that the reason of the invalidity was probably due to the end-user's too-delayed
|
|
865
|
+
# response to the authorization UI.
|
|
866
|
+
# The HTTP status of the response returned to the client application should be "400 Bad Request"
|
|
867
|
+
# and the content type should be `application/json` although OAuth 2.0 specification does not mention
|
|
868
|
+
# the format of the error response.
|
|
869
|
+
# The value of `responseContent` is a JSON string which describes the error, so it can be used as
|
|
870
|
+
# the entity body of the response.
|
|
871
|
+
# The following illustrates the response which the service implementation should generate and return
|
|
872
|
+
# to the client application.
|
|
873
|
+
# ```
|
|
874
|
+
# HTTP/1.1 400 Bad Request
|
|
875
|
+
# Content-Type: application/json
|
|
876
|
+
# Cache-Control: no-store
|
|
877
|
+
# Pragma: no-cache
|
|
878
|
+
# {responseContent}
|
|
879
|
+
# ```
|
|
880
|
+
# The endpoint implementation may return another different response to the client application since
|
|
881
|
+
# "400 Bad Request" is not required by OAuth 2.0.
|
|
882
|
+
# **LOCATION**
|
|
883
|
+
# When the value of `action` is `LOCATION`, it means that the response to the client application
|
|
884
|
+
# should be "302 Found" with `Location` header.
|
|
885
|
+
# The value of `responseContent` is a redirect URI which contains (1) an authorization code, an ID
|
|
886
|
+
# token and/or an access token (on success) or (2) an error code (on failure), so it can be used as
|
|
887
|
+
# the value of `Location` header.
|
|
888
|
+
# The following illustrates the response which the service implementation must generate and return
|
|
889
|
+
# to the client application.
|
|
890
|
+
# ```
|
|
891
|
+
# HTTP/1.1 302 Found
|
|
892
|
+
# Location: {responseContent}
|
|
893
|
+
# Cache-Control: no-store
|
|
894
|
+
# Pragma: no-cache
|
|
895
|
+
# ```
|
|
896
|
+
# **FORM**
|
|
897
|
+
# When the value of `action` is `FORM`, it means that the response to the client application should
|
|
898
|
+
# be "200 OK" with an HTML which triggers redirection by JavaScript. This happens when the authorization
|
|
899
|
+
# request from the client contains `response\_mode=form\_post` request parameter.
|
|
900
|
+
# The value of `responseContent` is an HTML which satisfies the requirements of `response\_mode=form\_post`,
|
|
901
|
+
# so it can be used as the entity body of the response.
|
|
902
|
+
# The following illustrates the response which the service implementation should generate and return
|
|
903
|
+
# to the client application.
|
|
904
|
+
# ```
|
|
905
|
+
# HTTP/1.1 200 OK
|
|
906
|
+
# Content-Type: text/html;charset=UTF-8
|
|
907
|
+
# Cache-Control: no-store
|
|
908
|
+
# Pragma: no-cache
|
|
909
|
+
# {responseContent}
|
|
910
|
+
# ```
|
|
911
|
+
#
|
|
912
|
+
request = Models::Operations::AuthAuthorizationIssueApiRequest.new(
|
|
913
|
+
service_id: service_id,
|
|
914
|
+
authorization_issue_request: authorization_issue_request
|
|
915
|
+
)
|
|
916
|
+
url, params = @sdk_configuration.get_server_details
|
|
917
|
+
base_url = Utils.template_url(url, params)
|
|
918
|
+
url = Utils.generate_url(
|
|
919
|
+
Models::Operations::AuthAuthorizationIssueApiRequest,
|
|
920
|
+
base_url,
|
|
921
|
+
'/api/{serviceId}/auth/authorization/issue',
|
|
922
|
+
request
|
|
923
|
+
)
|
|
924
|
+
headers = {}
|
|
925
|
+
headers = T.cast(headers, T::Hash[String, String])
|
|
926
|
+
req_content_type, data, form = Utils.serialize_request_body(request, false, false, :authorization_issue_request, :json)
|
|
927
|
+
headers['content-type'] = req_content_type
|
|
928
|
+
raise StandardError, 'request body is required' if data.nil? && form.nil?
|
|
929
|
+
|
|
930
|
+
if form
|
|
931
|
+
body = Utils.encode_form(form)
|
|
932
|
+
elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
|
|
933
|
+
body = URI.encode_www_form(T.cast(data, T::Hash[Symbol, Object]))
|
|
934
|
+
else
|
|
935
|
+
body = data
|
|
936
|
+
end
|
|
937
|
+
headers['Accept'] = 'application/json'
|
|
938
|
+
headers['user-agent'] = @sdk_configuration.user_agent
|
|
939
|
+
|
|
940
|
+
security = @sdk_configuration.security_source&.call
|
|
941
|
+
|
|
942
|
+
timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
|
|
943
|
+
timeout ||= @sdk_configuration.timeout
|
|
944
|
+
|
|
945
|
+
|
|
946
|
+
connection = @sdk_configuration.client
|
|
947
|
+
|
|
948
|
+
hook_ctx = SDKHooks::HookContext.new(
|
|
949
|
+
config: @sdk_configuration,
|
|
950
|
+
base_url: base_url,
|
|
951
|
+
oauth2_scopes: [],
|
|
952
|
+
operation_id: 'auth_authorization_issue_api',
|
|
953
|
+
security_source: @sdk_configuration.security_source
|
|
954
|
+
)
|
|
955
|
+
|
|
956
|
+
error = T.let(nil, T.nilable(StandardError))
|
|
957
|
+
http_response = T.let(nil, T.nilable(Faraday::Response))
|
|
958
|
+
|
|
959
|
+
|
|
960
|
+
begin
|
|
961
|
+
http_response = T.must(connection).post(url) do |req|
|
|
962
|
+
req.body = body
|
|
963
|
+
req.headers.merge!(headers)
|
|
964
|
+
req.options.timeout = timeout unless timeout.nil?
|
|
965
|
+
Utils.configure_request_security(req, security)
|
|
966
|
+
|
|
967
|
+
@sdk_configuration.hooks.before_request(
|
|
968
|
+
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
|
969
|
+
hook_ctx: hook_ctx
|
|
970
|
+
),
|
|
971
|
+
request: req
|
|
972
|
+
)
|
|
973
|
+
end
|
|
974
|
+
rescue StandardError => e
|
|
975
|
+
error = e
|
|
976
|
+
ensure
|
|
977
|
+
if http_response.nil? || Utils.error_status?(http_response.status)
|
|
978
|
+
http_response = @sdk_configuration.hooks.after_error(
|
|
979
|
+
error: error,
|
|
980
|
+
hook_ctx: SDKHooks::AfterErrorHookContext.new(
|
|
981
|
+
hook_ctx: hook_ctx
|
|
982
|
+
),
|
|
983
|
+
response: http_response
|
|
984
|
+
)
|
|
985
|
+
else
|
|
986
|
+
http_response = @sdk_configuration.hooks.after_success(
|
|
987
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
|
988
|
+
hook_ctx: hook_ctx
|
|
989
|
+
),
|
|
990
|
+
response: http_response
|
|
991
|
+
)
|
|
992
|
+
end
|
|
993
|
+
|
|
994
|
+
if http_response.nil?
|
|
995
|
+
raise error if !error.nil?
|
|
996
|
+
raise 'no response'
|
|
997
|
+
end
|
|
998
|
+
end
|
|
999
|
+
|
|
1000
|
+
content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream')
|
|
1001
|
+
if Utils.match_status_code(http_response.status, ['200'])
|
|
1002
|
+
if Utils.match_content_type(content_type, 'application/json')
|
|
1003
|
+
http_response = @sdk_configuration.hooks.after_success(
|
|
1004
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
|
1005
|
+
hook_ctx: hook_ctx
|
|
1006
|
+
),
|
|
1007
|
+
response: http_response
|
|
1008
|
+
)
|
|
1009
|
+
response_data = http_response.env.response_body
|
|
1010
|
+
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Components::AuthorizationIssueResponse)
|
|
1011
|
+
response = Models::Operations::AuthAuthorizationIssueApiResponse.new(
|
|
1012
|
+
status_code: http_response.status,
|
|
1013
|
+
content_type: content_type,
|
|
1014
|
+
raw_response: http_response,
|
|
1015
|
+
authorization_issue_response: T.unsafe(obj)
|
|
1016
|
+
)
|
|
1017
|
+
|
|
1018
|
+
return response
|
|
1019
|
+
else
|
|
1020
|
+
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'
|
|
1021
|
+
end
|
|
1022
|
+
elsif Utils.match_status_code(http_response.status, ['400', '401', '403'])
|
|
1023
|
+
if Utils.match_content_type(content_type, 'application/json')
|
|
1024
|
+
http_response = @sdk_configuration.hooks.after_success(
|
|
1025
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
|
1026
|
+
hook_ctx: hook_ctx
|
|
1027
|
+
),
|
|
1028
|
+
response: http_response
|
|
1029
|
+
)
|
|
1030
|
+
response_data = http_response.env.response_body
|
|
1031
|
+
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::ResultError)
|
|
1032
|
+
obj.raw_response = http_response
|
|
1033
|
+
throw obj
|
|
1034
|
+
else
|
|
1035
|
+
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'
|
|
1036
|
+
end
|
|
1037
|
+
elsif Utils.match_status_code(http_response.status, ['500'])
|
|
1038
|
+
if Utils.match_content_type(content_type, 'application/json')
|
|
1039
|
+
http_response = @sdk_configuration.hooks.after_success(
|
|
1040
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
|
1041
|
+
hook_ctx: hook_ctx
|
|
1042
|
+
),
|
|
1043
|
+
response: http_response
|
|
1044
|
+
)
|
|
1045
|
+
response_data = http_response.env.response_body
|
|
1046
|
+
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::ResultError)
|
|
1047
|
+
obj.raw_response = http_response
|
|
1048
|
+
throw obj
|
|
1049
|
+
else
|
|
1050
|
+
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'
|
|
1051
|
+
end
|
|
1052
|
+
elsif Utils.match_status_code(http_response.status, ['4XX'])
|
|
1053
|
+
raise ::Authlete::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
|
|
1054
|
+
elsif Utils.match_status_code(http_response.status, ['5XX'])
|
|
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
|
+
else
|
|
1057
|
+
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'
|
|
1058
|
+
|
|
1059
|
+
end
|
|
1060
|
+
end
|
|
1061
|
+
end
|
|
1062
|
+
end
|