clerk-http-client 0.0.1
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/Gemfile +9 -0
- data/Gemfile.lock +87 -0
- data/README.md +360 -0
- data/Rakefile +10 -0
- data/bin/fmt +5 -0
- data/bin/generate +8 -0
- data/bin/setup +7 -0
- data/clerk-http-client.gemspec +41 -0
- data/docs/ActorToken.md +34 -0
- data/docs/ActorTokensApi.md +147 -0
- data/docs/AddDomainRequest.md +22 -0
- data/docs/Admin.md +24 -0
- data/docs/AllowListBlockListApi.md +421 -0
- data/docs/AllowlistIdentifier.md +32 -0
- data/docs/BetaFeaturesApi.md +217 -0
- data/docs/BlocklistIdentifier.md +30 -0
- data/docs/BlocklistIdentifiers.md +20 -0
- data/docs/CNameTarget.md +22 -0
- data/docs/ChangeProductionInstanceDomainRequest.md +20 -0
- data/docs/ClerkError.md +26 -0
- data/docs/ClerkErrors.md +20 -0
- data/docs/Client.md +34 -0
- data/docs/ClientsApi.md +221 -0
- data/docs/CreateActorTokenRequest.md +24 -0
- data/docs/CreateAllowlistIdentifierRequest.md +20 -0
- data/docs/CreateBlocklistIdentifierRequest.md +18 -0
- data/docs/CreateEmailAddressRequest.md +24 -0
- data/docs/CreateInvitationRequest.md +28 -0
- data/docs/CreateJWTTemplateRequest.md +30 -0
- data/docs/CreateOAuthApplicationRequest.md +24 -0
- data/docs/CreateOrganizationDomainRequest.md +22 -0
- data/docs/CreateOrganizationInvitationBulkRequestInner.md +28 -0
- data/docs/CreateOrganizationInvitationRequest.md +28 -0
- data/docs/CreateOrganizationMembershipRequest.md +20 -0
- data/docs/CreateOrganizationRequest.md +30 -0
- data/docs/CreatePhoneNumberRequest.md +26 -0
- data/docs/CreateRedirectURLRequest.md +18 -0
- data/docs/CreateSAMLConnectionRequest.md +34 -0
- data/docs/CreateSAMLConnectionRequestAttributeMapping.md +24 -0
- data/docs/CreateSessionTokenFromTemplate200Response.md +20 -0
- data/docs/CreateSignInTokenRequest.md +20 -0
- data/docs/CreateUserRequest.md +62 -0
- data/docs/DeletedObject.md +24 -0
- data/docs/DisableMFA200Response.md +18 -0
- data/docs/Domain.md +34 -0
- data/docs/Domains.md +20 -0
- data/docs/DomainsApi.md +286 -0
- data/docs/EmailAddress.md +32 -0
- data/docs/EmailAddressVerification.md +51 -0
- data/docs/EmailAddressesApi.md +289 -0
- data/docs/EmailSMSTemplatesApi.md +449 -0
- data/docs/GetOAuthAccessToken200ResponseInner.md +34 -0
- data/docs/IdentificationLink.md +20 -0
- data/docs/InstanceRestrictions.md +26 -0
- data/docs/InstanceSettingsApi.md +216 -0
- data/docs/Invitation.md +36 -0
- data/docs/InvitationsApi.md +223 -0
- data/docs/JWKSApi.md +74 -0
- data/docs/JWTTemplate.md +36 -0
- data/docs/JWTTemplatesApi.md +354 -0
- data/docs/MergeOrganizationMetadataRequest.md +20 -0
- data/docs/MiscellaneousApi.md +75 -0
- data/docs/OAuthApplication.md +42 -0
- data/docs/OAuthApplicationWithSecret.md +44 -0
- data/docs/OAuthApplications.md +20 -0
- data/docs/OAuthApplicationsApi.md +433 -0
- data/docs/OTP.md +24 -0
- data/docs/Oauth.md +28 -0
- data/docs/OauthError.md +47 -0
- data/docs/Organization.md +40 -0
- data/docs/OrganizationDomain.md +38 -0
- data/docs/OrganizationDomainApi.md +81 -0
- data/docs/OrganizationDomainVerification.md +24 -0
- data/docs/OrganizationDomains.md +20 -0
- data/docs/OrganizationDomainsApi.md +231 -0
- data/docs/OrganizationInvitation.md +38 -0
- data/docs/OrganizationInvitationWithPublicOrganizationData.md +40 -0
- data/docs/OrganizationInvitationWithPublicOrganizationDataPublicOrganizationData.md +26 -0
- data/docs/OrganizationInvitations.md +20 -0
- data/docs/OrganizationInvitationsApi.md +533 -0
- data/docs/OrganizationInvitationsWithPublicOrganizationData.md +20 -0
- data/docs/OrganizationMembership.md +38 -0
- data/docs/OrganizationMembershipPublicUserData.md +30 -0
- data/docs/OrganizationMemberships.md +20 -0
- data/docs/OrganizationMembershipsApi.md +453 -0
- data/docs/OrganizationSettings.md +36 -0
- data/docs/OrganizationWithLogo.md +46 -0
- data/docs/Organizations.md +20 -0
- data/docs/OrganizationsApi.md +591 -0
- data/docs/Passkey.md +26 -0
- data/docs/PhoneNumber.md +38 -0
- data/docs/PhoneNumberVerification.md +49 -0
- data/docs/PhoneNumbersApi.md +289 -0
- data/docs/PreviewTemplateRequest.md +24 -0
- data/docs/ProxyCheck.md +32 -0
- data/docs/ProxyChecksApi.md +77 -0
- data/docs/RedirectURL.md +26 -0
- data/docs/RedirectURLsApi.md +284 -0
- data/docs/RevokeInvitation200Response.md +36 -0
- data/docs/RevokeOrganizationInvitationRequest.md +18 -0
- data/docs/SAML.md +28 -0
- data/docs/SAMLAccount.md +38 -0
- data/docs/SAMLAccountSamlConnection.md +47 -0
- data/docs/SAMLAccountVerification.md +49 -0
- data/docs/SAMLConnection.md +38 -0
- data/docs/SAMLConnections.md +20 -0
- data/docs/SAMLConnectionsApi.md +363 -0
- data/docs/SchemasPasskey.md +26 -0
- data/docs/SchemasPasskeyVerification.md +47 -0
- data/docs/SchemasSAMLConnection.md +60 -0
- data/docs/SchemasSAMLConnectionAttributeMapping.md +24 -0
- data/docs/Session.md +42 -0
- data/docs/SessionLatestActivity.md +34 -0
- data/docs/SessionsApi.md +373 -0
- data/docs/SignInToken.md +32 -0
- data/docs/SignInTokensApi.md +147 -0
- data/docs/SignUp.md +62 -0
- data/docs/SignUpsApi.md +79 -0
- data/docs/SvixURL.md +18 -0
- data/docs/TOTP.md +28 -0
- data/docs/Template.md +60 -0
- data/docs/TestingToken.md +22 -0
- data/docs/TestingTokensApi.md +74 -0
- data/docs/Ticket.md +24 -0
- data/docs/ToggleTemplateDeliveryRequest.md +18 -0
- data/docs/TotalCount.md +20 -0
- data/docs/UpdateDomainRequest.md +22 -0
- data/docs/UpdateEmailAddressRequest.md +20 -0
- data/docs/UpdateInstanceAuthConfig200Response.md +28 -0
- data/docs/UpdateInstanceAuthConfigRequest.md +28 -0
- data/docs/UpdateInstanceOrganizationSettingsRequest.md +30 -0
- data/docs/UpdateInstanceRequest.md +34 -0
- data/docs/UpdateInstanceRestrictionsRequest.md +26 -0
- data/docs/UpdateOAuthApplicationRequest.md +22 -0
- data/docs/UpdateOrganizationDomainRequest.md +20 -0
- data/docs/UpdateOrganizationMembershipMetadataRequest.md +20 -0
- data/docs/UpdateOrganizationMembershipRequest.md +18 -0
- data/docs/UpdateOrganizationRequest.md +30 -0
- data/docs/UpdatePhoneNumberRequest.md +22 -0
- data/docs/UpdateProductionInstanceDomainRequest.md +18 -0
- data/docs/UpdateSAMLConnectionRequest.md +42 -0
- data/docs/UpdateSAMLConnectionRequestAttributeMapping.md +24 -0
- data/docs/UpdateSignUpRequest.md +18 -0
- data/docs/UpdateUserMetadataRequest.md +22 -0
- data/docs/UpdateUserRequest.md +66 -0
- data/docs/UpsertTemplateRequest.md +30 -0
- data/docs/User.md +94 -0
- data/docs/UsersApi.md +1829 -0
- data/docs/VerifyClientRequest.md +18 -0
- data/docs/VerifyDomainProxyRequest.md +20 -0
- data/docs/VerifyPassword200Response.md +18 -0
- data/docs/VerifyPasswordRequest.md +18 -0
- data/docs/VerifySessionRequest.md +18 -0
- data/docs/VerifyTOTP200Response.md +20 -0
- data/docs/VerifyTOTPRequest.md +18 -0
- data/docs/Web3Signature.md +28 -0
- data/docs/Web3Wallet.md +28 -0
- data/docs/Web3WalletVerification.md +49 -0
- data/docs/WebhooksApi.md +207 -0
- data/docs/WellKnownJWKS.md +18 -0
- data/docs/WellKnownJWKSKeysInner.md +28 -0
- data/git_push.sh +57 -0
- data/lib/clerk-http-client/api/actor_tokens_api.rb +157 -0
- data/lib/clerk-http-client/api/allow_list_block_list_api.rb +410 -0
- data/lib/clerk-http-client/api/beta_features_api.rb +228 -0
- data/lib/clerk-http-client/api/clients_api.rb +234 -0
- data/lib/clerk-http-client/api/domains_api.rb +292 -0
- data/lib/clerk-http-client/api/email_addresses_api.rb +298 -0
- data/lib/clerk-http-client/api/email_sms_templates_api.rb +488 -0
- data/lib/clerk-http-client/api/instance_settings_api.rb +232 -0
- data/lib/clerk-http-client/api/invitations_api.rb +241 -0
- data/lib/clerk-http-client/api/jwks_api.rb +81 -0
- data/lib/clerk-http-client/api/jwt_templates_api.rb +355 -0
- data/lib/clerk-http-client/api/miscellaneous_api.rb +85 -0
- data/lib/clerk-http-client/api/o_auth_applications_api.rb +440 -0
- data/lib/clerk-http-client/api/organization_domain_api.rb +104 -0
- data/lib/clerk-http-client/api/organization_domains_api.rb +258 -0
- data/lib/clerk-http-client/api/organization_invitations_api.rb +586 -0
- data/lib/clerk-http-client/api/organization_memberships_api.rb +499 -0
- data/lib/clerk-http-client/api/organizations_api.rb +606 -0
- data/lib/clerk-http-client/api/phone_numbers_api.rb +298 -0
- data/lib/clerk-http-client/api/proxy_checks_api.rb +92 -0
- data/lib/clerk-http-client/api/redirect_urls_api.rb +281 -0
- data/lib/clerk-http-client/api/saml_connections_api.rb +375 -0
- data/lib/clerk-http-client/api/sessions_api.rb +385 -0
- data/lib/clerk-http-client/api/sign_in_tokens_api.rb +157 -0
- data/lib/clerk-http-client/api/sign_ups_api.rb +98 -0
- data/lib/clerk-http-client/api/testing_tokens_api.rb +81 -0
- data/lib/clerk-http-client/api/users_api.rb +1828 -0
- data/lib/clerk-http-client/api/webhooks_api.rb +199 -0
- data/lib/clerk-http-client/api_client.rb +437 -0
- data/lib/clerk-http-client/api_error.rb +58 -0
- data/lib/clerk-http-client/configuration.rb +393 -0
- data/lib/clerk-http-client/models/actor_token.rb +385 -0
- data/lib/clerk-http-client/models/add_domain_request.rb +249 -0
- data/lib/clerk-http-client/models/admin.rb +303 -0
- data/lib/clerk-http-client/models/allowlist_identifier.rb +327 -0
- data/lib/clerk-http-client/models/blocklist_identifier.rb +318 -0
- data/lib/clerk-http-client/models/blocklist_identifiers.rb +240 -0
- data/lib/clerk-http-client/models/c_name_target.rb +254 -0
- data/lib/clerk-http-client/models/change_production_instance_domain_request.rb +225 -0
- data/lib/clerk-http-client/models/clerk_error.rb +271 -0
- data/lib/clerk-http-client/models/clerk_errors.rb +232 -0
- data/lib/clerk-http-client/models/client.rb +380 -0
- data/lib/clerk-http-client/models/create_actor_token_request.rb +263 -0
- data/lib/clerk-http-client/models/create_allowlist_identifier_request.rb +234 -0
- data/lib/clerk-http-client/models/create_blocklist_identifier_request.rb +222 -0
- data/lib/clerk-http-client/models/create_email_address_request.rb +247 -0
- data/lib/clerk-http-client/models/create_invitation_request.rb +303 -0
- data/lib/clerk-http-client/models/create_jwt_template_request.rb +327 -0
- data/lib/clerk-http-client/models/create_o_auth_application_request.rb +261 -0
- data/lib/clerk-http-client/models/create_organization_domain_request.rb +236 -0
- data/lib/clerk-http-client/models/create_organization_invitation_bulk_request_inner.rb +280 -0
- data/lib/clerk-http-client/models/create_organization_invitation_request.rb +280 -0
- data/lib/clerk-http-client/models/create_organization_membership_request.rb +239 -0
- data/lib/clerk-http-client/models/create_organization_request.rb +289 -0
- data/lib/clerk-http-client/models/create_phone_number_request.rb +258 -0
- data/lib/clerk-http-client/models/create_redirect_url_request.rb +215 -0
- data/lib/clerk-http-client/models/create_saml_connection_request.rb +355 -0
- data/lib/clerk-http-client/models/create_saml_connection_request_attribute_mapping.rb +242 -0
- data/lib/clerk-http-client/models/create_session_token_from_template200_response.rb +257 -0
- data/lib/clerk-http-client/models/create_sign_in_token_request.rb +227 -0
- data/lib/clerk-http-client/models/create_user_request.rb +453 -0
- data/lib/clerk-http-client/models/deleted_object.rb +255 -0
- data/lib/clerk-http-client/models/disable_mfa200_response.rb +214 -0
- data/lib/clerk-http-client/models/domain.rb +368 -0
- data/lib/clerk-http-client/models/domains.rb +240 -0
- data/lib/clerk-http-client/models/email_address.rb +361 -0
- data/lib/clerk-http-client/models/email_address_verification.rb +106 -0
- data/lib/clerk-http-client/models/get_o_auth_access_token200_response_inner.rb +295 -0
- data/lib/clerk-http-client/models/identification_link.rb +271 -0
- data/lib/clerk-http-client/models/instance_restrictions.rb +285 -0
- data/lib/clerk-http-client/models/invitation.rb +388 -0
- data/lib/clerk-http-client/models/jwt_template.rb +387 -0
- data/lib/clerk-http-client/models/merge_organization_metadata_request.rb +225 -0
- data/lib/clerk-http-client/models/o_auth_application.rb +449 -0
- data/lib/clerk-http-client/models/o_auth_application_with_secret.rb +466 -0
- data/lib/clerk-http-client/models/o_auth_applications.rb +240 -0
- data/lib/clerk-http-client/models/oauth.rb +328 -0
- data/lib/clerk-http-client/models/oauth_error.rb +104 -0
- data/lib/clerk-http-client/models/organization.rb +413 -0
- data/lib/clerk-http-client/models/organization_domain.rb +364 -0
- data/lib/clerk-http-client/models/organization_domain_verification.rb +281 -0
- data/lib/clerk-http-client/models/organization_domains.rb +240 -0
- data/lib/clerk-http-client/models/organization_invitation.rb +342 -0
- data/lib/clerk-http-client/models/organization_invitation_with_public_organization_data.rb +351 -0
- data/lib/clerk-http-client/models/organization_invitation_with_public_organization_data_public_organization_data.rb +250 -0
- data/lib/clerk-http-client/models/organization_invitations.rb +240 -0
- data/lib/clerk-http-client/models/organization_invitations_with_public_organization_data.rb +240 -0
- data/lib/clerk-http-client/models/organization_membership.rb +346 -0
- data/lib/clerk-http-client/models/organization_membership_public_user_data.rb +272 -0
- data/lib/clerk-http-client/models/organization_memberships.rb +240 -0
- data/lib/clerk-http-client/models/organization_settings.rb +391 -0
- data/lib/clerk-http-client/models/organization_with_logo.rb +454 -0
- data/lib/clerk-http-client/models/organizations.rb +240 -0
- data/lib/clerk-http-client/models/otp.rb +315 -0
- data/lib/clerk-http-client/models/passkey.rb +324 -0
- data/lib/clerk-http-client/models/phone_number.rb +391 -0
- data/lib/clerk-http-client/models/phone_number_verification.rb +105 -0
- data/lib/clerk-http-client/models/preview_template_request.rb +246 -0
- data/lib/clerk-http-client/models/proxy_check.rb +367 -0
- data/lib/clerk-http-client/models/redirect_url.rb +321 -0
- data/lib/clerk-http-client/models/revoke_invitation200_response.rb +395 -0
- data/lib/clerk-http-client/models/revoke_organization_invitation_request.rb +216 -0
- data/lib/clerk-http-client/models/saml.rb +331 -0
- data/lib/clerk-http-client/models/saml_account.rb +381 -0
- data/lib/clerk-http-client/models/saml_account_saml_connection.rb +104 -0
- data/lib/clerk-http-client/models/saml_account_verification.rb +105 -0
- data/lib/clerk-http-client/models/saml_connection.rb +362 -0
- data/lib/clerk-http-client/models/saml_connections.rb +240 -0
- data/lib/clerk-http-client/models/schemas_passkey.rb +310 -0
- data/lib/clerk-http-client/models/schemas_passkey_verification.rb +104 -0
- data/lib/clerk-http-client/models/schemas_saml_connection.rb +541 -0
- data/lib/clerk-http-client/models/schemas_saml_connection_attribute_mapping.rb +241 -0
- data/lib/clerk-http-client/models/session.rb +444 -0
- data/lib/clerk-http-client/models/session_latest_activity.rb +300 -0
- data/lib/clerk-http-client/models/sign_in_token.rb +368 -0
- data/lib/clerk-http-client/models/sign_up.rb +517 -0
- data/lib/clerk-http-client/models/svix_url.rb +221 -0
- data/lib/clerk-http-client/models/template.rb +460 -0
- data/lib/clerk-http-client/models/testing_token.rb +289 -0
- data/lib/clerk-http-client/models/ticket.rb +303 -0
- data/lib/clerk-http-client/models/toggle_template_delivery_request.rb +216 -0
- data/lib/clerk-http-client/models/total_count.rb +272 -0
- data/lib/clerk-http-client/models/totp.rb +289 -0
- data/lib/clerk-http-client/models/update_domain_request.rb +238 -0
- data/lib/clerk-http-client/models/update_email_address_request.rb +227 -0
- data/lib/clerk-http-client/models/update_instance_auth_config200_response.rb +294 -0
- data/lib/clerk-http-client/models/update_instance_auth_config_request.rb +273 -0
- data/lib/clerk-http-client/models/update_instance_organization_settings_request.rb +277 -0
- data/lib/clerk-http-client/models/update_instance_request.rb +300 -0
- data/lib/clerk-http-client/models/update_instance_restrictions_request.rb +255 -0
- data/lib/clerk-http-client/models/update_o_auth_application_request.rb +237 -0
- data/lib/clerk-http-client/models/update_organization_domain_request.rb +227 -0
- data/lib/clerk-http-client/models/update_organization_membership_metadata_request.rb +225 -0
- data/lib/clerk-http-client/models/update_organization_membership_request.rb +222 -0
- data/lib/clerk-http-client/models/update_organization_request.rb +279 -0
- data/lib/clerk-http-client/models/update_phone_number_request.rb +238 -0
- data/lib/clerk-http-client/models/update_production_instance_domain_request.rb +215 -0
- data/lib/clerk-http-client/models/update_saml_connection_request.rb +347 -0
- data/lib/clerk-http-client/models/update_saml_connection_request_attribute_mapping.rb +242 -0
- data/lib/clerk-http-client/models/update_sign_up_request.rb +216 -0
- data/lib/clerk-http-client/models/update_user_metadata_request.rb +241 -0
- data/lib/clerk-http-client/models/update_user_request.rb +472 -0
- data/lib/clerk-http-client/models/upsert_template_request.rb +278 -0
- data/lib/clerk-http-client/models/user.rb +633 -0
- data/lib/clerk-http-client/models/verify_client_request.rb +215 -0
- data/lib/clerk-http-client/models/verify_domain_proxy_request.rb +225 -0
- data/lib/clerk-http-client/models/verify_password200_response.rb +214 -0
- data/lib/clerk-http-client/models/verify_password_request.rb +222 -0
- data/lib/clerk-http-client/models/verify_session_request.rb +215 -0
- data/lib/clerk-http-client/models/verify_totp200_response.rb +257 -0
- data/lib/clerk-http-client/models/verify_totp_request.rb +222 -0
- data/lib/clerk-http-client/models/web3_signature.rb +323 -0
- data/lib/clerk-http-client/models/web3_wallet.rb +327 -0
- data/lib/clerk-http-client/models/web3_wallet_verification.rb +105 -0
- data/lib/clerk-http-client/models/well_known_jwks.rb +216 -0
- data/lib/clerk-http-client/models/well_known_jwks_keys_inner.rb +259 -0
- data/lib/clerk-http-client/version.rb +15 -0
- data/lib/clerk-http-client.rb +321 -0
- data/openapitools.json +7 -0
- data/pkg/clerk-http-client-1.0.0.gem +0 -0
- data/resources/.DS_Store +0 -0
- data/resources/oas/bapi-2024-10-01.yml +7238 -0
- data/resources/templates/Gemfile.mustache +9 -0
- data/resources/templates/README.mustache +163 -0
- data/resources/templates/Rakefile.mustache +10 -0
- data/resources/templates/api.mustache +257 -0
- data/resources/templates/api_client.mustache +246 -0
- data/resources/templates/api_client_faraday_partial.mustache +200 -0
- data/resources/templates/api_client_httpx_partial.mustache +134 -0
- data/resources/templates/api_client_typhoeus_partial.mustache +161 -0
- data/resources/templates/api_doc.mustache +132 -0
- data/resources/templates/api_error.mustache +50 -0
- data/resources/templates/api_info.mustache +12 -0
- data/resources/templates/api_test.mustache +47 -0
- data/resources/templates/base_object.mustache +114 -0
- data/resources/templates/configuration.mustache +491 -0
- data/resources/templates/configuration_faraday_partial.mustache +40 -0
- data/resources/templates/configuration_httpx_partial.mustache +11 -0
- data/resources/templates/configuration_typhoeus_partial.mustache +41 -0
- data/resources/templates/gem.mustache +89 -0
- data/resources/templates/gemspec.mustache +41 -0
- data/resources/templates/git_push.sh.mustache +57 -0
- data/resources/templates/gitignore.mustache +39 -0
- data/resources/templates/gitlab-ci.mustache +26 -0
- data/resources/templates/model.mustache +33 -0
- data/resources/templates/model_doc.mustache +12 -0
- data/resources/templates/model_test.mustache +82 -0
- data/resources/templates/partial_anyof_module.mustache +94 -0
- data/resources/templates/partial_model_enum_class.mustache +23 -0
- data/resources/templates/partial_model_generic.mustache +377 -0
- data/resources/templates/partial_model_generic_doc.mustache +28 -0
- data/resources/templates/partial_oneof_module.mustache +137 -0
- data/resources/templates/partial_oneof_module_doc.mustache +93 -0
- data/resources/templates/rspec.mustache +2 -0
- data/resources/templates/rubocop.mustache +148 -0
- data/resources/templates/spec_helper.mustache +103 -0
- data/resources/templates/travis.mustache +11 -0
- data/resources/templates/version.mustache +7 -0
- data/sdk-generator-config.json +20 -0
- data/spec/api/actor_tokens_api_spec.rb +59 -0
- data/spec/api/allow_list_block_list_api_spec.rb +105 -0
- data/spec/api/beta_features_api_spec.rb +71 -0
- data/spec/api/clients_api_spec.rb +72 -0
- data/spec/api/domains_api_spec.rb +83 -0
- data/spec/api/email_addresses_api_spec.rb +84 -0
- data/spec/api/email_sms_templates_api_spec.rb +115 -0
- data/spec/api/instance_settings_api_spec.rb +71 -0
- data/spec/api/invitations_api_spec.rb +73 -0
- data/spec/api/jwks_api_spec.rb +46 -0
- data/spec/api/jwt_templates_api_spec.rb +94 -0
- data/spec/api/miscellaneous_api_spec.rb +48 -0
- data/spec/api/o_auth_applications_api_spec.rb +109 -0
- data/spec/api/organization_domain_api_spec.rb +49 -0
- data/spec/api/organization_domains_api_spec.rb +77 -0
- data/spec/api/organization_invitations_api_spec.rb +133 -0
- data/spec/api/organization_memberships_api_spec.rb +118 -0
- data/spec/api/organizations_api_spec.rb +139 -0
- data/spec/api/phone_numbers_api_spec.rb +84 -0
- data/spec/api/proxy_checks_api_spec.rb +47 -0
- data/spec/api/redirect_urls_api_spec.rb +82 -0
- data/spec/api/saml_connections_api_spec.rb +97 -0
- data/spec/api/sessions_api_spec.rb +101 -0
- data/spec/api/sign_in_tokens_api_spec.rb +59 -0
- data/spec/api/sign_ups_api_spec.rb +48 -0
- data/spec/api/testing_tokens_api_spec.rb +46 -0
- data/spec/api/users_api_spec.rb +366 -0
- data/spec/api/webhooks_api_spec.rb +68 -0
- data/spec/models/actor_token_spec.rb +92 -0
- data/spec/models/add_domain_request_spec.rb +48 -0
- data/spec/models/admin_spec.rb +62 -0
- data/spec/models/allowlist_identifier_spec.rb +86 -0
- data/spec/models/blocklist_identifier_spec.rb +80 -0
- data/spec/models/blocklist_identifiers_spec.rb +42 -0
- data/spec/models/c_name_target_spec.rb +48 -0
- data/spec/models/change_production_instance_domain_request_spec.rb +42 -0
- data/spec/models/clerk_error_spec.rb +60 -0
- data/spec/models/clerk_errors_spec.rb +42 -0
- data/spec/models/client_spec.rb +88 -0
- data/spec/models/create_actor_token_request_spec.rb +54 -0
- data/spec/models/create_allowlist_identifier_request_spec.rb +42 -0
- data/spec/models/create_blocklist_identifier_request_spec.rb +36 -0
- data/spec/models/create_email_address_request_spec.rb +54 -0
- data/spec/models/create_invitation_request_spec.rb +66 -0
- data/spec/models/create_jwt_template_request_spec.rb +72 -0
- data/spec/models/create_o_auth_application_request_spec.rb +54 -0
- data/spec/models/create_organization_domain_request_spec.rb +48 -0
- data/spec/models/create_organization_invitation_bulk_request_inner_spec.rb +66 -0
- data/spec/models/create_organization_invitation_request_spec.rb +66 -0
- data/spec/models/create_organization_membership_request_spec.rb +42 -0
- data/spec/models/create_organization_request_spec.rb +72 -0
- data/spec/models/create_phone_number_request_spec.rb +60 -0
- data/spec/models/create_redirect_url_request_spec.rb +36 -0
- data/spec/models/create_saml_connection_request_attribute_mapping_spec.rb +54 -0
- data/spec/models/create_saml_connection_request_spec.rb +88 -0
- data/spec/models/create_session_token_from_template200_response_spec.rb +46 -0
- data/spec/models/create_sign_in_token_request_spec.rb +42 -0
- data/spec/models/create_user_request_spec.rb +168 -0
- data/spec/models/deleted_object_spec.rb +54 -0
- data/spec/models/disable_mfa200_response_spec.rb +36 -0
- data/spec/models/domain_spec.rb +88 -0
- data/spec/models/domains_spec.rb +42 -0
- data/spec/models/email_address_spec.rb +82 -0
- data/spec/models/email_address_verification_spec.rb +32 -0
- data/spec/models/get_o_auth_access_token200_response_inner_spec.rb +84 -0
- data/spec/models/identification_link_spec.rb +46 -0
- data/spec/models/instance_restrictions_spec.rb +64 -0
- data/spec/models/invitation_spec.rb +98 -0
- data/spec/models/jwt_template_spec.rb +94 -0
- data/spec/models/merge_organization_metadata_request_spec.rb +42 -0
- data/spec/models/o_auth_application_spec.rb +112 -0
- data/spec/models/o_auth_application_with_secret_spec.rb +118 -0
- data/spec/models/o_auth_applications_spec.rb +42 -0
- data/spec/models/oauth_error_spec.rb +32 -0
- data/spec/models/oauth_spec.rb +74 -0
- data/spec/models/organization_domain_spec.rb +104 -0
- data/spec/models/organization_domain_verification_spec.rb +58 -0
- data/spec/models/organization_domains_spec.rb +42 -0
- data/spec/models/organization_invitation_spec.rb +100 -0
- data/spec/models/organization_invitation_with_public_organization_data_public_organization_data_spec.rb +60 -0
- data/spec/models/organization_invitation_with_public_organization_data_spec.rb +106 -0
- data/spec/models/organization_invitations_spec.rb +42 -0
- data/spec/models/organization_invitations_with_public_organization_data_spec.rb +42 -0
- data/spec/models/organization_membership_public_user_data_spec.rb +72 -0
- data/spec/models/organization_membership_spec.rb +100 -0
- data/spec/models/organization_memberships_spec.rb +42 -0
- data/spec/models/organization_settings_spec.rb +98 -0
- data/spec/models/organization_spec.rb +106 -0
- data/spec/models/organization_with_logo_spec.rb +124 -0
- data/spec/models/organizations_spec.rb +42 -0
- data/spec/models/otp_spec.rb +62 -0
- data/spec/models/passkey_spec.rb +72 -0
- data/spec/models/phone_number_spec.rb +100 -0
- data/spec/models/phone_number_verification_spec.rb +32 -0
- data/spec/models/preview_template_request_spec.rb +54 -0
- data/spec/models/proxy_check_spec.rb +82 -0
- data/spec/models/redirect_url_spec.rb +64 -0
- data/spec/models/revoke_invitation200_response_spec.rb +98 -0
- data/spec/models/revoke_organization_invitation_request_spec.rb +36 -0
- data/spec/models/saml_account_saml_connection_spec.rb +32 -0
- data/spec/models/saml_account_spec.rb +100 -0
- data/spec/models/saml_account_verification_spec.rb +32 -0
- data/spec/models/saml_connection_spec.rb +96 -0
- data/spec/models/saml_connections_spec.rb +42 -0
- data/spec/models/saml_spec.rb +74 -0
- data/spec/models/schemas_passkey_spec.rb +64 -0
- data/spec/models/schemas_passkey_verification_spec.rb +32 -0
- data/spec/models/schemas_saml_connection_attribute_mapping_spec.rb +54 -0
- data/spec/models/schemas_saml_connection_spec.rb +166 -0
- data/spec/models/session_latest_activity_spec.rb +84 -0
- data/spec/models/session_spec.rb +116 -0
- data/spec/models/sign_in_token_spec.rb +86 -0
- data/spec/models/sign_up_spec.rb +176 -0
- data/spec/models/svix_url_spec.rb +36 -0
- data/spec/models/template_spec.rb +166 -0
- data/spec/models/testing_token_spec.rb +52 -0
- data/spec/models/ticket_spec.rb +62 -0
- data/spec/models/toggle_template_delivery_request_spec.rb +36 -0
- data/spec/models/total_count_spec.rb +46 -0
- data/spec/models/totp_spec.rb +66 -0
- data/spec/models/update_domain_request_spec.rb +48 -0
- data/spec/models/update_email_address_request_spec.rb +42 -0
- data/spec/models/update_instance_auth_config200_response_spec.rb +70 -0
- data/spec/models/update_instance_auth_config_request_spec.rb +66 -0
- data/spec/models/update_instance_organization_settings_request_spec.rb +72 -0
- data/spec/models/update_instance_request_spec.rb +84 -0
- data/spec/models/update_instance_restrictions_request_spec.rb +60 -0
- data/spec/models/update_o_auth_application_request_spec.rb +48 -0
- data/spec/models/update_organization_domain_request_spec.rb +42 -0
- data/spec/models/update_organization_membership_metadata_request_spec.rb +42 -0
- data/spec/models/update_organization_membership_request_spec.rb +36 -0
- data/spec/models/update_organization_request_spec.rb +72 -0
- data/spec/models/update_phone_number_request_spec.rb +48 -0
- data/spec/models/update_production_instance_domain_request_spec.rb +36 -0
- data/spec/models/update_saml_connection_request_attribute_mapping_spec.rb +54 -0
- data/spec/models/update_saml_connection_request_spec.rb +108 -0
- data/spec/models/update_sign_up_request_spec.rb +36 -0
- data/spec/models/update_user_metadata_request_spec.rb +48 -0
- data/spec/models/update_user_request_spec.rb +180 -0
- data/spec/models/upsert_template_request_spec.rb +72 -0
- data/spec/models/user_spec.rb +268 -0
- data/spec/models/verify_client_request_spec.rb +36 -0
- data/spec/models/verify_domain_proxy_request_spec.rb +42 -0
- data/spec/models/verify_password200_response_spec.rb +36 -0
- data/spec/models/verify_password_request_spec.rb +36 -0
- data/spec/models/verify_session_request_spec.rb +36 -0
- data/spec/models/verify_totp200_response_spec.rb +46 -0
- data/spec/models/verify_totp_request_spec.rb +36 -0
- data/spec/models/web3_signature_spec.rb +74 -0
- data/spec/models/web3_wallet_spec.rb +70 -0
- data/spec/models/web3_wallet_verification_spec.rb +32 -0
- data/spec/models/well_known_jwks_keys_inner_spec.rb +66 -0
- data/spec/models/well_known_jwks_spec.rb +36 -0
- data/spec/spec_helper.rb +111 -0
- data/test.rb +2 -0
- metadata +782 -0
@@ -0,0 +1,385 @@
|
|
1
|
+
=begin
|
2
|
+
#Clerk Backend API
|
3
|
+
|
4
|
+
#The Clerk REST Backend API, meant to be accessed by backend servers. ### Versions When the API changes in a way that isn't compatible with older versions, a new version is released. Each version is identified by its release date, e.g. `2021-02-05`. For more information, please see [Clerk API Versions](https://clerk.com/docs/backend-requests/versioning/overview). Please see https://clerk.com/docs for more information.
|
5
|
+
|
6
|
+
The version of the OpenAPI document: v1
|
7
|
+
Contact: support@clerk.com
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
Generator version: 7.9.0
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'cgi'
|
14
|
+
|
15
|
+
module ClerkHttpClient
|
16
|
+
class SessionsApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# Create a session token from a jwt template
|
23
|
+
# Creates a JSON Web Token(JWT) based on a session and a JWT Template name defined for your instance
|
24
|
+
# @param session_id [String] The ID of the session
|
25
|
+
# @param template_name [String] The name of the JWT Template defined in your instance (e.g. `custom_hasura`).
|
26
|
+
# @param [Hash] opts the optional parameters
|
27
|
+
# @return [CreateSessionTokenFromTemplate200Response]
|
28
|
+
|
29
|
+
def create_token_from_template(session_id, template_name, opts = {})
|
30
|
+
data, _status_code, _headers = create_token_from_template_with_http_info(session_id, template_name, opts)
|
31
|
+
data
|
32
|
+
end
|
33
|
+
|
34
|
+
# Create a session token from a jwt template
|
35
|
+
# Creates a JSON Web Token(JWT) based on a session and a JWT Template name defined for your instance
|
36
|
+
# @param session_id [String] The ID of the session
|
37
|
+
# @param template_name [String] The name of the JWT Template defined in your instance (e.g. `custom_hasura`).
|
38
|
+
# @param [Hash] opts the optional parameters
|
39
|
+
# @return [Array<(CreateSessionTokenFromTemplate200Response, Integer, Hash)>] CreateSessionTokenFromTemplate200Response data, response status code and response headers
|
40
|
+
# POST
|
41
|
+
def create_token_from_template_with_http_info(session_id, template_name, opts = {})
|
42
|
+
if @api_client.config.debugging
|
43
|
+
@api_client.config.logger.debug 'Calling API: SessionsApi.create_session_token_from_template ...'
|
44
|
+
end
|
45
|
+
# verify the required parameter 'session_id' is set
|
46
|
+
if @api_client.config.client_side_validation && session_id.nil?
|
47
|
+
fail ArgumentError, "Missing the required parameter 'session_id' when calling SessionsApi.create_session_token_from_template"
|
48
|
+
end
|
49
|
+
# verify the required parameter 'template_name' is set
|
50
|
+
if @api_client.config.client_side_validation && template_name.nil?
|
51
|
+
fail ArgumentError, "Missing the required parameter 'template_name' when calling SessionsApi.create_session_token_from_template"
|
52
|
+
end
|
53
|
+
# resource path
|
54
|
+
local_var_path = '/sessions/{session_id}/tokens/{template_name}'.sub('{' + 'session_id' + '}', CGI.escape(session_id.to_s)).sub('{' + 'template_name' + '}', CGI.escape(template_name.to_s))
|
55
|
+
|
56
|
+
# query parameters
|
57
|
+
query_params = opts[:query_params] || {}
|
58
|
+
|
59
|
+
# header parameters
|
60
|
+
header_params = opts[:header_params] || {}
|
61
|
+
# HTTP header 'Accept' (if needed)
|
62
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
63
|
+
|
64
|
+
# form parameters
|
65
|
+
form_params = opts[:form_params] || {}
|
66
|
+
|
67
|
+
# http body (model)
|
68
|
+
post_body = opts[:debug_body]
|
69
|
+
|
70
|
+
# return_type
|
71
|
+
return_type = opts[:debug_return_type] || 'CreateSessionTokenFromTemplate200Response'
|
72
|
+
|
73
|
+
# auth_names
|
74
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
75
|
+
|
76
|
+
new_options = opts.merge(
|
77
|
+
:operation => :"SessionsApi.create_session_token_from_template",
|
78
|
+
:header_params => header_params,
|
79
|
+
:query_params => query_params,
|
80
|
+
:form_params => form_params,
|
81
|
+
:body => post_body,
|
82
|
+
:auth_names => auth_names,
|
83
|
+
:return_type => return_type
|
84
|
+
)
|
85
|
+
|
86
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
87
|
+
if @api_client.config.debugging
|
88
|
+
@api_client.config.logger.debug "API called: SessionsApi#create_session_token_from_template\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
89
|
+
end
|
90
|
+
return data, status_code, headers
|
91
|
+
end
|
92
|
+
|
93
|
+
# Retrieve a session
|
94
|
+
# Retrieve the details of a session
|
95
|
+
# @param session_id [String] The ID of the session
|
96
|
+
# @param [Hash] opts the optional parameters
|
97
|
+
# @return [Session]
|
98
|
+
|
99
|
+
def find(session_id, opts = {})
|
100
|
+
data, _status_code, _headers = find_with_http_info(session_id, opts)
|
101
|
+
data
|
102
|
+
end
|
103
|
+
|
104
|
+
# Retrieve a session
|
105
|
+
# Retrieve the details of a session
|
106
|
+
# @param session_id [String] The ID of the session
|
107
|
+
# @param [Hash] opts the optional parameters
|
108
|
+
# @return [Array<(Session, Integer, Hash)>] Session data, response status code and response headers
|
109
|
+
# GET
|
110
|
+
def find_with_http_info(session_id, opts = {})
|
111
|
+
if @api_client.config.debugging
|
112
|
+
@api_client.config.logger.debug 'Calling API: SessionsApi.get_session ...'
|
113
|
+
end
|
114
|
+
# verify the required parameter 'session_id' is set
|
115
|
+
if @api_client.config.client_side_validation && session_id.nil?
|
116
|
+
fail ArgumentError, "Missing the required parameter 'session_id' when calling SessionsApi.get_session"
|
117
|
+
end
|
118
|
+
# resource path
|
119
|
+
local_var_path = '/sessions/{session_id}'.sub('{' + 'session_id' + '}', CGI.escape(session_id.to_s))
|
120
|
+
|
121
|
+
# query parameters
|
122
|
+
query_params = opts[:query_params] || {}
|
123
|
+
|
124
|
+
# header parameters
|
125
|
+
header_params = opts[:header_params] || {}
|
126
|
+
# HTTP header 'Accept' (if needed)
|
127
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
128
|
+
|
129
|
+
# form parameters
|
130
|
+
form_params = opts[:form_params] || {}
|
131
|
+
|
132
|
+
# http body (model)
|
133
|
+
post_body = opts[:debug_body]
|
134
|
+
|
135
|
+
# return_type
|
136
|
+
return_type = opts[:debug_return_type] || 'Session'
|
137
|
+
|
138
|
+
# auth_names
|
139
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
140
|
+
|
141
|
+
new_options = opts.merge(
|
142
|
+
:operation => :"SessionsApi.get_session",
|
143
|
+
:header_params => header_params,
|
144
|
+
:query_params => query_params,
|
145
|
+
:form_params => form_params,
|
146
|
+
:body => post_body,
|
147
|
+
:auth_names => auth_names,
|
148
|
+
:return_type => return_type
|
149
|
+
)
|
150
|
+
|
151
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
152
|
+
if @api_client.config.debugging
|
153
|
+
@api_client.config.logger.debug "API called: SessionsApi#get_session\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
154
|
+
end
|
155
|
+
return data, status_code, headers
|
156
|
+
end
|
157
|
+
|
158
|
+
# List all sessions
|
159
|
+
# Returns a list of all sessions. The sessions are returned sorted by creation date, with the newest sessions appearing first. **Deprecation Notice (2024-01-01):** All parameters were initially considered optional, however moving forward at least one of `client_id` or `user_id` parameters should be provided.
|
160
|
+
# @param [Hash] opts the optional parameters
|
161
|
+
# @option opts [String] :client_id List sessions for the given client
|
162
|
+
# @option opts [String] :user_id List sessions for the given user
|
163
|
+
# @option opts [String] :status Filter sessions by the provided status
|
164
|
+
# @option opts [Float] :limit Applies a limit to the number of results returned. Can be used for paginating the results together with `offset`. (default to 10)
|
165
|
+
# @option opts [Float] :offset Skip the first `offset` results when paginating. Needs to be an integer greater or equal to zero. To be used in conjunction with `limit`. (default to 0)
|
166
|
+
# @return [Array<Session>]
|
167
|
+
|
168
|
+
def all(opts = {})
|
169
|
+
data, _status_code, _headers = all_with_http_info(opts)
|
170
|
+
data
|
171
|
+
end
|
172
|
+
|
173
|
+
# List all sessions
|
174
|
+
# Returns a list of all sessions. The sessions are returned sorted by creation date, with the newest sessions appearing first. **Deprecation Notice (2024-01-01):** All parameters were initially considered optional, however moving forward at least one of `client_id` or `user_id` parameters should be provided.
|
175
|
+
# @param [Hash] opts the optional parameters
|
176
|
+
# @option opts [String] :client_id List sessions for the given client
|
177
|
+
# @option opts [String] :user_id List sessions for the given user
|
178
|
+
# @option opts [String] :status Filter sessions by the provided status
|
179
|
+
# @option opts [Float] :limit Applies a limit to the number of results returned. Can be used for paginating the results together with `offset`. (default to 10)
|
180
|
+
# @option opts [Float] :offset Skip the first `offset` results when paginating. Needs to be an integer greater or equal to zero. To be used in conjunction with `limit`. (default to 0)
|
181
|
+
# @return [Array<(Array<Session>, Integer, Hash)>] Array<Session> data, response status code and response headers
|
182
|
+
# GET array
|
183
|
+
def all_with_http_info(opts = {})
|
184
|
+
if @api_client.config.debugging
|
185
|
+
@api_client.config.logger.debug 'Calling API: SessionsApi.get_session_list ...'
|
186
|
+
end
|
187
|
+
allowable_values = ["abandoned", "active", "ended", "expired", "removed", "replaced", "revoked"]
|
188
|
+
if @api_client.config.client_side_validation && opts[:'status'] && !allowable_values.include?(opts[:'status'])
|
189
|
+
fail ArgumentError, "invalid value for \"status\", must be one of #{allowable_values}"
|
190
|
+
end
|
191
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 500
|
192
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling SessionsApi.get_session_list, must be smaller than or equal to 500.'
|
193
|
+
end
|
194
|
+
|
195
|
+
if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
|
196
|
+
fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling SessionsApi.get_session_list, must be greater than or equal to 1.'
|
197
|
+
end
|
198
|
+
|
199
|
+
if @api_client.config.client_side_validation && !opts[:'offset'].nil? && opts[:'offset'] < 0
|
200
|
+
fail ArgumentError, 'invalid value for "opts[:"offset"]" when calling SessionsApi.get_session_list, must be greater than or equal to 0.'
|
201
|
+
end
|
202
|
+
|
203
|
+
# resource path
|
204
|
+
local_var_path = '/sessions'
|
205
|
+
|
206
|
+
# query parameters
|
207
|
+
query_params = opts[:query_params] || {}
|
208
|
+
query_params[:'client_id'] = opts[:'client_id'] if !opts[:'client_id'].nil?
|
209
|
+
query_params[:'user_id'] = opts[:'user_id'] if !opts[:'user_id'].nil?
|
210
|
+
query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil?
|
211
|
+
query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
|
212
|
+
query_params[:'offset'] = opts[:'offset'] if !opts[:'offset'].nil?
|
213
|
+
|
214
|
+
# header parameters
|
215
|
+
header_params = opts[:header_params] || {}
|
216
|
+
# HTTP header 'Accept' (if needed)
|
217
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
218
|
+
|
219
|
+
# form parameters
|
220
|
+
form_params = opts[:form_params] || {}
|
221
|
+
|
222
|
+
# http body (model)
|
223
|
+
post_body = opts[:debug_body]
|
224
|
+
|
225
|
+
# return_type
|
226
|
+
return_type = opts[:debug_return_type] || 'Array<Session>'
|
227
|
+
|
228
|
+
# auth_names
|
229
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
230
|
+
|
231
|
+
new_options = opts.merge(
|
232
|
+
:operation => :"SessionsApi.get_session_list",
|
233
|
+
:header_params => header_params,
|
234
|
+
:query_params => query_params,
|
235
|
+
:form_params => form_params,
|
236
|
+
:body => post_body,
|
237
|
+
:auth_names => auth_names,
|
238
|
+
:return_type => return_type
|
239
|
+
)
|
240
|
+
|
241
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
242
|
+
if @api_client.config.debugging
|
243
|
+
@api_client.config.logger.debug "API called: SessionsApi#get_session_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
244
|
+
end
|
245
|
+
return data, status_code, headers
|
246
|
+
end
|
247
|
+
|
248
|
+
# Revoke a session
|
249
|
+
# Sets the status of a session as \"revoked\", which is an unauthenticated state. In multi-session mode, a revoked session will still be returned along with its client object, however the user will need to sign in again.
|
250
|
+
# @param session_id [String] The ID of the session
|
251
|
+
# @param [Hash] opts the optional parameters
|
252
|
+
# @return [Session]
|
253
|
+
|
254
|
+
def revoke(session_id, opts = {})
|
255
|
+
data, _status_code, _headers = revoke_with_http_info(session_id, opts)
|
256
|
+
data
|
257
|
+
end
|
258
|
+
|
259
|
+
# Revoke a session
|
260
|
+
# Sets the status of a session as \"revoked\", which is an unauthenticated state. In multi-session mode, a revoked session will still be returned along with its client object, however the user will need to sign in again.
|
261
|
+
# @param session_id [String] The ID of the session
|
262
|
+
# @param [Hash] opts the optional parameters
|
263
|
+
# @return [Array<(Session, Integer, Hash)>] Session data, response status code and response headers
|
264
|
+
# POST
|
265
|
+
def revoke_with_http_info(session_id, opts = {})
|
266
|
+
if @api_client.config.debugging
|
267
|
+
@api_client.config.logger.debug 'Calling API: SessionsApi.revoke_session ...'
|
268
|
+
end
|
269
|
+
# verify the required parameter 'session_id' is set
|
270
|
+
if @api_client.config.client_side_validation && session_id.nil?
|
271
|
+
fail ArgumentError, "Missing the required parameter 'session_id' when calling SessionsApi.revoke_session"
|
272
|
+
end
|
273
|
+
# resource path
|
274
|
+
local_var_path = '/sessions/{session_id}/revoke'.sub('{' + 'session_id' + '}', CGI.escape(session_id.to_s))
|
275
|
+
|
276
|
+
# query parameters
|
277
|
+
query_params = opts[:query_params] || {}
|
278
|
+
|
279
|
+
# header parameters
|
280
|
+
header_params = opts[:header_params] || {}
|
281
|
+
# HTTP header 'Accept' (if needed)
|
282
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
283
|
+
|
284
|
+
# form parameters
|
285
|
+
form_params = opts[:form_params] || {}
|
286
|
+
|
287
|
+
# http body (model)
|
288
|
+
post_body = opts[:debug_body]
|
289
|
+
|
290
|
+
# return_type
|
291
|
+
return_type = opts[:debug_return_type] || 'Session'
|
292
|
+
|
293
|
+
# auth_names
|
294
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
295
|
+
|
296
|
+
new_options = opts.merge(
|
297
|
+
:operation => :"SessionsApi.revoke_session",
|
298
|
+
:header_params => header_params,
|
299
|
+
:query_params => query_params,
|
300
|
+
:form_params => form_params,
|
301
|
+
:body => post_body,
|
302
|
+
:auth_names => auth_names,
|
303
|
+
:return_type => return_type
|
304
|
+
)
|
305
|
+
|
306
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
307
|
+
if @api_client.config.debugging
|
308
|
+
@api_client.config.logger.debug "API called: SessionsApi#revoke_session\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
309
|
+
end
|
310
|
+
return data, status_code, headers
|
311
|
+
end
|
312
|
+
|
313
|
+
# Verify a session
|
314
|
+
# Returns the session if it is authenticated, otherwise returns an error. WARNING: This endpoint is deprecated and will be removed in future versions. We strongly recommend switching to networkless verification using short-lived session tokens, which is implemented transparently in all recent SDK versions (e.g. [NodeJS SDK](https://clerk.com/docs/backend-requests/handling/nodejs#clerk-express-require-auth)). For more details on how networkless verification works, refer to our [Session Tokens documentation](https://clerk.com/docs/backend-requests/resources/session-tokens).
|
315
|
+
# @param session_id [String] The ID of the session
|
316
|
+
# @param [Hash] opts the optional parameters
|
317
|
+
# @option opts [VerifySessionRequest] :verify_session_request Parameters.
|
318
|
+
# @return [Session]
|
319
|
+
|
320
|
+
def verify(session_id, opts = {})
|
321
|
+
data, _status_code, _headers = verify_with_http_info(session_id, opts)
|
322
|
+
data
|
323
|
+
end
|
324
|
+
|
325
|
+
# Verify a session
|
326
|
+
# Returns the session if it is authenticated, otherwise returns an error. WARNING: This endpoint is deprecated and will be removed in future versions. We strongly recommend switching to networkless verification using short-lived session tokens, which is implemented transparently in all recent SDK versions (e.g. [NodeJS SDK](https://clerk.com/docs/backend-requests/handling/nodejs#clerk-express-require-auth)). For more details on how networkless verification works, refer to our [Session Tokens documentation](https://clerk.com/docs/backend-requests/resources/session-tokens).
|
327
|
+
# @param session_id [String] The ID of the session
|
328
|
+
# @param [Hash] opts the optional parameters
|
329
|
+
# @option opts [VerifySessionRequest] :verify_session_request Parameters.
|
330
|
+
# @return [Array<(Session, Integer, Hash)>] Session data, response status code and response headers
|
331
|
+
# POST
|
332
|
+
def verify_with_http_info(session_id, opts = {})
|
333
|
+
if @api_client.config.debugging
|
334
|
+
@api_client.config.logger.debug 'Calling API: SessionsApi.verify_session ...'
|
335
|
+
end
|
336
|
+
# verify the required parameter 'session_id' is set
|
337
|
+
if @api_client.config.client_side_validation && session_id.nil?
|
338
|
+
fail ArgumentError, "Missing the required parameter 'session_id' when calling SessionsApi.verify_session"
|
339
|
+
end
|
340
|
+
# resource path
|
341
|
+
local_var_path = '/sessions/{session_id}/verify'.sub('{' + 'session_id' + '}', CGI.escape(session_id.to_s))
|
342
|
+
|
343
|
+
# query parameters
|
344
|
+
query_params = opts[:query_params] || {}
|
345
|
+
|
346
|
+
# header parameters
|
347
|
+
header_params = opts[:header_params] || {}
|
348
|
+
# HTTP header 'Accept' (if needed)
|
349
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
350
|
+
# HTTP header 'Content-Type'
|
351
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
352
|
+
if !content_type.nil?
|
353
|
+
header_params['Content-Type'] = content_type
|
354
|
+
end
|
355
|
+
|
356
|
+
# form parameters
|
357
|
+
form_params = opts[:form_params] || {}
|
358
|
+
|
359
|
+
# http body (model)
|
360
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'verify_session_request'])
|
361
|
+
|
362
|
+
# return_type
|
363
|
+
return_type = opts[:debug_return_type] || 'Session'
|
364
|
+
|
365
|
+
# auth_names
|
366
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
367
|
+
|
368
|
+
new_options = opts.merge(
|
369
|
+
:operation => :"SessionsApi.verify_session",
|
370
|
+
:header_params => header_params,
|
371
|
+
:query_params => query_params,
|
372
|
+
:form_params => form_params,
|
373
|
+
:body => post_body,
|
374
|
+
:auth_names => auth_names,
|
375
|
+
:return_type => return_type
|
376
|
+
)
|
377
|
+
|
378
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
379
|
+
if @api_client.config.debugging
|
380
|
+
@api_client.config.logger.debug "API called: SessionsApi#verify_session\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
381
|
+
end
|
382
|
+
return data, status_code, headers
|
383
|
+
end
|
384
|
+
end
|
385
|
+
end
|
@@ -0,0 +1,157 @@
|
|
1
|
+
=begin
|
2
|
+
#Clerk Backend API
|
3
|
+
|
4
|
+
#The Clerk REST Backend API, meant to be accessed by backend servers. ### Versions When the API changes in a way that isn't compatible with older versions, a new version is released. Each version is identified by its release date, e.g. `2021-02-05`. For more information, please see [Clerk API Versions](https://clerk.com/docs/backend-requests/versioning/overview). Please see https://clerk.com/docs for more information.
|
5
|
+
|
6
|
+
The version of the OpenAPI document: v1
|
7
|
+
Contact: support@clerk.com
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
Generator version: 7.9.0
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'cgi'
|
14
|
+
|
15
|
+
module ClerkHttpClient
|
16
|
+
class SignInTokensApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# Create sign-in token
|
23
|
+
# Creates a new sign-in token and associates it with the given user. By default, sign-in tokens expire in 30 days. You can optionally supply a different duration in seconds using the `expires_in_seconds` property.
|
24
|
+
# @param create_sign_in_token_request [CreateSignInTokenRequest]
|
25
|
+
# @param [Hash] opts the optional parameters
|
26
|
+
# @return [SignInToken]
|
27
|
+
|
28
|
+
def create(create_sign_in_token_request, opts = {})
|
29
|
+
data, _status_code, _headers = create_with_http_info(create_sign_in_token_request, opts)
|
30
|
+
data
|
31
|
+
end
|
32
|
+
|
33
|
+
# Create sign-in token
|
34
|
+
# Creates a new sign-in token and associates it with the given user. By default, sign-in tokens expire in 30 days. You can optionally supply a different duration in seconds using the `expires_in_seconds` property.
|
35
|
+
# @param create_sign_in_token_request [CreateSignInTokenRequest]
|
36
|
+
# @param [Hash] opts the optional parameters
|
37
|
+
# @return [Array<(SignInToken, Integer, Hash)>] SignInToken data, response status code and response headers
|
38
|
+
# POST
|
39
|
+
def create_with_http_info(create_sign_in_token_request, opts = {})
|
40
|
+
if @api_client.config.debugging
|
41
|
+
@api_client.config.logger.debug 'Calling API: SignInTokensApi.create_sign_in_token ...'
|
42
|
+
end
|
43
|
+
# verify the required parameter 'create_sign_in_token_request' is set
|
44
|
+
if @api_client.config.client_side_validation && create_sign_in_token_request.nil?
|
45
|
+
fail ArgumentError, "Missing the required parameter 'create_sign_in_token_request' when calling SignInTokensApi.create_sign_in_token"
|
46
|
+
end
|
47
|
+
# resource path
|
48
|
+
local_var_path = '/sign_in_tokens'
|
49
|
+
|
50
|
+
# query parameters
|
51
|
+
query_params = opts[:query_params] || {}
|
52
|
+
|
53
|
+
# header parameters
|
54
|
+
header_params = opts[:header_params] || {}
|
55
|
+
# HTTP header 'Accept' (if needed)
|
56
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
57
|
+
# HTTP header 'Content-Type'
|
58
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
59
|
+
if !content_type.nil?
|
60
|
+
header_params['Content-Type'] = content_type
|
61
|
+
end
|
62
|
+
|
63
|
+
# form parameters
|
64
|
+
form_params = opts[:form_params] || {}
|
65
|
+
|
66
|
+
# http body (model)
|
67
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(create_sign_in_token_request)
|
68
|
+
|
69
|
+
# return_type
|
70
|
+
return_type = opts[:debug_return_type] || 'SignInToken'
|
71
|
+
|
72
|
+
# auth_names
|
73
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
74
|
+
|
75
|
+
new_options = opts.merge(
|
76
|
+
:operation => :"SignInTokensApi.create_sign_in_token",
|
77
|
+
:header_params => header_params,
|
78
|
+
:query_params => query_params,
|
79
|
+
:form_params => form_params,
|
80
|
+
:body => post_body,
|
81
|
+
:auth_names => auth_names,
|
82
|
+
:return_type => return_type
|
83
|
+
)
|
84
|
+
|
85
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
86
|
+
if @api_client.config.debugging
|
87
|
+
@api_client.config.logger.debug "API called: SignInTokensApi#create_sign_in_token\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
88
|
+
end
|
89
|
+
return data, status_code, headers
|
90
|
+
end
|
91
|
+
|
92
|
+
# Revoke the given sign-in token
|
93
|
+
# Revokes a pending sign-in token
|
94
|
+
# @param sign_in_token_id [String] The ID of the sign-in token to be revoked
|
95
|
+
# @param [Hash] opts the optional parameters
|
96
|
+
# @return [SignInToken]
|
97
|
+
|
98
|
+
def revoke(sign_in_token_id, opts = {})
|
99
|
+
data, _status_code, _headers = revoke_with_http_info(sign_in_token_id, opts)
|
100
|
+
data
|
101
|
+
end
|
102
|
+
|
103
|
+
# Revoke the given sign-in token
|
104
|
+
# Revokes a pending sign-in token
|
105
|
+
# @param sign_in_token_id [String] The ID of the sign-in token to be revoked
|
106
|
+
# @param [Hash] opts the optional parameters
|
107
|
+
# @return [Array<(SignInToken, Integer, Hash)>] SignInToken data, response status code and response headers
|
108
|
+
# POST
|
109
|
+
def revoke_with_http_info(sign_in_token_id, opts = {})
|
110
|
+
if @api_client.config.debugging
|
111
|
+
@api_client.config.logger.debug 'Calling API: SignInTokensApi.revoke_sign_in_token ...'
|
112
|
+
end
|
113
|
+
# verify the required parameter 'sign_in_token_id' is set
|
114
|
+
if @api_client.config.client_side_validation && sign_in_token_id.nil?
|
115
|
+
fail ArgumentError, "Missing the required parameter 'sign_in_token_id' when calling SignInTokensApi.revoke_sign_in_token"
|
116
|
+
end
|
117
|
+
# resource path
|
118
|
+
local_var_path = '/sign_in_tokens/{sign_in_token_id}/revoke'.sub('{' + 'sign_in_token_id' + '}', CGI.escape(sign_in_token_id.to_s))
|
119
|
+
|
120
|
+
# query parameters
|
121
|
+
query_params = opts[:query_params] || {}
|
122
|
+
|
123
|
+
# header parameters
|
124
|
+
header_params = opts[:header_params] || {}
|
125
|
+
# HTTP header 'Accept' (if needed)
|
126
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
127
|
+
|
128
|
+
# form parameters
|
129
|
+
form_params = opts[:form_params] || {}
|
130
|
+
|
131
|
+
# http body (model)
|
132
|
+
post_body = opts[:debug_body]
|
133
|
+
|
134
|
+
# return_type
|
135
|
+
return_type = opts[:debug_return_type] || 'SignInToken'
|
136
|
+
|
137
|
+
# auth_names
|
138
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
139
|
+
|
140
|
+
new_options = opts.merge(
|
141
|
+
:operation => :"SignInTokensApi.revoke_sign_in_token",
|
142
|
+
:header_params => header_params,
|
143
|
+
:query_params => query_params,
|
144
|
+
:form_params => form_params,
|
145
|
+
:body => post_body,
|
146
|
+
:auth_names => auth_names,
|
147
|
+
:return_type => return_type
|
148
|
+
)
|
149
|
+
|
150
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
151
|
+
if @api_client.config.debugging
|
152
|
+
@api_client.config.logger.debug "API called: SignInTokensApi#revoke_sign_in_token\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
153
|
+
end
|
154
|
+
return data, status_code, headers
|
155
|
+
end
|
156
|
+
end
|
157
|
+
end
|
@@ -0,0 +1,98 @@
|
|
1
|
+
=begin
|
2
|
+
#Clerk Backend API
|
3
|
+
|
4
|
+
#The Clerk REST Backend API, meant to be accessed by backend servers. ### Versions When the API changes in a way that isn't compatible with older versions, a new version is released. Each version is identified by its release date, e.g. `2021-02-05`. For more information, please see [Clerk API Versions](https://clerk.com/docs/backend-requests/versioning/overview). Please see https://clerk.com/docs for more information.
|
5
|
+
|
6
|
+
The version of the OpenAPI document: v1
|
7
|
+
Contact: support@clerk.com
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
Generator version: 7.9.0
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'cgi'
|
14
|
+
|
15
|
+
module ClerkHttpClient
|
16
|
+
class SignUpsApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# Update a sign-up
|
23
|
+
# Update the sign-up with the given ID
|
24
|
+
# @param id [String] The ID of the sign-up to update
|
25
|
+
# @param update_sign_up_request [UpdateSignUpRequest]
|
26
|
+
# @param [Hash] opts the optional parameters
|
27
|
+
# @return [SignUp]
|
28
|
+
|
29
|
+
def update(id, update_sign_up_request, opts = {})
|
30
|
+
data, _status_code, _headers = update_with_http_info(id, update_sign_up_request, opts)
|
31
|
+
data
|
32
|
+
end
|
33
|
+
|
34
|
+
# Update a sign-up
|
35
|
+
# Update the sign-up with the given ID
|
36
|
+
# @param id [String] The ID of the sign-up to update
|
37
|
+
# @param update_sign_up_request [UpdateSignUpRequest]
|
38
|
+
# @param [Hash] opts the optional parameters
|
39
|
+
# @return [Array<(SignUp, Integer, Hash)>] SignUp data, response status code and response headers
|
40
|
+
# PATCH
|
41
|
+
def update_with_http_info(id, update_sign_up_request, opts = {})
|
42
|
+
if @api_client.config.debugging
|
43
|
+
@api_client.config.logger.debug 'Calling API: SignUpsApi.update_sign_up ...'
|
44
|
+
end
|
45
|
+
# verify the required parameter 'id' is set
|
46
|
+
if @api_client.config.client_side_validation && id.nil?
|
47
|
+
fail ArgumentError, "Missing the required parameter 'id' when calling SignUpsApi.update_sign_up"
|
48
|
+
end
|
49
|
+
# verify the required parameter 'update_sign_up_request' is set
|
50
|
+
if @api_client.config.client_side_validation && update_sign_up_request.nil?
|
51
|
+
fail ArgumentError, "Missing the required parameter 'update_sign_up_request' when calling SignUpsApi.update_sign_up"
|
52
|
+
end
|
53
|
+
# resource path
|
54
|
+
local_var_path = '/sign_ups/{id}'.sub('{' + 'id' + '}', CGI.escape(id.to_s))
|
55
|
+
|
56
|
+
# query parameters
|
57
|
+
query_params = opts[:query_params] || {}
|
58
|
+
|
59
|
+
# header parameters
|
60
|
+
header_params = opts[:header_params] || {}
|
61
|
+
# HTTP header 'Accept' (if needed)
|
62
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
63
|
+
# HTTP header 'Content-Type'
|
64
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
65
|
+
if !content_type.nil?
|
66
|
+
header_params['Content-Type'] = content_type
|
67
|
+
end
|
68
|
+
|
69
|
+
# form parameters
|
70
|
+
form_params = opts[:form_params] || {}
|
71
|
+
|
72
|
+
# http body (model)
|
73
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(update_sign_up_request)
|
74
|
+
|
75
|
+
# return_type
|
76
|
+
return_type = opts[:debug_return_type] || 'SignUp'
|
77
|
+
|
78
|
+
# auth_names
|
79
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
80
|
+
|
81
|
+
new_options = opts.merge(
|
82
|
+
:operation => :"SignUpsApi.update_sign_up",
|
83
|
+
:header_params => header_params,
|
84
|
+
:query_params => query_params,
|
85
|
+
:form_params => form_params,
|
86
|
+
:body => post_body,
|
87
|
+
:auth_names => auth_names,
|
88
|
+
:return_type => return_type
|
89
|
+
)
|
90
|
+
|
91
|
+
data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
|
92
|
+
if @api_client.config.debugging
|
93
|
+
@api_client.config.logger.debug "API called: SignUpsApi#update_sign_up\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
94
|
+
end
|
95
|
+
return data, status_code, headers
|
96
|
+
end
|
97
|
+
end
|
98
|
+
end
|