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,953 @@
|
|
|
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 Tokens
|
|
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(token_request: Models::Components::TokenRequest, service_id: ::String, timeout_ms: T.nilable(Integer)).returns(Models::Operations::AuthTokenApiResponse) }
|
|
43
|
+
def process_request(token_request:, service_id:, timeout_ms: nil)
|
|
44
|
+
# process_request - Process Token Request
|
|
45
|
+
# This API parses request parameters of an authorization request and returns necessary data for the
|
|
46
|
+
# authorization server implementation to process the authorization request further.
|
|
47
|
+
# ### Description
|
|
48
|
+
# This API is supposed to be called from with the implementation of the token endpoint of the service.
|
|
49
|
+
# The endpoint implementation must extract the request parameters from the token request from the
|
|
50
|
+
# client application and pass them as the value of parameters request parameter to Authlete's `/auth/token` API.
|
|
51
|
+
# The value of parameters is the entire entity body (which is formatted in `application/x-www-form-urlencoded`)
|
|
52
|
+
# of the token request.
|
|
53
|
+
# In addition, if the token endpoint of the authorization server implementation supports basic authentication
|
|
54
|
+
# as a means of [client authentication](https://datatracker.ietf.org/doc/html/rfc6749#section-2.3),
|
|
55
|
+
# the client credentials must be extracted from `Authorization` header and they must be passed as
|
|
56
|
+
# `clientId` request parameter and `clientSecret` request parameter to Authlete's `/auth/token` API.
|
|
57
|
+
# The following code snippet is an example in JAX-RS showing how to extract request parameters from
|
|
58
|
+
# the token request and client credentials from Authorization header.
|
|
59
|
+
# ```java
|
|
60
|
+
# @POST
|
|
61
|
+
# @Consumes(MediaType.APPLICATION\_FORM\_URLENCODED)
|
|
62
|
+
# public Response post(
|
|
63
|
+
# @HeaderParam(HttpHeaders.AUTHORIZATION) String auth,
|
|
64
|
+
# String parameters)
|
|
65
|
+
# {
|
|
66
|
+
# // Convert the value of Authorization header (credentials of
|
|
67
|
+
# // the client application), if any, into BasicCredentials.
|
|
68
|
+
# BasicCredentials credentials = BasicCredentials.parse(auth);
|
|
69
|
+
# // The credentials of the client application extracted from
|
|
70
|
+
# // 'Authorization' header. These may be null.
|
|
71
|
+
# String clientId = credentials == null ? null
|
|
72
|
+
# : credentials.getUserId();
|
|
73
|
+
# String clientSecret = credentials == null ? null
|
|
74
|
+
# : credentials.getPassword();
|
|
75
|
+
# // Process the given parameters.
|
|
76
|
+
# return process(parameters, clientId, clientSecret);
|
|
77
|
+
# }
|
|
78
|
+
# ```
|
|
79
|
+
# The response from `/auth/token` API has some parameters. Among them, it is action parameter that
|
|
80
|
+
# the service implementation should check first because it denotes the next action that the authorization
|
|
81
|
+
# server implementation should take. According to the value of action, the authorization server
|
|
82
|
+
# implementation must take the steps described below.
|
|
83
|
+
# **INTERNAL\_SERVER\_ERROR**
|
|
84
|
+
# When the value of `action` is `INTERNAL\_SERVER\_ERROR`, it means that the request from the authorization
|
|
85
|
+
# server implementation was wrong or that an error occurred in Authlete.
|
|
86
|
+
# In either case, from the viewpoint of the client application, it is an error on the server side.
|
|
87
|
+
# Therefore, the service implementation should generate a response to the client application with
|
|
88
|
+
# HTTP status of "500 Internal Server Error". Authlete recommends `application/json` as the content
|
|
89
|
+
# type although OAuth 2.0 specification does not mention the format of the error response when the
|
|
90
|
+
# redirect URI is not usable.
|
|
91
|
+
# The value of `responseContent` is a JSON string which describes the error, so it can be
|
|
92
|
+
# used as the entity body of the response.
|
|
93
|
+
# The following illustrates the response which the service implementation should generate and return
|
|
94
|
+
# to the client application.
|
|
95
|
+
# ```
|
|
96
|
+
# HTTP/1.1 500 Internal Server Error
|
|
97
|
+
# Content-Type: application/json
|
|
98
|
+
# Cache-Control: no-store
|
|
99
|
+
# Pragma: no-cache
|
|
100
|
+
# {responseContent}
|
|
101
|
+
# ```
|
|
102
|
+
# The endpoint implementation may return another different response to the client application
|
|
103
|
+
# since "500 Internal Server Error" is not required by OAuth 2.0.
|
|
104
|
+
# **INVALID\_CLIENT**
|
|
105
|
+
# When the value of `action` is `INVALID\_CLIENT`, it means that authentication of the client failed.
|
|
106
|
+
# In this case, the HTTP status of the response to the client application is either "400 Bad Request"
|
|
107
|
+
# or "401 Unauthorized". This requirement comes from [RFC 6749, 5.2. Error Response](https://datatracker.ietf.org/doc/html/rfc6749#section-5.2).
|
|
108
|
+
# The description about `invalid\_client` shown below is an excerpt from RFC 6749.
|
|
109
|
+
# Client authentication failed (e.g., unknown client, no client authentication included, or unsupported
|
|
110
|
+
# authentication method). The authorization server MAY return an HTTP 401 (Unauthorized) status code
|
|
111
|
+
# to indicate which HTTP authentication schemes are supported. If the client attempted to authenticate
|
|
112
|
+
# via the `Authorization` request header field, the authorization server MUST respond with an HTTP
|
|
113
|
+
# 401 (Unauthorized) status code and include the `WWW-Authenticate` response header field matching
|
|
114
|
+
# the authentication scheme used by the client.
|
|
115
|
+
# In either case, the value of `responseContent` is a JSON string which can be used as the entity
|
|
116
|
+
# body of the response to the client application.
|
|
117
|
+
# The following illustrate responses which the service implementation must generate and return to
|
|
118
|
+
# the client application.
|
|
119
|
+
# ```
|
|
120
|
+
# HTTP/1.1 400 Bad Request
|
|
121
|
+
# Content-Type: application/json
|
|
122
|
+
# Cache-Control: no-store
|
|
123
|
+
# Pragma: no-cache
|
|
124
|
+
# {responseContent}
|
|
125
|
+
# ```
|
|
126
|
+
# ```
|
|
127
|
+
# HTTP/1.1 401 Unauthorized
|
|
128
|
+
# WWW-Authenticate: {challenge}
|
|
129
|
+
# Content-Type: application/json
|
|
130
|
+
# Cache-Control: no-store
|
|
131
|
+
# Pragma: no-cache
|
|
132
|
+
# {responseContent}
|
|
133
|
+
# ```
|
|
134
|
+
# **BAD\_REQUEST**
|
|
135
|
+
# When the value of `action` is `BAD\_REQUEST`, it means that the request from the client application
|
|
136
|
+
# is invalid.
|
|
137
|
+
# A response with HTTP status of "400 Bad Request" must be returned to the client application and
|
|
138
|
+
# the content type must be `application/json`.
|
|
139
|
+
# The value of `responseContent` is a JSON string which describes the error, so it can be used as
|
|
140
|
+
# the entity body of the response.
|
|
141
|
+
# The following illustrates the response which the service implementation should generate and return
|
|
142
|
+
# to the client application.
|
|
143
|
+
# ```
|
|
144
|
+
# HTTP/1.1 400 Bad Request
|
|
145
|
+
# Content-Type: application/json
|
|
146
|
+
# Cache-Control: no-store
|
|
147
|
+
# Pragma: no-cache
|
|
148
|
+
# {responseContent}
|
|
149
|
+
# ```
|
|
150
|
+
# **PASSWORD**
|
|
151
|
+
# When the value of `"action"` is `"PASSWORD"`, it means that
|
|
152
|
+
# the request from the client application is valid and `grant\_type`
|
|
153
|
+
# is `"password"`. That is, the flow is
|
|
154
|
+
# ["Resource Owner
|
|
155
|
+
# Password Credentials"](https://www.rfc-editor.org/rfc/rfc6749.html#section-4.3).
|
|
156
|
+
# In this case, {@link #getUsername()} returns the value of `"username"`
|
|
157
|
+
# request parameter and {@link #getPassword()} returns the value of {@code
|
|
158
|
+
# "password"} request parameter which were contained in the token request
|
|
159
|
+
# from the client application. The service implementation must validate the
|
|
160
|
+
# credentials of the resource owner (= end-user) and take either of the
|
|
161
|
+
# actions below according to the validation result.
|
|
162
|
+
# 1. When the credentials are valid, call Authlete's /auth/token/issue} API to generate an access token for the client
|
|
163
|
+
# application. The API requires `"ticket"` request parameter and
|
|
164
|
+
# `"subject"` request parameter.
|
|
165
|
+
# Use the value returned from {@link #getTicket()} method as the value
|
|
166
|
+
# for `"ticket"` parameter.
|
|
167
|
+
# 2. The response from `/auth/token/issue` API ({@link
|
|
168
|
+
# TokenIssueResponse}) contains data (an access token and others)
|
|
169
|
+
# which should be returned to the client application. Use the data
|
|
170
|
+
# to generate a response to the client application.
|
|
171
|
+
# 3. When the credentials are invalid, call Authlete's {@code
|
|
172
|
+
# /auth/token/fail} API with `reason=`{@link
|
|
173
|
+
# TokenFailRequest.Reason#INVALID\_RESOURCE\_OWNER\_CREDENTIALS
|
|
174
|
+
# INVALID\_RESOURCE\_OWNER\_CREDENTIALS} to generate an error response
|
|
175
|
+
# for the client application. The API requires `"ticket"`
|
|
176
|
+
# request parameter. Use the value returned from {@link #getTicket()}
|
|
177
|
+
# method as the value for `"ticket"` parameter.
|
|
178
|
+
# 4. The response from `/auth/token/fail` API ({@link
|
|
179
|
+
# TokenFailResponse}) contains error information which should be
|
|
180
|
+
# returned to the client application. Use it to generate a response
|
|
181
|
+
# to the client application.
|
|
182
|
+
# **OK**
|
|
183
|
+
# When the value of `action` is `OK`, it means that the request from the client application is valid
|
|
184
|
+
# and an access token, and optionally an ID token, is ready to be issued.
|
|
185
|
+
# The HTTP status of the response returned to the client application must be "200 OK" and the content
|
|
186
|
+
# type must be `application/json`.
|
|
187
|
+
# The value of `responseContent` is a JSON string which contains an access token (and optionally
|
|
188
|
+
# an ID token), so it can be used as the entity body of the response.
|
|
189
|
+
# The following illustrates the response which the service implementation must generate and return
|
|
190
|
+
# to the client application.
|
|
191
|
+
# ```
|
|
192
|
+
# HTTP/1.1 200 OK
|
|
193
|
+
# Content-Type: application/json
|
|
194
|
+
# Cache-Control: no-store
|
|
195
|
+
# Pragma: no-cache
|
|
196
|
+
# {responseContent}
|
|
197
|
+
# ```
|
|
198
|
+
# **TOKEN\_EXCHANGE (Authlete 2.3 onwards)**
|
|
199
|
+
# When the value of `"action"` is `"TOKEN\_EXCHANGE"`, it means
|
|
200
|
+
# that the request from the client application is a valid token exchange
|
|
201
|
+
# request (cf. [RFC
|
|
202
|
+
# 8693 OAuth 2.0 Token Exchange](https://www.rfc-editor.org/rfc/rfc8693.html)) and that the request has already passed
|
|
203
|
+
# the following validation steps.
|
|
204
|
+
# 1. Confirm that the value of the `requested\_token\_type` request parameter
|
|
205
|
+
# is one of the registered token type identifiers if the request parameter is
|
|
206
|
+
# given and its value is not empty.
|
|
207
|
+
# 2. Confirm that the `subject\_token` request parameter is given and its
|
|
208
|
+
# value is not empty.
|
|
209
|
+
# 3. Confirm that the `subject\_token\_type` request parameter is given and
|
|
210
|
+
# its value is one of the registered token type identifiers.
|
|
211
|
+
# 4. Confirm that the `actor\_token\_type` request parameter is given and
|
|
212
|
+
# its value is one of the registered token type identifiers if the
|
|
213
|
+
# `actor\_token` request parameter is given and its value is not empty.
|
|
214
|
+
# 5. Confirm that the `actor\_token\_type` request parameter is not given
|
|
215
|
+
# or its value is empty when the `actor\_token` request parameter is
|
|
216
|
+
# not given or its value is empty.
|
|
217
|
+
# Furthermore, Authlete performs additional validation on the tokens specified
|
|
218
|
+
# by the `subject\_token` request parameter and the `actor\_token`
|
|
219
|
+
# request parameter according to their respective token types as shown below.
|
|
220
|
+
# **Token Validation Steps**
|
|
221
|
+
# \*Token Type: `urn:ietf:params:oauth:token-type:jwt`\*
|
|
222
|
+
# 1. Confirm that the format conforms to the JWT specification [RFC 7519][https://www.rfc-editor.org/rfc/rfc7519.html].
|
|
223
|
+
# 2. Check if the JWT is encrypted and if it is encrypted, then (a) reject
|
|
224
|
+
# the token exchange request when the {@link
|
|
225
|
+
# Service#isTokenExchangeEncryptedJwtRejected()
|
|
226
|
+
# tokenExchangeEncryptedJwtRejected} flag of the service is `true`
|
|
227
|
+
# or (b) skip remaining validation steps when the flag is `false`.
|
|
228
|
+
# Note that Authlete does not verify an encrypted JWT because there is
|
|
229
|
+
# no standard way to obtain the key to decrypt the JWT with. This means
|
|
230
|
+
# that you must verify an encrypted JWT by yourself when one is used as
|
|
231
|
+
# an input token with the token type
|
|
232
|
+
# { @code "urn:ietf:params:oauth:token-type:jwt" }.
|
|
233
|
+
# 3. Confirm that the current time has not reached the time indicated by
|
|
234
|
+
# the `exp` claim if the JWT contains the claim.
|
|
235
|
+
# 4. Confirm that the current time is equal to or after the time indicated
|
|
236
|
+
# by the `iat` claim if the JWT contains the claim.
|
|
237
|
+
# 5.Confirm that the current time is equal to or after the time indicated
|
|
238
|
+
# by the `nbf` claim if the JWT contains the claim.
|
|
239
|
+
# 6. Check if the JWT is signed and if it is not signed, then (a) reject
|
|
240
|
+
# the token exchange request when the {@link
|
|
241
|
+
# Service#isTokenExchangeUnsignedJwtRejected()
|
|
242
|
+
# tokenExchangeUnsignedJwtRejected} flag of the service is `true`
|
|
243
|
+
# or (b) finish validation on the input token. Note that Authlete does
|
|
244
|
+
# not verify the signature of the JWT because there is no standard way
|
|
245
|
+
# to obtain the key to verify the signature of a JWT with. This means
|
|
246
|
+
# that you must verify the signature by yourself when a signed JWT is
|
|
247
|
+
# used as an input token with the token type
|
|
248
|
+
# `"urn:ietf:params:oauth:token-type:jwt"`.
|
|
249
|
+
# \*Token Type: `urn:ietf:params:oauth:token-type:access\_token`\*
|
|
250
|
+
# 1. Confirm that the token is an access token that has been issued by
|
|
251
|
+
# the Authlete server of your service. This implies that access
|
|
252
|
+
# tokens issued by other systems cannot be used as a subject token
|
|
253
|
+
# or an actor token with the token type
|
|
254
|
+
# `urn:ietf:params:oauth:token-type:access_token`.
|
|
255
|
+
# 2. Confirm that the access token has not expired.
|
|
256
|
+
# 3. Confirm that the access token belongs to the service.
|
|
257
|
+
# \*Token Type: `urn:ietf:params:oauth:token-type:refresh\_token`\*
|
|
258
|
+
# 1. Confirm that the token is a refresh token that has been issued by
|
|
259
|
+
# the Authlete server of your service. This implies that refresh
|
|
260
|
+
# tokens issued by other systems cannot be used as a subject token
|
|
261
|
+
# or an actor token with the token type
|
|
262
|
+
# `urn:ietf:params:oauth:token-type:refresh_token`.
|
|
263
|
+
# 2. Confirm that the refresh token has not expired.
|
|
264
|
+
# 3. Confirm that the refresh token belongs to the service.
|
|
265
|
+
# \*Token Type: `urn:ietf:params:oauth:token-type:id\_token`\*
|
|
266
|
+
# 1. Confirm that the format conforms to the JWT specification ([RFC 7519](https://www.rfc-editor.org/rfc/rfc7519.html)).
|
|
267
|
+
# 2. Check if the ID Token is encrypted and if it is encrypted, then (a)
|
|
268
|
+
# reject the token exchange request when the {@link
|
|
269
|
+
# Service#isTokenExchangeEncryptedJwtRejected()
|
|
270
|
+
# tokenExchangeEncryptedJwtRejected} flag of the service is `true`
|
|
271
|
+
# or (b) skip remaining validation steps when the flag is `false`.
|
|
272
|
+
# Note that Authlete does not verify an encrypted ID Token because
|
|
273
|
+
# there is no standard way to obtain the key to decrypt the ID Token
|
|
274
|
+
# with in the context of token exchange where the client ID for the
|
|
275
|
+
# encrypted ID Token cannot be determined. This means that you must
|
|
276
|
+
# verify an encrypted ID Token by yourself when one is used as an
|
|
277
|
+
# input token with the token type
|
|
278
|
+
# `"urn:ietf:params:oauth:token-type:id\_token"`.
|
|
279
|
+
# 3. Confirm that the ID Token contains the `exp` claim and the
|
|
280
|
+
# current time has not reached the time indicated by the claim.
|
|
281
|
+
# 4. Confirm that the ID Token contains the `iat` claim and the
|
|
282
|
+
# current time is equal to or after the time indicated by the claim.
|
|
283
|
+
# 5. Confirm that the current time is equal to or after the time indicated
|
|
284
|
+
# by the `nbf` claim if the ID Token contains the claim.
|
|
285
|
+
# 6. Confirm that the ID Token contains the `iss` claim and the
|
|
286
|
+
# value is a valid URI. In addition, confirm that the URI has the
|
|
287
|
+
# `https` scheme, no query component and no fragment component.
|
|
288
|
+
# 7. Confirm that the ID Token contains the `aud` claim and its
|
|
289
|
+
# value is a JSON string or an array of JSON strings.
|
|
290
|
+
# 8. Confirm that the value of the `nonce` claim is a JSON string
|
|
291
|
+
# if the ID Token contains the claim.
|
|
292
|
+
# 9. Check if the ID Token is signed and if it is not signed, then (a)
|
|
293
|
+
# reject the token exchange request when the {@link
|
|
294
|
+
# Service#isTokenExchangeUnsignedJwtRejected()
|
|
295
|
+
# tokenExchangeUnsignedJwtRejected} flag of the service is `true`
|
|
296
|
+
# or (b) finish validation on the input token.
|
|
297
|
+
# 10. Confirm that the signature algorithm is asymmetric. This implies that
|
|
298
|
+
# ID Tokens whose signature algorithm is symmetric (`HS256`,
|
|
299
|
+
# `HS384` or `HS512`) cannot be used as a subject token or
|
|
300
|
+
# an actor token with the token type
|
|
301
|
+
# `urn:ietf:params:oauth:token-type:id\_token`.
|
|
302
|
+
# 11. Verify the signature of the ID Token. Signature verification is
|
|
303
|
+
# performed even in the case where the issuer of the ID Token is not
|
|
304
|
+
# your service. But in that case, the issuer must support the discovery
|
|
305
|
+
# endpoint defined in [OpenID
|
|
306
|
+
# Connect Discovery 1.0](https://openid.net/specs/openid-connect-discovery-1_0.html). Otherwise, signature verification fails.
|
|
307
|
+
# \*Token Type: `urn:ietf:params:oauth:token-type:saml1`\*
|
|
308
|
+
# (Authlete does not perform any validation for this token type.)
|
|
309
|
+
# \*Token Type: `urn:ietf:params:oauth:token-type:saml2`\*
|
|
310
|
+
# (Authlete does not perform any validation for this token type.)
|
|
311
|
+
# The specification of Token Exchange ([RFC 8693](https://www.rfc-editor.org/rfc/rfc8693.html)) is very
|
|
312
|
+
# flexible. In other words, the specification has abandoned the task of
|
|
313
|
+
# determining details. Therefore, for secure token exchange, you have
|
|
314
|
+
# to complement the specification with your own rules. For that purpose,
|
|
315
|
+
# Authlete provides some configuration options as listed below.
|
|
316
|
+
# Authorization server implementers may utilize them and/or implement
|
|
317
|
+
# their own rules.
|
|
318
|
+
# In the case of {@link Action#TOKEN\_EXCHANGE TOKEN\_EXCHANGE}, the {@link
|
|
319
|
+
# #getResponseContent()} method returns `null`. You have to construct
|
|
320
|
+
# the token response by yourself.
|
|
321
|
+
# For example, you may generate an access token by calling Authlete's
|
|
322
|
+
# `/api/auth/token/create` API and construct a token response like
|
|
323
|
+
# below.
|
|
324
|
+
# ```
|
|
325
|
+
# HTTP/1.1 401 Unauthorized
|
|
326
|
+
# WWW-Authenticate: {challenge}
|
|
327
|
+
# Content-Type: application/json
|
|
328
|
+
# Cache-Control: no-store
|
|
329
|
+
# Pragma: no-cache
|
|
330
|
+
# {responseContent}
|
|
331
|
+
# ```
|
|
332
|
+
# ```
|
|
333
|
+
# HTTP/1.1 200 OK
|
|
334
|
+
# Content-Type: application/json
|
|
335
|
+
# Cache-Control: no-cache, no-store
|
|
336
|
+
# {
|
|
337
|
+
# "access\_token": "{@link TokenCreateResponse#getAccessToken()}",
|
|
338
|
+
# "issued\_token\_type": "urn:ietf:params:oauth:token-type:access\_token",
|
|
339
|
+
# "token\_type": "Bearer",
|
|
340
|
+
# "expires\_in": { @link TokenCreateResponse#getExpiresIn() },
|
|
341
|
+
# "scope": "String.join(" ", {@link TokenCreateResponse#getScopes()})"
|
|
342
|
+
# }
|
|
343
|
+
# ```
|
|
344
|
+
# **JWT\_BEARER JWT\_BEARER (Authlete 2.3 onwards)**
|
|
345
|
+
# When the value of `"action"` is `"JWT\_BEARER"`, it means that
|
|
346
|
+
# the request from the client application is a valid token request with the
|
|
347
|
+
# grant type `"urn:ietf:params:oauth:grant-type:jwt-bearer"` ([RFC 7523 JSON Web Token (JWT)
|
|
348
|
+
# Profile for OAuth 2.0 Client Authentication and Authorization Grants](https://www.rfc-editor.org/rfc/rfc7523.html))
|
|
349
|
+
# and that the request has already passed the following validation steps.
|
|
350
|
+
# 1. Confirm that the `assertion` request parameter is given and its value
|
|
351
|
+
# is not empty.
|
|
352
|
+
# 2. Confirm that the format of the assertion conforms to the JWT specification
|
|
353
|
+
# ([RFC 7519](https://www.rfc-editor.org/rfc/rfc7519.html)).
|
|
354
|
+
# 3. Check if the JWT is encrypted and if it is encrypted, then (a) reject the
|
|
355
|
+
# token request when the {@link Service#isJwtGrantEncryptedJwtRejected()
|
|
356
|
+
# jwtGrantEncryptedJwtRejected} flag of the service is `true` or (b)
|
|
357
|
+
# skip remaining validation steps when the flag is `false`. Note that
|
|
358
|
+
# Authlete does not verify an encrypted JWT because there is no standard way
|
|
359
|
+
# to obtain the key to decrypt the JWT with. This means that you must verify
|
|
360
|
+
# an encrypted JWT by yourself.
|
|
361
|
+
# 4. Confirm that the JWT contains the `iss` claim and its value is a
|
|
362
|
+
# JSON string.
|
|
363
|
+
# 5. Confirm that the JWT contains the `sub` claim and its value is a
|
|
364
|
+
# JSON string.
|
|
365
|
+
# 6. Confirm that the JWT contains the `aud` claim and its value is
|
|
366
|
+
# either a JSON string or an array of JSON strings.
|
|
367
|
+
# 7. Confirm that the issuer identifier of the service (cf. {@link Service#getIssuer()})
|
|
368
|
+
# or the URL of the token endpoint (cf. {@link Service#getTokenEndpoint()})
|
|
369
|
+
# is listed as audience in the `aud` claim.
|
|
370
|
+
# 8. Confirm that the JWT contains the `exp` claim and the current time
|
|
371
|
+
# has not reached the time indicated by the claim.
|
|
372
|
+
# 9. Confirm that the current time is equal to or after the time indicated by
|
|
373
|
+
# by the `iat` claim if the JWT contains the claim.
|
|
374
|
+
# 10. Confirm that the current time is equal to or after the time indicated by
|
|
375
|
+
# by the `nbf` claim if the JWT contains the claim.
|
|
376
|
+
# 11. Check if the JWT is signed and if it is not signed, then (a) reject the
|
|
377
|
+
# token request when the {@link Service#isJwtGrantUnsignedJwtRejected()
|
|
378
|
+
# jwtGrantUnsignedJwtRejected} flag of the service is `true` or (b)
|
|
379
|
+
# finish validation on the JWT. Note that Authlete does not verify the
|
|
380
|
+
# signature of the JWT because there is no standard way to obtain the key
|
|
381
|
+
# to verify the signature of a JWT with. This means that you must verify
|
|
382
|
+
# the signature by yourself.
|
|
383
|
+
# Authlete provides some configuration options for the grant type as listed
|
|
384
|
+
# below. Authorization server implementers may utilize them and/or implement
|
|
385
|
+
# their own rules.
|
|
386
|
+
# ```
|
|
387
|
+
# HTTP/1.1 200 OK
|
|
388
|
+
# Content-Type: application/json
|
|
389
|
+
# Cache-Control: no-cache, no-store
|
|
390
|
+
# {
|
|
391
|
+
# "access\_token": "{@link TokenCreateResponse#getAccessToken()}",
|
|
392
|
+
# "token\_type": "Bearer",
|
|
393
|
+
# "expires\_in": {@link TokenCreateResponse#getExpiresIn()},
|
|
394
|
+
# "scope": "String.join(" ", {@link TokenCreateResponse#getScopes()})"
|
|
395
|
+
# }
|
|
396
|
+
# ```
|
|
397
|
+
# Finally, note again that Authlete does not verify the signature of the JWT
|
|
398
|
+
# specified by the `assertion` request parameter. You must verify the
|
|
399
|
+
# signature by yourself.
|
|
400
|
+
#
|
|
401
|
+
request = Models::Operations::AuthTokenApiRequest.new(
|
|
402
|
+
service_id: service_id,
|
|
403
|
+
token_request: token_request
|
|
404
|
+
)
|
|
405
|
+
url, params = @sdk_configuration.get_server_details
|
|
406
|
+
base_url = Utils.template_url(url, params)
|
|
407
|
+
url = Utils.generate_url(
|
|
408
|
+
Models::Operations::AuthTokenApiRequest,
|
|
409
|
+
base_url,
|
|
410
|
+
'/api/{serviceId}/auth/token',
|
|
411
|
+
request
|
|
412
|
+
)
|
|
413
|
+
headers = {}
|
|
414
|
+
headers = T.cast(headers, T::Hash[String, String])
|
|
415
|
+
req_content_type, data, form = Utils.serialize_request_body(request, false, false, :token_request, :json)
|
|
416
|
+
headers['content-type'] = req_content_type
|
|
417
|
+
raise StandardError, 'request body is required' if data.nil? && form.nil?
|
|
418
|
+
|
|
419
|
+
if form
|
|
420
|
+
body = Utils.encode_form(form)
|
|
421
|
+
elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
|
|
422
|
+
body = URI.encode_www_form(T.cast(data, T::Hash[Symbol, Object]))
|
|
423
|
+
else
|
|
424
|
+
body = data
|
|
425
|
+
end
|
|
426
|
+
headers['Accept'] = 'application/json'
|
|
427
|
+
headers['user-agent'] = @sdk_configuration.user_agent
|
|
428
|
+
|
|
429
|
+
security = @sdk_configuration.security_source&.call
|
|
430
|
+
|
|
431
|
+
timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
|
|
432
|
+
timeout ||= @sdk_configuration.timeout
|
|
433
|
+
|
|
434
|
+
|
|
435
|
+
connection = @sdk_configuration.client
|
|
436
|
+
|
|
437
|
+
hook_ctx = SDKHooks::HookContext.new(
|
|
438
|
+
config: @sdk_configuration,
|
|
439
|
+
base_url: base_url,
|
|
440
|
+
oauth2_scopes: [],
|
|
441
|
+
operation_id: 'auth_token_api',
|
|
442
|
+
security_source: @sdk_configuration.security_source
|
|
443
|
+
)
|
|
444
|
+
|
|
445
|
+
error = T.let(nil, T.nilable(StandardError))
|
|
446
|
+
http_response = T.let(nil, T.nilable(Faraday::Response))
|
|
447
|
+
|
|
448
|
+
|
|
449
|
+
begin
|
|
450
|
+
http_response = T.must(connection).post(url) do |req|
|
|
451
|
+
req.body = body
|
|
452
|
+
req.headers.merge!(headers)
|
|
453
|
+
req.options.timeout = timeout unless timeout.nil?
|
|
454
|
+
Utils.configure_request_security(req, security)
|
|
455
|
+
|
|
456
|
+
@sdk_configuration.hooks.before_request(
|
|
457
|
+
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
|
458
|
+
hook_ctx: hook_ctx
|
|
459
|
+
),
|
|
460
|
+
request: req
|
|
461
|
+
)
|
|
462
|
+
end
|
|
463
|
+
rescue StandardError => e
|
|
464
|
+
error = e
|
|
465
|
+
ensure
|
|
466
|
+
if http_response.nil? || Utils.error_status?(http_response.status)
|
|
467
|
+
http_response = @sdk_configuration.hooks.after_error(
|
|
468
|
+
error: error,
|
|
469
|
+
hook_ctx: SDKHooks::AfterErrorHookContext.new(
|
|
470
|
+
hook_ctx: hook_ctx
|
|
471
|
+
),
|
|
472
|
+
response: http_response
|
|
473
|
+
)
|
|
474
|
+
else
|
|
475
|
+
http_response = @sdk_configuration.hooks.after_success(
|
|
476
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
|
477
|
+
hook_ctx: hook_ctx
|
|
478
|
+
),
|
|
479
|
+
response: http_response
|
|
480
|
+
)
|
|
481
|
+
end
|
|
482
|
+
|
|
483
|
+
if http_response.nil?
|
|
484
|
+
raise error if !error.nil?
|
|
485
|
+
raise 'no response'
|
|
486
|
+
end
|
|
487
|
+
end
|
|
488
|
+
|
|
489
|
+
content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream')
|
|
490
|
+
if Utils.match_status_code(http_response.status, ['200'])
|
|
491
|
+
if Utils.match_content_type(content_type, 'application/json')
|
|
492
|
+
http_response = @sdk_configuration.hooks.after_success(
|
|
493
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
|
494
|
+
hook_ctx: hook_ctx
|
|
495
|
+
),
|
|
496
|
+
response: http_response
|
|
497
|
+
)
|
|
498
|
+
response_data = http_response.env.response_body
|
|
499
|
+
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Components::TokenResponse)
|
|
500
|
+
response = Models::Operations::AuthTokenApiResponse.new(
|
|
501
|
+
status_code: http_response.status,
|
|
502
|
+
content_type: content_type,
|
|
503
|
+
raw_response: http_response,
|
|
504
|
+
token_response: T.unsafe(obj)
|
|
505
|
+
)
|
|
506
|
+
|
|
507
|
+
return response
|
|
508
|
+
else
|
|
509
|
+
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'
|
|
510
|
+
end
|
|
511
|
+
elsif Utils.match_status_code(http_response.status, ['400', '401', '403'])
|
|
512
|
+
if Utils.match_content_type(content_type, 'application/json')
|
|
513
|
+
http_response = @sdk_configuration.hooks.after_success(
|
|
514
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
|
515
|
+
hook_ctx: hook_ctx
|
|
516
|
+
),
|
|
517
|
+
response: http_response
|
|
518
|
+
)
|
|
519
|
+
response_data = http_response.env.response_body
|
|
520
|
+
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::ResultError)
|
|
521
|
+
obj.raw_response = http_response
|
|
522
|
+
throw obj
|
|
523
|
+
else
|
|
524
|
+
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'
|
|
525
|
+
end
|
|
526
|
+
elsif Utils.match_status_code(http_response.status, ['500'])
|
|
527
|
+
if Utils.match_content_type(content_type, 'application/json')
|
|
528
|
+
http_response = @sdk_configuration.hooks.after_success(
|
|
529
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
|
530
|
+
hook_ctx: hook_ctx
|
|
531
|
+
),
|
|
532
|
+
response: http_response
|
|
533
|
+
)
|
|
534
|
+
response_data = http_response.env.response_body
|
|
535
|
+
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::ResultError)
|
|
536
|
+
obj.raw_response = http_response
|
|
537
|
+
throw obj
|
|
538
|
+
else
|
|
539
|
+
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'
|
|
540
|
+
end
|
|
541
|
+
elsif Utils.match_status_code(http_response.status, ['4XX'])
|
|
542
|
+
raise ::Authlete::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
|
|
543
|
+
elsif Utils.match_status_code(http_response.status, ['5XX'])
|
|
544
|
+
raise ::Authlete::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
|
|
545
|
+
else
|
|
546
|
+
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'
|
|
547
|
+
|
|
548
|
+
end
|
|
549
|
+
end
|
|
550
|
+
|
|
551
|
+
|
|
552
|
+
sig { params(token_fail_request: Models::Components::TokenFailRequest, service_id: ::String, timeout_ms: T.nilable(Integer)).returns(Models::Operations::AuthTokenFailApiResponse) }
|
|
553
|
+
def fail_request(token_fail_request:, service_id:, timeout_ms: nil)
|
|
554
|
+
# fail_request - Fail Token Request
|
|
555
|
+
# This API generates a content of an error token response that the authorization server implementation
|
|
556
|
+
# returns to the client application.
|
|
557
|
+
# ### Description
|
|
558
|
+
# This API is supposed to be called from within the implementation of the token endpoint of the service
|
|
559
|
+
# in order to generate an error response to the client application.
|
|
560
|
+
# The description of the `/auth/token` API describes the timing when this API should be called. See
|
|
561
|
+
# the description for the case of `action=PASSWORD`.
|
|
562
|
+
# The response from `/auth/token/fail` API has some parameters. Among them, it is `action` parameter
|
|
563
|
+
# that the authorization server implementation should check first because it denotes the next action
|
|
564
|
+
# that the authorization server implementation should take. According to the value of `action`, the
|
|
565
|
+
# authorization server implementation must take the steps described below.
|
|
566
|
+
# **INTERNAL\_SERVER\_ERROR**
|
|
567
|
+
# When the value of `action` is `INTERNAL\_SERVER\_ERROR`, it means that the request from the authorization
|
|
568
|
+
# server implementation was wrong or that an error occurred in Authlete.
|
|
569
|
+
# In either case, from the viewpoint of the client application, it is an error on the server side.
|
|
570
|
+
# Therefore, the service implementation should generate a response to the client application with
|
|
571
|
+
# HTTP status of "500 Internal Server Error".
|
|
572
|
+
# The value of `responseContent` is a JSON string which describes the error, so it can be used
|
|
573
|
+
# as the entity body of the response.
|
|
574
|
+
# The following illustrates the response which the service implementation should generate and return
|
|
575
|
+
# to the client application.
|
|
576
|
+
# ```
|
|
577
|
+
# HTTP/1.1 500 Internal Server Error
|
|
578
|
+
# Content-Type: application/json
|
|
579
|
+
# Cache-Control: no-store
|
|
580
|
+
# Pragma: no-cache
|
|
581
|
+
# {responseContent}
|
|
582
|
+
# ```
|
|
583
|
+
# The endpoint implementation may return another different response to the client application
|
|
584
|
+
# since "500 Internal Server Error" is not required by OAuth 2.0.
|
|
585
|
+
# **BAD\_REQUEST**
|
|
586
|
+
# When the value of `action` is `BAD\_REQUEST`, it means that Authlete's `/auth/token/fail` API successfully
|
|
587
|
+
# generated an error response for the client application.
|
|
588
|
+
# The HTTP status of the response returned to the client application must be "400 Bad Request" and
|
|
589
|
+
# the content type must be `application/json`.
|
|
590
|
+
# The value of `responseContent` is a JSON string which describes the error, so it can be used
|
|
591
|
+
# as the entity body of the response.
|
|
592
|
+
# The following illustrates the response which the service implementation should generate and return
|
|
593
|
+
# to the client application.
|
|
594
|
+
# ```
|
|
595
|
+
# HTTP/1.1 400 Bad Request
|
|
596
|
+
# Content-Type: application/json
|
|
597
|
+
# Cache-Control: no-store
|
|
598
|
+
# Pragma: no-cache
|
|
599
|
+
# {responseContent}
|
|
600
|
+
# ```
|
|
601
|
+
#
|
|
602
|
+
request = Models::Operations::AuthTokenFailApiRequest.new(
|
|
603
|
+
service_id: service_id,
|
|
604
|
+
token_fail_request: token_fail_request
|
|
605
|
+
)
|
|
606
|
+
url, params = @sdk_configuration.get_server_details
|
|
607
|
+
base_url = Utils.template_url(url, params)
|
|
608
|
+
url = Utils.generate_url(
|
|
609
|
+
Models::Operations::AuthTokenFailApiRequest,
|
|
610
|
+
base_url,
|
|
611
|
+
'/api/{serviceId}/auth/token/fail',
|
|
612
|
+
request
|
|
613
|
+
)
|
|
614
|
+
headers = {}
|
|
615
|
+
headers = T.cast(headers, T::Hash[String, String])
|
|
616
|
+
req_content_type, data, form = Utils.serialize_request_body(request, false, false, :token_fail_request, :json)
|
|
617
|
+
headers['content-type'] = req_content_type
|
|
618
|
+
raise StandardError, 'request body is required' if data.nil? && form.nil?
|
|
619
|
+
|
|
620
|
+
if form
|
|
621
|
+
body = Utils.encode_form(form)
|
|
622
|
+
elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
|
|
623
|
+
body = URI.encode_www_form(T.cast(data, T::Hash[Symbol, Object]))
|
|
624
|
+
else
|
|
625
|
+
body = data
|
|
626
|
+
end
|
|
627
|
+
headers['Accept'] = 'application/json'
|
|
628
|
+
headers['user-agent'] = @sdk_configuration.user_agent
|
|
629
|
+
|
|
630
|
+
security = @sdk_configuration.security_source&.call
|
|
631
|
+
|
|
632
|
+
timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
|
|
633
|
+
timeout ||= @sdk_configuration.timeout
|
|
634
|
+
|
|
635
|
+
|
|
636
|
+
connection = @sdk_configuration.client
|
|
637
|
+
|
|
638
|
+
hook_ctx = SDKHooks::HookContext.new(
|
|
639
|
+
config: @sdk_configuration,
|
|
640
|
+
base_url: base_url,
|
|
641
|
+
oauth2_scopes: [],
|
|
642
|
+
operation_id: 'auth_token_fail_api',
|
|
643
|
+
security_source: @sdk_configuration.security_source
|
|
644
|
+
)
|
|
645
|
+
|
|
646
|
+
error = T.let(nil, T.nilable(StandardError))
|
|
647
|
+
http_response = T.let(nil, T.nilable(Faraday::Response))
|
|
648
|
+
|
|
649
|
+
|
|
650
|
+
begin
|
|
651
|
+
http_response = T.must(connection).post(url) do |req|
|
|
652
|
+
req.body = body
|
|
653
|
+
req.headers.merge!(headers)
|
|
654
|
+
req.options.timeout = timeout unless timeout.nil?
|
|
655
|
+
Utils.configure_request_security(req, security)
|
|
656
|
+
|
|
657
|
+
@sdk_configuration.hooks.before_request(
|
|
658
|
+
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
|
659
|
+
hook_ctx: hook_ctx
|
|
660
|
+
),
|
|
661
|
+
request: req
|
|
662
|
+
)
|
|
663
|
+
end
|
|
664
|
+
rescue StandardError => e
|
|
665
|
+
error = e
|
|
666
|
+
ensure
|
|
667
|
+
if http_response.nil? || Utils.error_status?(http_response.status)
|
|
668
|
+
http_response = @sdk_configuration.hooks.after_error(
|
|
669
|
+
error: error,
|
|
670
|
+
hook_ctx: SDKHooks::AfterErrorHookContext.new(
|
|
671
|
+
hook_ctx: hook_ctx
|
|
672
|
+
),
|
|
673
|
+
response: http_response
|
|
674
|
+
)
|
|
675
|
+
else
|
|
676
|
+
http_response = @sdk_configuration.hooks.after_success(
|
|
677
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
|
678
|
+
hook_ctx: hook_ctx
|
|
679
|
+
),
|
|
680
|
+
response: http_response
|
|
681
|
+
)
|
|
682
|
+
end
|
|
683
|
+
|
|
684
|
+
if http_response.nil?
|
|
685
|
+
raise error if !error.nil?
|
|
686
|
+
raise 'no response'
|
|
687
|
+
end
|
|
688
|
+
end
|
|
689
|
+
|
|
690
|
+
content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream')
|
|
691
|
+
if Utils.match_status_code(http_response.status, ['200'])
|
|
692
|
+
if Utils.match_content_type(content_type, 'application/json')
|
|
693
|
+
http_response = @sdk_configuration.hooks.after_success(
|
|
694
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
|
695
|
+
hook_ctx: hook_ctx
|
|
696
|
+
),
|
|
697
|
+
response: http_response
|
|
698
|
+
)
|
|
699
|
+
response_data = http_response.env.response_body
|
|
700
|
+
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Components::TokenFailResponse)
|
|
701
|
+
response = Models::Operations::AuthTokenFailApiResponse.new(
|
|
702
|
+
status_code: http_response.status,
|
|
703
|
+
content_type: content_type,
|
|
704
|
+
raw_response: http_response,
|
|
705
|
+
token_fail_response: T.unsafe(obj)
|
|
706
|
+
)
|
|
707
|
+
|
|
708
|
+
return response
|
|
709
|
+
else
|
|
710
|
+
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'
|
|
711
|
+
end
|
|
712
|
+
elsif Utils.match_status_code(http_response.status, ['400', '401', '403'])
|
|
713
|
+
if Utils.match_content_type(content_type, 'application/json')
|
|
714
|
+
http_response = @sdk_configuration.hooks.after_success(
|
|
715
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
|
716
|
+
hook_ctx: hook_ctx
|
|
717
|
+
),
|
|
718
|
+
response: http_response
|
|
719
|
+
)
|
|
720
|
+
response_data = http_response.env.response_body
|
|
721
|
+
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::ResultError)
|
|
722
|
+
obj.raw_response = http_response
|
|
723
|
+
throw obj
|
|
724
|
+
else
|
|
725
|
+
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'
|
|
726
|
+
end
|
|
727
|
+
elsif Utils.match_status_code(http_response.status, ['500'])
|
|
728
|
+
if Utils.match_content_type(content_type, 'application/json')
|
|
729
|
+
http_response = @sdk_configuration.hooks.after_success(
|
|
730
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
|
731
|
+
hook_ctx: hook_ctx
|
|
732
|
+
),
|
|
733
|
+
response: http_response
|
|
734
|
+
)
|
|
735
|
+
response_data = http_response.env.response_body
|
|
736
|
+
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::ResultError)
|
|
737
|
+
obj.raw_response = http_response
|
|
738
|
+
throw obj
|
|
739
|
+
else
|
|
740
|
+
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'
|
|
741
|
+
end
|
|
742
|
+
elsif Utils.match_status_code(http_response.status, ['4XX'])
|
|
743
|
+
raise ::Authlete::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
|
|
744
|
+
elsif Utils.match_status_code(http_response.status, ['5XX'])
|
|
745
|
+
raise ::Authlete::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
|
|
746
|
+
else
|
|
747
|
+
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'
|
|
748
|
+
|
|
749
|
+
end
|
|
750
|
+
end
|
|
751
|
+
|
|
752
|
+
|
|
753
|
+
sig { params(token_issue_request: Models::Components::TokenIssueRequest, service_id: ::String, timeout_ms: T.nilable(Integer)).returns(Models::Operations::AuthTokenIssueApiResponse) }
|
|
754
|
+
def issue_response(token_issue_request:, service_id:, timeout_ms: nil)
|
|
755
|
+
# issue_response - Issue Token Response
|
|
756
|
+
# This API generates a content of a successful token response that the authorization server implementation
|
|
757
|
+
# returns to the client application.
|
|
758
|
+
# ### Description
|
|
759
|
+
# This API is supposed to be called from within the implementation of the token endpoint of the service
|
|
760
|
+
# in order to generate a successful response to the client application.
|
|
761
|
+
# The description of the `/auth/token` API describes the timing when this API should be called. See
|
|
762
|
+
# the description for the case of `action=PASSWORD`.
|
|
763
|
+
# The response from `/auth/token/issue` API has some parameters. Among them, it is `action` parameter
|
|
764
|
+
# that the authorization server implementation should check first because it denotes the next action
|
|
765
|
+
# that the authorization server implementation should take. According to the value of `action`, the
|
|
766
|
+
# authorization server implementation must take the steps described below.
|
|
767
|
+
# **INTERNAL\_SERVER\_ERROR**
|
|
768
|
+
# When the value of `action` is `INTERNAL\_SERVER\_ERROR`, it means that the request from the authorization
|
|
769
|
+
# server implementation was wrong or that an error occurred in Authlete.
|
|
770
|
+
# In either case, from the viewpoint of the client application, it is an error on the server side.
|
|
771
|
+
# Therefore, the service implementation should generate a response to the client application with
|
|
772
|
+
# HTTP status of "500 Internal Server Error".
|
|
773
|
+
# The value of `responseContent` is a JSON string which describes the error, so it can be used
|
|
774
|
+
# as the entity body of the response.
|
|
775
|
+
# The following illustrates the response which the service implementation should generate and return
|
|
776
|
+
# to the client application.
|
|
777
|
+
# ```
|
|
778
|
+
# HTTP/1.1 500 Internal Server Error
|
|
779
|
+
# Content-Type: application/json
|
|
780
|
+
# Cache-Control: no-store
|
|
781
|
+
# Pragma: no-cache
|
|
782
|
+
# {responseContent}
|
|
783
|
+
# ```
|
|
784
|
+
# The endpoint implementation may return another different response to the client application
|
|
785
|
+
# since "500 Internal Server Error" is not required by OAuth 2.0.
|
|
786
|
+
# **OK**
|
|
787
|
+
# When the value of `action` is `OK`, it means that Authlete's `/auth/token/issue` API successfully
|
|
788
|
+
# generated an access token.
|
|
789
|
+
# The HTTP status of the response returned to the client application must be "200 OK" and the content
|
|
790
|
+
# type must be`application/json`.
|
|
791
|
+
# The value of `responseContent` is a JSON string which contains an access token, so it can be used
|
|
792
|
+
# as the entity body of the response.
|
|
793
|
+
# The following illustrates the response which the service implementation must generate and return
|
|
794
|
+
# to the client application.
|
|
795
|
+
# ```
|
|
796
|
+
# HTTP/1.1 200 OK
|
|
797
|
+
# Content-Type: application/json
|
|
798
|
+
# Cache-Control: no-store
|
|
799
|
+
# Pragma: no-cache
|
|
800
|
+
# {responseContent}
|
|
801
|
+
# ```
|
|
802
|
+
#
|
|
803
|
+
request = Models::Operations::AuthTokenIssueApiRequest.new(
|
|
804
|
+
service_id: service_id,
|
|
805
|
+
token_issue_request: token_issue_request
|
|
806
|
+
)
|
|
807
|
+
url, params = @sdk_configuration.get_server_details
|
|
808
|
+
base_url = Utils.template_url(url, params)
|
|
809
|
+
url = Utils.generate_url(
|
|
810
|
+
Models::Operations::AuthTokenIssueApiRequest,
|
|
811
|
+
base_url,
|
|
812
|
+
'/api/{serviceId}/auth/token/issue',
|
|
813
|
+
request
|
|
814
|
+
)
|
|
815
|
+
headers = {}
|
|
816
|
+
headers = T.cast(headers, T::Hash[String, String])
|
|
817
|
+
req_content_type, data, form = Utils.serialize_request_body(request, false, false, :token_issue_request, :json)
|
|
818
|
+
headers['content-type'] = req_content_type
|
|
819
|
+
raise StandardError, 'request body is required' if data.nil? && form.nil?
|
|
820
|
+
|
|
821
|
+
if form
|
|
822
|
+
body = Utils.encode_form(form)
|
|
823
|
+
elsif Utils.match_content_type(req_content_type, 'application/x-www-form-urlencoded')
|
|
824
|
+
body = URI.encode_www_form(T.cast(data, T::Hash[Symbol, Object]))
|
|
825
|
+
else
|
|
826
|
+
body = data
|
|
827
|
+
end
|
|
828
|
+
headers['Accept'] = 'application/json'
|
|
829
|
+
headers['user-agent'] = @sdk_configuration.user_agent
|
|
830
|
+
|
|
831
|
+
security = @sdk_configuration.security_source&.call
|
|
832
|
+
|
|
833
|
+
timeout = (timeout_ms.to_f / 1000) unless timeout_ms.nil?
|
|
834
|
+
timeout ||= @sdk_configuration.timeout
|
|
835
|
+
|
|
836
|
+
|
|
837
|
+
connection = @sdk_configuration.client
|
|
838
|
+
|
|
839
|
+
hook_ctx = SDKHooks::HookContext.new(
|
|
840
|
+
config: @sdk_configuration,
|
|
841
|
+
base_url: base_url,
|
|
842
|
+
oauth2_scopes: [],
|
|
843
|
+
operation_id: 'auth_token_issue_api',
|
|
844
|
+
security_source: @sdk_configuration.security_source
|
|
845
|
+
)
|
|
846
|
+
|
|
847
|
+
error = T.let(nil, T.nilable(StandardError))
|
|
848
|
+
http_response = T.let(nil, T.nilable(Faraday::Response))
|
|
849
|
+
|
|
850
|
+
|
|
851
|
+
begin
|
|
852
|
+
http_response = T.must(connection).post(url) do |req|
|
|
853
|
+
req.body = body
|
|
854
|
+
req.headers.merge!(headers)
|
|
855
|
+
req.options.timeout = timeout unless timeout.nil?
|
|
856
|
+
Utils.configure_request_security(req, security)
|
|
857
|
+
|
|
858
|
+
@sdk_configuration.hooks.before_request(
|
|
859
|
+
hook_ctx: SDKHooks::BeforeRequestHookContext.new(
|
|
860
|
+
hook_ctx: hook_ctx
|
|
861
|
+
),
|
|
862
|
+
request: req
|
|
863
|
+
)
|
|
864
|
+
end
|
|
865
|
+
rescue StandardError => e
|
|
866
|
+
error = e
|
|
867
|
+
ensure
|
|
868
|
+
if http_response.nil? || Utils.error_status?(http_response.status)
|
|
869
|
+
http_response = @sdk_configuration.hooks.after_error(
|
|
870
|
+
error: error,
|
|
871
|
+
hook_ctx: SDKHooks::AfterErrorHookContext.new(
|
|
872
|
+
hook_ctx: hook_ctx
|
|
873
|
+
),
|
|
874
|
+
response: http_response
|
|
875
|
+
)
|
|
876
|
+
else
|
|
877
|
+
http_response = @sdk_configuration.hooks.after_success(
|
|
878
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
|
879
|
+
hook_ctx: hook_ctx
|
|
880
|
+
),
|
|
881
|
+
response: http_response
|
|
882
|
+
)
|
|
883
|
+
end
|
|
884
|
+
|
|
885
|
+
if http_response.nil?
|
|
886
|
+
raise error if !error.nil?
|
|
887
|
+
raise 'no response'
|
|
888
|
+
end
|
|
889
|
+
end
|
|
890
|
+
|
|
891
|
+
content_type = http_response.headers.fetch('Content-Type', 'application/octet-stream')
|
|
892
|
+
if Utils.match_status_code(http_response.status, ['200'])
|
|
893
|
+
if Utils.match_content_type(content_type, 'application/json')
|
|
894
|
+
http_response = @sdk_configuration.hooks.after_success(
|
|
895
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
|
896
|
+
hook_ctx: hook_ctx
|
|
897
|
+
),
|
|
898
|
+
response: http_response
|
|
899
|
+
)
|
|
900
|
+
response_data = http_response.env.response_body
|
|
901
|
+
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Components::TokenIssueResponse)
|
|
902
|
+
response = Models::Operations::AuthTokenIssueApiResponse.new(
|
|
903
|
+
status_code: http_response.status,
|
|
904
|
+
content_type: content_type,
|
|
905
|
+
raw_response: http_response,
|
|
906
|
+
token_issue_response: T.unsafe(obj)
|
|
907
|
+
)
|
|
908
|
+
|
|
909
|
+
return response
|
|
910
|
+
else
|
|
911
|
+
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'
|
|
912
|
+
end
|
|
913
|
+
elsif Utils.match_status_code(http_response.status, ['400', '401', '403'])
|
|
914
|
+
if Utils.match_content_type(content_type, 'application/json')
|
|
915
|
+
http_response = @sdk_configuration.hooks.after_success(
|
|
916
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
|
917
|
+
hook_ctx: hook_ctx
|
|
918
|
+
),
|
|
919
|
+
response: http_response
|
|
920
|
+
)
|
|
921
|
+
response_data = http_response.env.response_body
|
|
922
|
+
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::ResultError)
|
|
923
|
+
obj.raw_response = http_response
|
|
924
|
+
throw obj
|
|
925
|
+
else
|
|
926
|
+
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'
|
|
927
|
+
end
|
|
928
|
+
elsif Utils.match_status_code(http_response.status, ['500'])
|
|
929
|
+
if Utils.match_content_type(content_type, 'application/json')
|
|
930
|
+
http_response = @sdk_configuration.hooks.after_success(
|
|
931
|
+
hook_ctx: SDKHooks::AfterSuccessHookContext.new(
|
|
932
|
+
hook_ctx: hook_ctx
|
|
933
|
+
),
|
|
934
|
+
response: http_response
|
|
935
|
+
)
|
|
936
|
+
response_data = http_response.env.response_body
|
|
937
|
+
obj = Crystalline.unmarshal_json(JSON.parse(response_data), Models::Errors::ResultError)
|
|
938
|
+
obj.raw_response = http_response
|
|
939
|
+
throw obj
|
|
940
|
+
else
|
|
941
|
+
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'
|
|
942
|
+
end
|
|
943
|
+
elsif Utils.match_status_code(http_response.status, ['4XX'])
|
|
944
|
+
raise ::Authlete::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
|
|
945
|
+
elsif Utils.match_status_code(http_response.status, ['5XX'])
|
|
946
|
+
raise ::Authlete::Models::Errors::APIError.new(status_code: http_response.status, body: http_response.env.response_body, raw_response: http_response), 'API error occurred'
|
|
947
|
+
else
|
|
948
|
+
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'
|
|
949
|
+
|
|
950
|
+
end
|
|
951
|
+
end
|
|
952
|
+
end
|
|
953
|
+
end
|