workos 9.5.1 → 10.3.0
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 +4 -4
- data/.claude/CLAUDE.md +38 -0
- data/.github/workflows/block-generated-edits.yml +13 -0
- data/.github/workflows/ci.yml +2 -2
- data/.github/workflows/docs.yml +2 -2
- data/.github/workflows/lint.yml +2 -2
- data/.github/workflows/release-please.yml +11 -6
- data/.github/workflows/release.yml +2 -2
- data/.last-synced-sha +1 -1
- data/.oagen-manifest.json +502 -57
- data/.release-please-manifest.json +1 -1
- data/AGENTS.md +1 -0
- data/CHANGELOG.md +330 -2
- data/Gemfile.lock +2 -2
- data/README.md +15 -14
- data/lib/workos/agents/agent_admin_link_claim_attempt_to_external_user_request.rb +28 -0
- data/lib/workos/agents/agent_admin_link_claim_attempt_to_external_user_request_user.rb +22 -0
- data/lib/workos/agents/agent_admin_validate_credential_request.rb +25 -0
- data/lib/workos/agents/agent_blueprint.rb +43 -0
- data/lib/workos/agents/agent_blueprint_invocable_by.rb +7 -0
- data/lib/workos/agents/agent_blueprint_session_setting.rb +25 -0
- data/lib/workos/agents/agent_blueprints_create_request.rb +31 -0
- data/lib/workos/agents/agent_blueprints_create_request_invocable_by.rb +22 -0
- data/lib/workos/agents/agent_blueprints_create_request_session_setting.rb +7 -0
- data/lib/workos/agents/agent_blueprints_token_mint_token_request.rb +34 -0
- data/lib/workos/agents/agent_blueprints_token_validate_token_request.rb +18 -0
- data/lib/workos/agents/agent_blueprints_update_request.rb +31 -0
- data/lib/workos/agents/agent_blueprints_update_request_invocable_by.rb +7 -0
- data/lib/workos/agents/agent_blueprints_update_request_session_setting.rb +25 -0
- data/lib/workos/agents/agent_credential_validation.rb +25 -0
- data/lib/workos/{organization_domains/organization_domain_stand_alone.rb → agents/agent_instance.rb} +10 -16
- data/lib/workos/agents/agent_instance_session.rb +40 -0
- data/lib/workos/agents/agent_registration.rb +40 -0
- data/lib/workos/agents/agent_registration_agent_identity.rb +28 -0
- data/lib/workos/agents/agent_registration_claim.rb +31 -0
- data/lib/workos/agents/agent_registration_claim_claim_completion.rb +31 -0
- data/lib/workos/agents/agent_token.rb +40 -0
- data/lib/workos/agents/agent_token_validation.rb +40 -0
- data/lib/workos/agents/claim_view_response.rb +28 -0
- data/lib/workos/agents/claim_view_response_organization.rb +7 -0
- data/lib/workos/agents.rb +488 -0
- data/lib/workos/api_keys/api_key_validation_response.rb +6 -2
- data/lib/workos/api_keys/validate_api_key.rb +1 -12
- data/lib/workos/api_keys.rb +3 -4
- data/lib/workos/audit_logs.rb +23 -5
- data/lib/workos/authorization/permission_created_data.rb +1 -34
- data/lib/workos/authorization/permission_deleted_data.rb +1 -1
- data/lib/workos/authorization/permission_updated_data.rb +1 -1
- data/lib/workos/authorization.rb +27 -27
- data/lib/workos/base_client.rb +4 -4
- data/lib/workos/client.rb +8 -0
- data/lib/workos/connect.rb +25 -21
- data/lib/workos/directory_sync.rb +10 -2
- data/lib/workos/events.rb +2 -2
- data/lib/workos/groups.rb +13 -9
- data/lib/workos/inflections.rb +15 -1
- data/lib/workos/organization_domains.rb +4 -4
- data/lib/workos/{sso/connection_option.rb → organizations/create_it_contact.rb} +4 -4
- data/lib/workos/organizations/invite_it_contact.rb +18 -0
- data/lib/workos/organizations/it_contact.rb +31 -0
- data/lib/workos/organizations/it_contact_list.rb +25 -0
- data/lib/workos/organizations/organization_authorized_connect_application_list_data.rb +34 -0
- data/lib/workos/organizations/organization_input.rb +10 -1
- data/lib/workos/organizations/update_audit_logs_retention.rb +13 -1
- data/lib/workos/organizations.rb +167 -11
- data/lib/workos/pipes/api_key_installation.rb +25 -0
- data/lib/workos/pipes/connected_account.rb +9 -0
- data/lib/workos/pipes/{connected_account_dto.rb → connected_account_input.rb} +1 -1
- data/lib/workos/pipes/create_data_integration.rb +10 -1
- data/lib/workos/pipes/data_integration.rb +9 -0
- data/lib/workos/pipes/{data_integration_credentials_dto.rb → data_integration_credentials_input.rb} +1 -1
- data/lib/workos/pipes/data_integration_installation.rb +28 -0
- data/lib/workos/pipes/data_integrations_get_data_integration_authorize_url_request.rb +5 -2
- data/lib/workos/pipes/data_integrations_list_response_data_connected_account.rb +9 -0
- data/lib/workos/pipes/data_integrations_upsert_api_key_request.rb +1 -19
- data/lib/workos/pipes/data_integrations_upsert_client_credentials_request.rb +31 -0
- data/lib/workos/pipes/update_data_integration.rb +4 -1
- data/lib/workos/pipes.rb +69 -17
- data/lib/workos/pipes_provider/configure_data_integration_body.rb +5 -2
- data/lib/workos/pipes_provider/data_integration_configuration_response.rb +3 -0
- data/lib/workos/pipes_provider.rb +6 -3
- data/lib/workos/platform_teams/create_team.rb +22 -0
- data/lib/workos/platform_teams/team.rb +37 -0
- data/lib/workos/platform_teams.rb +58 -0
- data/lib/workos/shared/access_token_agent_registration_credential_issued_data_detail.rb +25 -0
- data/lib/workos/shared/agent_blueprint_created.rb +34 -0
- data/lib/workos/shared/agent_blueprint_created_data.rb +43 -0
- data/lib/workos/shared/agent_blueprint_created_data_invocable_by.rb +22 -0
- data/lib/workos/shared/agent_blueprint_created_data_session_setting.rb +25 -0
- data/lib/workos/shared/agent_blueprint_deleted.rb +34 -0
- data/lib/workos/shared/agent_blueprint_deleted_data.rb +31 -0
- data/lib/workos/shared/agent_blueprint_updated.rb +34 -0
- data/lib/workos/shared/agent_blueprint_updated_data.rb +7 -0
- data/lib/workos/shared/agent_blueprint_updated_data_invocable_by.rb +7 -0
- data/lib/workos/shared/agent_blueprint_updated_data_session_setting.rb +7 -0
- data/lib/workos/shared/agent_instance_created.rb +34 -0
- data/lib/workos/shared/agent_instance_created_data.rb +40 -0
- data/lib/workos/shared/agent_instance_deleted.rb +34 -0
- data/lib/workos/shared/agent_instance_deleted_data.rb +40 -0
- data/lib/workos/shared/agent_instance_session_created.rb +34 -0
- data/lib/workos/shared/agent_instance_session_created_data.rb +43 -0
- data/lib/workos/shared/agent_instance_session_revoked.rb +34 -0
- data/lib/workos/shared/agent_instance_session_revoked_data.rb +40 -0
- data/lib/workos/shared/agent_registration_claim_attempt_created.rb +34 -0
- data/lib/workos/shared/agent_registration_claim_attempt_created_data.rb +40 -0
- data/lib/workos/shared/agent_registration_claim_completed.rb +34 -0
- data/lib/workos/shared/agent_registration_claim_completed_data.rb +40 -0
- data/lib/workos/shared/agent_registration_claim_completed_data_claimed_by.rb +22 -0
- data/lib/workos/shared/agent_registration_created.rb +34 -0
- data/lib/workos/shared/agent_registration_created_data.rb +43 -0
- data/lib/workos/shared/agent_registration_created_data_agent_identity.rb +25 -0
- data/lib/workos/shared/agent_registration_credential_issued.rb +34 -0
- data/lib/workos/shared/agent_registration_credential_issued_data.rb +34 -0
- data/lib/workos/shared/agent_registration_credential_issued_data_detail.rb +22 -0
- data/lib/workos/shared/agent_registration_deleted.rb +34 -0
- data/lib/workos/shared/agent_registration_deleted_data.rb +18 -0
- data/lib/workos/shared/agent_registration_expired.rb +34 -0
- data/lib/workos/shared/agent_registration_expired_data.rb +7 -0
- data/lib/workos/shared/agent_registration_organization_switched.rb +34 -0
- data/lib/workos/shared/agent_registration_organization_switched_data.rb +25 -0
- data/lib/workos/shared/agent_registration_refreshed.rb +34 -0
- data/lib/workos/shared/agent_registration_refreshed_data.rb +7 -0
- data/lib/workos/shared/agent_registration_revoked.rb +34 -0
- data/lib/workos/shared/agent_registration_revoked_data.rb +7 -0
- data/lib/workos/shared/pipes_connected_account_connection_failed.rb +34 -0
- data/lib/workos/shared/pipes_connected_account_connection_failed_data.rb +46 -0
- data/lib/workos/shared/radar_challenge_created.rb +34 -0
- data/lib/workos/shared/radar_challenge_created_data.rb +28 -0
- data/lib/workos/shared/resource_export_completed.rb +34 -0
- data/lib/workos/shared/resource_export_completed_data.rb +22 -0
- data/lib/workos/shared/resource_export_created.rb +34 -0
- data/lib/workos/shared/resource_export_created_data.rb +22 -0
- data/lib/workos/shared/resource_export_downloaded.rb +34 -0
- data/lib/workos/shared/resource_export_downloaded_data.rb +22 -0
- data/lib/workos/shared/resource_export_failed.rb +34 -0
- data/lib/workos/shared/resource_export_failed_data.rb +22 -0
- data/lib/workos/shared/waitlist_user.rb +11 -5
- data/lib/workos/sso/connection.rb +0 -3
- data/lib/workos/sso/create_connection.rb +37 -0
- data/lib/workos/sso/create_connection_attribute_maps.rb +22 -0
- data/lib/workos/sso/create_connection_key_pair.rb +22 -0
- data/lib/workos/sso/create_connection_oidc_options.rb +43 -0
- data/lib/workos/sso/create_connection_saml_options.rb +40 -0
- data/lib/workos/sso/create_connection_standard_attributes.rb +34 -0
- data/lib/workos/{admin_portal/domain_verification_intent_options.rb → sso/create_saml_idp_signing_certificate.rb} +4 -4
- data/lib/workos/sso/patch_connection.rb +34 -0
- data/lib/workos/sso/patch_connection_attribute_maps.rb +22 -0
- data/lib/workos/sso/patch_connection_oidc_options.rb +40 -0
- data/lib/workos/sso/patch_connection_saml_options.rb +31 -0
- data/lib/workos/sso/patch_connection_standard_attributes.rb +7 -0
- data/lib/workos/sso/saml_idp_signing_certificate.rb +34 -0
- data/lib/workos/sso/saml_idp_signing_certificate_list.rb +22 -0
- data/lib/workos/sso/saml_sp_encryption_certificate.rb +34 -0
- data/lib/workos/sso/saml_sp_encryption_certificate_list.rb +22 -0
- data/lib/workos/sso/saml_sp_signing_certificate.rb +34 -0
- data/lib/workos/sso/token_query.rb +11 -2
- data/lib/workos/sso.rb +378 -30
- data/lib/workos/types/agent_admin_validate_credential_request_type.rb +13 -0
- data/lib/workos/types/agent_blueprints_token_mint_token_request_type.rb +15 -0
- data/lib/workos/types/agent_instance_created_data_type.rb +13 -0
- data/lib/workos/types/{data_integration_credentials_type.rb → agent_instance_deleted_data_type.rb} +1 -1
- data/lib/workos/types/agent_instance_session_status.rb +14 -0
- data/lib/workos/types/{organization_domain_stand_alone_state.rb → agent_instance_type.rb} +1 -1
- data/lib/workos/types/agent_registration_created_data_kind.rb +14 -0
- data/lib/workos/types/agent_registration_created_data_method.rb +14 -0
- data/lib/workos/types/agent_registration_created_data_status.rb +15 -0
- data/lib/workos/types/{organization_domain_stand_alone_verification_strategy.rb → agent_registration_kind.rb} +1 -1
- data/lib/workos/types/agent_registration_status.rb +9 -0
- data/lib/workos/types/applications_registration_types.rb +13 -0
- data/lib/workos/types/authenticate_response_authentication_method.rb +1 -2
- data/lib/workos/types/claim_view_response_status.rb +9 -0
- data/lib/workos/types/connected_account_auth_method.rb +2 -1
- data/lib/workos/types/connected_account_input_state.rb +13 -0
- data/lib/workos/types/connected_account_state.rb +2 -1
- data/lib/workos/types/connection_activated_data_connection_type.rb +1 -2
- data/lib/workos/types/connection_type.rb +1 -2
- data/lib/workos/types/connections_connection_type.rb +1 -2
- data/lib/workos/types/create_connection_oidc_options_id_token_signature_algorithm.rb +24 -0
- data/lib/workos/types/create_connection_oidc_options_token_authentication_method.rb +14 -0
- data/lib/workos/types/create_data_integration_auth_methods.rb +9 -0
- data/lib/workos/types/create_user_password_hash_type.rb +2 -1
- data/lib/workos/types/create_user_password_salt_position.rb +13 -0
- data/lib/workos/types/create_webhook_endpoint_events.rb +13 -1
- data/lib/workos/types/data_integration_auth_methods.rb +9 -0
- data/lib/workos/types/data_integration_credentials_input_type.rb +9 -0
- data/lib/workos/types/data_integrations_list_response_data_connected_account_state.rb +1 -6
- data/lib/workos/types/invite_it_contact_intents.rb +16 -0
- data/lib/workos/types/patch_connection_oidc_options_id_token_signature_algorithm.rb +9 -0
- data/lib/workos/types/patch_connection_oidc_options_token_authentication_method.rb +9 -0
- data/lib/workos/types/pipe_connected_account_state.rb +1 -5
- data/lib/workos/types/resource_export_completed_data_resource_type.rb +16 -0
- data/lib/workos/types/resource_export_created_data_resource_type.rb +9 -0
- data/lib/workos/types/resource_export_downloaded_data_resource_type.rb +9 -0
- data/lib/workos/types/resource_export_failed_data_resource_type.rb +9 -0
- data/lib/workos/types/session_created_data_status.rb +1 -6
- data/lib/workos/types/session_revoked_data_status.rb +1 -1
- data/lib/workos/types/sso_grant_type.rb +13 -0
- data/lib/workos/types/team_production_state.rb +15 -0
- data/lib/workos/types/token_query_grant_type.rb +9 -0
- data/lib/workos/types/update_audit_logs_retention_retention_period.rb +32 -0
- data/lib/workos/types/update_user_password_salt_position.rb +9 -0
- data/lib/workos/types/user_identities_get_item_provider.rb +1 -2
- data/lib/workos/types/user_management_waitlists_state.rb +14 -0
- data/lib/workos/types/user_sessions_status.rb +1 -1
- data/lib/workos/types/vault_kek_deleted_data_actor_source.rb +9 -0
- data/lib/workos/types/waitlist_entry_state.rb +9 -0
- data/lib/workos/types/waitlist_user_state.rb +1 -6
- data/lib/workos/user_management/authentication_oauth_failed_data.rb +5 -2
- data/lib/workos/user_management/authentication_oauth_succeeded_data.rb +5 -2
- data/lib/workos/user_management/authentication_reauthentication_succeeded.rb +34 -0
- data/lib/workos/user_management/authentication_reauthentication_succeeded_data.rb +34 -0
- data/lib/workos/user_management/create_password_reset_token.rb +1 -12
- data/lib/workos/user_management/create_user.rb +5 -2
- data/lib/workos/user_management/create_waitlist_entry.rb +25 -0
- data/lib/workos/user_management/email_completion_session_authenticate_request.rb +43 -0
- data/lib/workos/user_management/radar_challenge.rb +43 -0
- data/lib/workos/user_management/update_user.rb +5 -2
- data/lib/workos/user_management/waitlist.rb +28 -0
- data/lib/workos/user_management/waitlist_entry.rb +43 -0
- data/lib/workos/user_management.rb +340 -74
- data/lib/workos/vault/vault_kek_deleted.rb +34 -0
- data/lib/workos/vault/vault_kek_deleted_data.rb +31 -0
- data/lib/workos/vault.rb +4 -4
- data/lib/workos/version.rb +1 -1
- data/lib/workos/widgets.rb +2 -2
- data/lib/workos.rb +12 -0
- data/rbi/workos/access_token_agent_registration_credential_issued_data_detail.rbi +36 -0
- data/rbi/workos/agent_admin_link_claim_attempt_to_external_user_request.rbi +42 -0
- data/rbi/workos/agent_admin_link_claim_attempt_to_external_user_request_user.rbi +30 -0
- data/rbi/workos/agent_admin_validate_credential_request.rbi +36 -0
- data/rbi/workos/agent_blueprint.rbi +72 -0
- data/rbi/workos/agent_blueprint_created.rbi +54 -0
- data/rbi/workos/agent_blueprint_created_data.rbi +72 -0
- data/rbi/workos/agent_blueprint_created_data_invocable_by.rbi +30 -0
- data/rbi/workos/agent_blueprint_created_data_session_setting.rbi +36 -0
- data/rbi/workos/agent_blueprint_deleted.rbi +54 -0
- data/rbi/workos/agent_blueprint_deleted_data.rbi +48 -0
- data/rbi/workos/agent_blueprint_invocable_by.rbi +30 -0
- data/rbi/workos/agent_blueprint_session_setting.rbi +36 -0
- data/rbi/workos/agent_blueprint_updated.rbi +54 -0
- data/rbi/workos/agent_blueprint_updated_data.rbi +72 -0
- data/rbi/workos/agent_blueprint_updated_data_invocable_by.rbi +30 -0
- data/rbi/workos/agent_blueprint_updated_data_session_setting.rbi +36 -0
- data/rbi/workos/agent_blueprints_create_request.rbi +48 -0
- data/rbi/workos/agent_blueprints_create_request_invocable_by.rbi +30 -0
- data/rbi/workos/agent_blueprints_create_request_session_setting.rbi +36 -0
- data/rbi/workos/agent_blueprints_token_mint_token_request.rbi +54 -0
- data/rbi/workos/{domain_verification_intent_options.rbi → agent_blueprints_token_validate_token_request.rbi} +5 -5
- data/rbi/workos/agent_blueprints_update_request.rbi +48 -0
- data/rbi/workos/agent_blueprints_update_request_invocable_by.rbi +30 -0
- data/rbi/workos/agent_blueprints_update_request_session_setting.rbi +36 -0
- data/rbi/workos/{sso_intent_options.rbi → agent_credential_validation.rbi} +11 -5
- data/rbi/workos/agent_instance.rbi +66 -0
- data/rbi/workos/agent_instance_created.rbi +54 -0
- data/rbi/workos/agent_instance_created_data.rbi +66 -0
- data/rbi/workos/agent_instance_deleted.rbi +54 -0
- data/rbi/workos/agent_instance_deleted_data.rbi +66 -0
- data/rbi/workos/agent_instance_session.rbi +66 -0
- data/rbi/workos/agent_instance_session_created.rbi +54 -0
- data/rbi/workos/agent_instance_session_created_data.rbi +72 -0
- data/rbi/workos/agent_instance_session_revoked.rbi +54 -0
- data/rbi/workos/agent_instance_session_revoked_data.rbi +66 -0
- data/rbi/workos/agent_registration.rbi +66 -0
- data/rbi/workos/agent_registration_agent_identity.rbi +42 -0
- data/rbi/workos/agent_registration_claim.rbi +48 -0
- data/rbi/workos/agent_registration_claim_attempt_created.rbi +54 -0
- data/rbi/workos/agent_registration_claim_attempt_created_data.rbi +66 -0
- data/rbi/workos/agent_registration_claim_claim_completion.rbi +48 -0
- data/rbi/workos/agent_registration_claim_completed.rbi +54 -0
- data/rbi/workos/agent_registration_claim_completed_data.rbi +66 -0
- data/rbi/workos/agent_registration_claim_completed_data_claimed_by.rbi +30 -0
- data/rbi/workos/agent_registration_created.rbi +54 -0
- data/rbi/workos/agent_registration_created_data.rbi +72 -0
- data/rbi/workos/agent_registration_created_data_agent_identity.rbi +36 -0
- data/rbi/workos/agent_registration_credential_issued.rbi +54 -0
- data/rbi/workos/agent_registration_credential_issued_data.rbi +54 -0
- data/rbi/workos/agent_registration_credential_issued_data_detail.rbi +30 -0
- data/rbi/workos/agent_registration_deleted.rbi +54 -0
- data/rbi/workos/{connection_option.rbi → agent_registration_deleted_data.rbi} +5 -5
- data/rbi/workos/agent_registration_expired.rbi +54 -0
- data/rbi/workos/agent_registration_expired_data.rbi +24 -0
- data/rbi/workos/agent_registration_organization_switched.rbi +54 -0
- data/rbi/workos/agent_registration_organization_switched_data.rbi +36 -0
- data/rbi/workos/agent_registration_refreshed.rbi +54 -0
- data/rbi/workos/agent_registration_refreshed_data.rbi +24 -0
- data/rbi/workos/agent_registration_revoked.rbi +54 -0
- data/rbi/workos/agent_registration_revoked_data.rbi +24 -0
- data/rbi/workos/agent_token.rbi +66 -0
- data/rbi/workos/agent_token_validation.rbi +66 -0
- data/rbi/workos/agents.rbi +175 -0
- data/rbi/workos/api_key_installation.rbi +36 -0
- data/rbi/workos/api_key_validation_response.rbi +6 -0
- data/rbi/workos/audit_logs.rbi +26 -2
- data/rbi/workos/authentication_oauth_failed_data.rbi +6 -0
- data/rbi/workos/authentication_oauth_succeeded_data.rbi +6 -0
- data/rbi/workos/authentication_reauthentication_succeeded.rbi +54 -0
- data/rbi/workos/authentication_reauthentication_succeeded_data.rbi +54 -0
- data/rbi/workos/claim_view_response.rbi +42 -0
- data/rbi/workos/claim_view_response_organization.rbi +30 -0
- data/rbi/workos/client.rbi +6 -0
- data/rbi/workos/configure_data_integration_body.rbi +6 -0
- data/rbi/workos/connect.rbi +2 -1
- data/rbi/workos/connected_account.rbi +18 -0
- data/rbi/workos/{connected_account_dto.rbi → connected_account_input.rbi} +1 -1
- data/rbi/workos/connection.rbi +0 -6
- data/rbi/workos/create_connection.rbi +60 -0
- data/rbi/workos/create_connection_attribute_maps.rbi +30 -0
- data/rbi/workos/create_connection_key_pair.rbi +30 -0
- data/rbi/workos/create_connection_oidc_options.rbi +72 -0
- data/rbi/workos/create_connection_saml_options.rbi +66 -0
- data/rbi/workos/create_connection_standard_attributes.rbi +54 -0
- data/rbi/workos/create_data_integration.rbi +20 -2
- data/rbi/workos/create_it_contact.rbi +24 -0
- data/rbi/workos/create_saml_idp_signing_certificate.rbi +24 -0
- data/rbi/workos/create_team.rbi +30 -0
- data/rbi/workos/create_user.rbi +6 -0
- data/rbi/workos/create_waitlist_entry.rbi +36 -0
- data/rbi/workos/custom_provider_definition.rbi +4 -4
- data/rbi/workos/data_integration.rbi +20 -2
- data/rbi/workos/data_integration_configuration_response.rbi +6 -0
- data/rbi/workos/{data_integration_credentials_dto.rbi → data_integration_credentials_input.rbi} +1 -1
- data/rbi/workos/data_integration_installation.rbi +42 -0
- data/rbi/workos/data_integrations_get_data_integration_authorize_url_request.rbi +6 -0
- data/rbi/workos/data_integrations_list_response_data_connected_account.rbi +18 -0
- data/rbi/workos/data_integrations_upsert_client_credentials_request.rbi +48 -0
- data/rbi/workos/directory_sync.rbi +3 -1
- data/rbi/workos/email_completion_session_authenticate_request.rbi +72 -0
- data/rbi/workos/events.rbi +2 -2
- data/rbi/workos/groups.rbi +2 -1
- data/rbi/workos/invite_it_contact.rbi +24 -0
- data/rbi/workos/it_contact.rbi +48 -0
- data/rbi/workos/organization_authorized_connect_application_list_data.rbi +54 -0
- data/rbi/workos/organization_domains.rbi +2 -2
- data/rbi/workos/organizations.rbi +57 -0
- data/rbi/workos/patch_connection.rbi +54 -0
- data/rbi/workos/patch_connection_attribute_maps.rbi +30 -0
- data/rbi/workos/patch_connection_oidc_options.rbi +66 -0
- data/rbi/workos/patch_connection_saml_options.rbi +48 -0
- data/rbi/workos/patch_connection_standard_attributes.rbi +54 -0
- data/rbi/workos/permission_created_data.rbi +6 -0
- data/rbi/workos/permission_deleted_data.rbi +6 -0
- data/rbi/workos/permission_updated_data.rbi +6 -0
- data/rbi/workos/pipes.rbi +23 -5
- data/rbi/workos/pipes_connected_account_connection_failed.rbi +54 -0
- data/rbi/workos/{organization_domain_stand_alone.rbi → pipes_connected_account_connection_failed_data.rbi} +23 -23
- data/rbi/workos/pipes_provider.rbi +2 -1
- data/rbi/workos/platform_teams.rbi +30 -0
- data/rbi/workos/radar_challenge.rbi +72 -0
- data/rbi/workos/radar_challenge_created.rbi +54 -0
- data/rbi/workos/radar_challenge_created_data.rbi +42 -0
- data/rbi/workos/radar_sms_challenge_code_session_authenticate_request.rbi +4 -4
- data/rbi/workos/resource_export_completed.rbi +54 -0
- data/rbi/workos/resource_export_completed_data.rbi +30 -0
- data/rbi/workos/resource_export_created.rbi +54 -0
- data/rbi/workos/resource_export_created_data.rbi +30 -0
- data/rbi/workos/resource_export_downloaded.rbi +54 -0
- data/rbi/workos/resource_export_downloaded_data.rbi +30 -0
- data/rbi/workos/resource_export_failed.rbi +54 -0
- data/rbi/workos/resource_export_failed_data.rbi +30 -0
- data/rbi/workos/saml_idp_signing_certificate.rbi +54 -0
- data/rbi/workos/saml_idp_signing_certificate_list.rbi +30 -0
- data/rbi/workos/saml_sp_encryption_certificate.rbi +54 -0
- data/rbi/workos/saml_sp_encryption_certificate_list.rbi +30 -0
- data/rbi/workos/saml_sp_signing_certificate.rbi +54 -0
- data/rbi/workos/sso.rbi +181 -2
- data/rbi/workos/team.rbi +60 -0
- data/rbi/workos/token_query.rbi +20 -2
- data/rbi/workos/update_audit_logs_retention.rbi +8 -2
- data/rbi/workos/update_data_integration.rbi +8 -2
- data/rbi/workos/update_user.rbi +6 -0
- data/rbi/workos/user_management.rbi +116 -2
- data/rbi/workos/vault_kek_deleted.rbi +54 -0
- data/rbi/workos/vault_kek_deleted_data.rbi +48 -0
- data/rbi/workos/waitlist.rbi +42 -0
- data/rbi/workos/waitlist_entry.rbi +72 -0
- data/rbi/workos/waitlist_user.rbi +18 -6
- data/rbi/workos/widget_session_token.rbi +2 -2
- data/rbi/workos/widgets.rbi +1 -1
- data/test/workos/test_agents.rb +153 -0
- data/test/workos/test_agents_model_round_trip.rb +410 -0
- data/test/workos/test_api_keys_model_round_trip.rb +307 -0
- data/test/workos/test_audit_logs.rb +11 -2
- data/test/workos/test_authkit_helpers.rb +22 -10
- data/test/workos/test_authorization.rb +6 -6
- data/test/workos/test_authorization_model_round_trip.rb +237 -0
- data/test/workos/test_base_client.rb +27 -0
- data/test/workos/test_client_api_model_round_trip.rb +31 -0
- data/test/workos/test_connect_model_round_trip.rb +175 -0
- data/test/workos/test_directory_sync_model_round_trip.rb +579 -0
- data/test/workos/test_events.rb +2 -2
- data/test/workos/test_feature_flags_model_round_trip.rb +580 -0
- data/test/workos/test_groups_model_round_trip.rb +56 -0
- data/test/workos/test_multi_factor_auth_model_round_trip.rb +192 -0
- data/test/workos/test_organization_domains_model_round_trip.rb +260 -0
- data/test/workos/test_organization_membership_model_round_trip.rb +89 -0
- data/test/workos/test_organizations.rb +49 -1
- data/test/workos/test_organizations_model_round_trip.rb +642 -1
- data/test/workos/test_pipes.rb +8 -0
- data/test/workos/test_pipes_model_round_trip.rb +68 -8
- data/test/workos/test_pipes_provider_model_round_trip.rb +77 -0
- data/test/workos/test_platform_teams.rb +41 -0
- data/test/workos/test_platform_teams_model_round_trip.rb +41 -0
- data/test/workos/test_shared_model_round_trip.rb +1263 -0
- data/test/workos/test_sso.rb +108 -2
- data/test/workos/test_sso_model_round_trip.rb +681 -0
- data/test/workos/test_user_management.rb +78 -6
- data/test/workos/test_user_management_model_round_trip.rb +1604 -27
- data/test/workos/test_vault_model_round_trip.rb +571 -0
- data/test/workos/test_widgets.rb +2 -2
- data/test/workos/test_widgets_model_round_trip.rb +30 -0
- metadata +287 -19
- data/lib/workos/admin_portal/intent_options.rb +0 -22
- data/lib/workos/admin_portal/sso_intent_options.rb +0 -22
- data/rbi/workos/intent_options.rbi +0 -30
- data/test/workos/test_model_round_trip.rb +0 -6
data/lib/workos/sso.rb
CHANGED
|
@@ -3,9 +3,34 @@
|
|
|
3
3
|
# This file is auto-generated by oagen. Do not edit.
|
|
4
4
|
|
|
5
5
|
require "json"
|
|
6
|
+
require "uri"
|
|
6
7
|
|
|
7
8
|
module WorkOS
|
|
8
9
|
class SSO
|
|
10
|
+
# Identifies the protocol options (saml variant).
|
|
11
|
+
#
|
|
12
|
+
# @!attribute [r] saml_options
|
|
13
|
+
# @return [WorkOS::CreateConnectionSAMLOptions]
|
|
14
|
+
CreateProtocolOptionsSAML = Data.define(:saml_options)
|
|
15
|
+
|
|
16
|
+
# Identifies the protocol options (oidc variant).
|
|
17
|
+
#
|
|
18
|
+
# @!attribute [r] oidc_options
|
|
19
|
+
# @return [WorkOS::CreateConnectionOIDCOptions]
|
|
20
|
+
CreateProtocolOptionsOIDC = Data.define(:oidc_options)
|
|
21
|
+
|
|
22
|
+
# Identifies the protocol options (saml variant).
|
|
23
|
+
#
|
|
24
|
+
# @!attribute [r] saml_options
|
|
25
|
+
# @return [WorkOS::PatchConnectionSAMLOptions]
|
|
26
|
+
PatchProtocolOptionsSAML = Data.define(:saml_options)
|
|
27
|
+
|
|
28
|
+
# Identifies the protocol options (oidc variant).
|
|
29
|
+
#
|
|
30
|
+
# @!attribute [r] oidc_options
|
|
31
|
+
# @return [WorkOS::PatchConnectionOIDCOptions]
|
|
32
|
+
PatchProtocolOptionsOIDC = Data.define(:oidc_options)
|
|
33
|
+
|
|
9
34
|
def initialize(client)
|
|
10
35
|
@client = client
|
|
11
36
|
end
|
|
@@ -70,6 +95,228 @@ module WorkOS
|
|
|
70
95
|
)
|
|
71
96
|
end
|
|
72
97
|
|
|
98
|
+
# Create a Connection
|
|
99
|
+
# @param organization_id [String] Unique identifier for the Organization in which the Connection resides.
|
|
100
|
+
# @param name [String, nil] A human-readable name for the Connection. This will most commonly be the organization's name.
|
|
101
|
+
# @param external_id [String, nil] The customer-owned identifier for the Connection.
|
|
102
|
+
# @param connection_type [String, nil] The type of the Connection. Only SAML and OIDC connection types may be created. When omitted, the type is inferred from the provided options.
|
|
103
|
+
# @param attribute_maps [WorkOS::CreateConnectionAttributeMaps, nil] How IdP attributes or claims map onto WorkOS profile fields. Provided fields override the defaults for the connection type.
|
|
104
|
+
# @param protocol_options [WorkOS::SSO::CreateProtocolOptionsSAML, WorkOS::SSO::CreateProtocolOptionsOIDC] Identifies the protocol options.
|
|
105
|
+
# @param request_options [Hash] (see WorkOS::Types::RequestOptions)
|
|
106
|
+
# @return [WorkOS::Connection]
|
|
107
|
+
def create_connection(
|
|
108
|
+
organization_id:,
|
|
109
|
+
protocol_options:,
|
|
110
|
+
name: nil,
|
|
111
|
+
external_id: nil,
|
|
112
|
+
connection_type: nil,
|
|
113
|
+
attribute_maps: nil,
|
|
114
|
+
request_options: {}
|
|
115
|
+
)
|
|
116
|
+
body = {
|
|
117
|
+
"organization_id" => organization_id,
|
|
118
|
+
"name" => name,
|
|
119
|
+
"external_id" => external_id,
|
|
120
|
+
"connection_type" => connection_type,
|
|
121
|
+
"attribute_maps" => attribute_maps
|
|
122
|
+
}.compact
|
|
123
|
+
case protocol_options
|
|
124
|
+
when WorkOS::SSO::CreateProtocolOptionsSAML
|
|
125
|
+
body["saml_options"] = protocol_options.saml_options
|
|
126
|
+
when WorkOS::SSO::CreateProtocolOptionsOIDC
|
|
127
|
+
body["oidc_options"] = protocol_options.oidc_options
|
|
128
|
+
else
|
|
129
|
+
raise ArgumentError, "expected protocol_options to be one of: WorkOS::SSO::CreateProtocolOptionsSAML, WorkOS::SSO::CreateProtocolOptionsOIDC, got #{protocol_options.class}"
|
|
130
|
+
end
|
|
131
|
+
response = @client.request(
|
|
132
|
+
method: :post,
|
|
133
|
+
path: "/connections",
|
|
134
|
+
auth: true,
|
|
135
|
+
body: body,
|
|
136
|
+
request_options: request_options
|
|
137
|
+
)
|
|
138
|
+
result = WorkOS::Connection.new(response.body)
|
|
139
|
+
result.last_response = WorkOS::Types::ApiResponse.new(http_status: response.code.to_i, http_headers: response.each_header.to_h, request_id: response["x-request-id"])
|
|
140
|
+
result
|
|
141
|
+
end
|
|
142
|
+
|
|
143
|
+
# List IdP signing certificates
|
|
144
|
+
# @param connection_id [String] Unique identifier for the Connection.
|
|
145
|
+
# @param request_options [Hash] (see WorkOS::Types::RequestOptions)
|
|
146
|
+
# @return [WorkOS::SAMLIdpSigningCertificateList]
|
|
147
|
+
def list_connection_saml_idp_signing_certs(
|
|
148
|
+
connection_id:,
|
|
149
|
+
request_options: {}
|
|
150
|
+
)
|
|
151
|
+
response = @client.request(
|
|
152
|
+
method: :get,
|
|
153
|
+
path: "/connections/#{WorkOS::Util.encode_path(connection_id)}/saml_idp_signing_certs",
|
|
154
|
+
auth: true,
|
|
155
|
+
request_options: request_options
|
|
156
|
+
)
|
|
157
|
+
result = WorkOS::SAMLIdpSigningCertificateList.new(response.body)
|
|
158
|
+
result.last_response = WorkOS::Types::ApiResponse.new(http_status: response.code.to_i, http_headers: response.each_header.to_h, request_id: response["x-request-id"])
|
|
159
|
+
result
|
|
160
|
+
end
|
|
161
|
+
|
|
162
|
+
# Create an IdP signing certificate
|
|
163
|
+
# @param connection_id [String] Unique identifier for the Connection.
|
|
164
|
+
# @param value [String] The PEM-encoded X.509 certificate.
|
|
165
|
+
# @param request_options [Hash] (see WorkOS::Types::RequestOptions)
|
|
166
|
+
# @return [WorkOS::SAMLIdpSigningCertificate]
|
|
167
|
+
def create_connection_saml_idp_signing_cert(
|
|
168
|
+
connection_id:,
|
|
169
|
+
value:,
|
|
170
|
+
request_options: {}
|
|
171
|
+
)
|
|
172
|
+
body = {
|
|
173
|
+
"value" => value
|
|
174
|
+
}
|
|
175
|
+
response = @client.request(
|
|
176
|
+
method: :post,
|
|
177
|
+
path: "/connections/#{WorkOS::Util.encode_path(connection_id)}/saml_idp_signing_certs",
|
|
178
|
+
auth: true,
|
|
179
|
+
body: body,
|
|
180
|
+
request_options: request_options
|
|
181
|
+
)
|
|
182
|
+
result = WorkOS::SAMLIdpSigningCertificate.new(response.body)
|
|
183
|
+
result.last_response = WorkOS::Types::ApiResponse.new(http_status: response.code.to_i, http_headers: response.each_header.to_h, request_id: response["x-request-id"])
|
|
184
|
+
result
|
|
185
|
+
end
|
|
186
|
+
|
|
187
|
+
# Delete an IdP signing certificate
|
|
188
|
+
# @param connection_id [String] Unique identifier for the Connection.
|
|
189
|
+
# @param certificate_id [String] Unique identifier for the Identity Provider signing certificate.
|
|
190
|
+
# @param request_options [Hash] (see WorkOS::Types::RequestOptions)
|
|
191
|
+
# @return [void]
|
|
192
|
+
def delete_connection_saml_idp_signing_cert(
|
|
193
|
+
connection_id:,
|
|
194
|
+
certificate_id:,
|
|
195
|
+
request_options: {}
|
|
196
|
+
)
|
|
197
|
+
@client.request(
|
|
198
|
+
method: :delete,
|
|
199
|
+
path: "/connections/#{WorkOS::Util.encode_path(connection_id)}/saml_idp_signing_certs/#{WorkOS::Util.encode_path(certificate_id)}",
|
|
200
|
+
auth: true,
|
|
201
|
+
request_options: request_options
|
|
202
|
+
)
|
|
203
|
+
nil
|
|
204
|
+
end
|
|
205
|
+
|
|
206
|
+
# List SP encryption certificates
|
|
207
|
+
# @param connection_id [String] Unique identifier for the Connection.
|
|
208
|
+
# @param request_options [Hash] (see WorkOS::Types::RequestOptions)
|
|
209
|
+
# @return [WorkOS::SAMLSpEncryptionCertificateList]
|
|
210
|
+
def list_connection_saml_sp_encryption_certs(
|
|
211
|
+
connection_id:,
|
|
212
|
+
request_options: {}
|
|
213
|
+
)
|
|
214
|
+
response = @client.request(
|
|
215
|
+
method: :get,
|
|
216
|
+
path: "/connections/#{WorkOS::Util.encode_path(connection_id)}/saml_sp_encryption_certs",
|
|
217
|
+
auth: true,
|
|
218
|
+
request_options: request_options
|
|
219
|
+
)
|
|
220
|
+
result = WorkOS::SAMLSpEncryptionCertificateList.new(response.body)
|
|
221
|
+
result.last_response = WorkOS::Types::ApiResponse.new(http_status: response.code.to_i, http_headers: response.each_header.to_h, request_id: response["x-request-id"])
|
|
222
|
+
result
|
|
223
|
+
end
|
|
224
|
+
|
|
225
|
+
# Create an SP encryption certificate
|
|
226
|
+
# @param connection_id [String] Unique identifier for the Connection.
|
|
227
|
+
# @param request_options [Hash] (see WorkOS::Types::RequestOptions)
|
|
228
|
+
# @return [WorkOS::SAMLSpEncryptionCertificate]
|
|
229
|
+
def create_connection_saml_sp_encryption_cert(
|
|
230
|
+
connection_id:,
|
|
231
|
+
request_options: {}
|
|
232
|
+
)
|
|
233
|
+
response = @client.request(
|
|
234
|
+
method: :post,
|
|
235
|
+
path: "/connections/#{WorkOS::Util.encode_path(connection_id)}/saml_sp_encryption_certs",
|
|
236
|
+
auth: true,
|
|
237
|
+
request_options: request_options
|
|
238
|
+
)
|
|
239
|
+
result = WorkOS::SAMLSpEncryptionCertificate.new(response.body)
|
|
240
|
+
result.last_response = WorkOS::Types::ApiResponse.new(http_status: response.code.to_i, http_headers: response.each_header.to_h, request_id: response["x-request-id"])
|
|
241
|
+
result
|
|
242
|
+
end
|
|
243
|
+
|
|
244
|
+
# Delete an SP encryption certificate
|
|
245
|
+
# @param connection_id [String] Unique identifier for the Connection.
|
|
246
|
+
# @param certificate_id [String] Unique identifier for the Service Provider encryption key pair. WorkOS holds the corresponding private key, which is never exposed.
|
|
247
|
+
# @param request_options [Hash] (see WorkOS::Types::RequestOptions)
|
|
248
|
+
# @return [void]
|
|
249
|
+
def delete_connection_saml_sp_encryption_cert(
|
|
250
|
+
connection_id:,
|
|
251
|
+
certificate_id:,
|
|
252
|
+
request_options: {}
|
|
253
|
+
)
|
|
254
|
+
@client.request(
|
|
255
|
+
method: :delete,
|
|
256
|
+
path: "/connections/#{WorkOS::Util.encode_path(connection_id)}/saml_sp_encryption_certs/#{WorkOS::Util.encode_path(certificate_id)}",
|
|
257
|
+
auth: true,
|
|
258
|
+
request_options: request_options
|
|
259
|
+
)
|
|
260
|
+
nil
|
|
261
|
+
end
|
|
262
|
+
|
|
263
|
+
# Get the SP signing certificate
|
|
264
|
+
# @param connection_id [String] Unique identifier for the Connection.
|
|
265
|
+
# @param request_options [Hash] (see WorkOS::Types::RequestOptions)
|
|
266
|
+
# @return [WorkOS::SAMLSpSigningCertificate]
|
|
267
|
+
def list_connection_saml_sp_signing_cert(
|
|
268
|
+
connection_id:,
|
|
269
|
+
request_options: {}
|
|
270
|
+
)
|
|
271
|
+
response = @client.request(
|
|
272
|
+
method: :get,
|
|
273
|
+
path: "/connections/#{WorkOS::Util.encode_path(connection_id)}/saml_sp_signing_cert",
|
|
274
|
+
auth: true,
|
|
275
|
+
request_options: request_options
|
|
276
|
+
)
|
|
277
|
+
result = WorkOS::SAMLSpSigningCertificate.new(response.body)
|
|
278
|
+
result.last_response = WorkOS::Types::ApiResponse.new(http_status: response.code.to_i, http_headers: response.each_header.to_h, request_id: response["x-request-id"])
|
|
279
|
+
result
|
|
280
|
+
end
|
|
281
|
+
|
|
282
|
+
# Create an SP signing certificate
|
|
283
|
+
# @param connection_id [String] Unique identifier for the Connection.
|
|
284
|
+
# @param request_options [Hash] (see WorkOS::Types::RequestOptions)
|
|
285
|
+
# @return [WorkOS::SAMLSpSigningCertificate]
|
|
286
|
+
def create_connection_saml_sp_signing_cert(
|
|
287
|
+
connection_id:,
|
|
288
|
+
request_options: {}
|
|
289
|
+
)
|
|
290
|
+
response = @client.request(
|
|
291
|
+
method: :post,
|
|
292
|
+
path: "/connections/#{WorkOS::Util.encode_path(connection_id)}/saml_sp_signing_cert",
|
|
293
|
+
auth: true,
|
|
294
|
+
request_options: request_options
|
|
295
|
+
)
|
|
296
|
+
result = WorkOS::SAMLSpSigningCertificate.new(response.body)
|
|
297
|
+
result.last_response = WorkOS::Types::ApiResponse.new(http_status: response.code.to_i, http_headers: response.each_header.to_h, request_id: response["x-request-id"])
|
|
298
|
+
result
|
|
299
|
+
end
|
|
300
|
+
|
|
301
|
+
# Delete the SP signing certificate
|
|
302
|
+
# @param connection_id [String] Unique identifier for the Connection.
|
|
303
|
+
# @param certificate_id [String] Unique identifier for the Service Provider signing key pair. WorkOS holds the corresponding private key, which is never exposed.
|
|
304
|
+
# @param request_options [Hash] (see WorkOS::Types::RequestOptions)
|
|
305
|
+
# @return [void]
|
|
306
|
+
def delete_connection_saml_sp_signing_cert(
|
|
307
|
+
connection_id:,
|
|
308
|
+
certificate_id:,
|
|
309
|
+
request_options: {}
|
|
310
|
+
)
|
|
311
|
+
@client.request(
|
|
312
|
+
method: :delete,
|
|
313
|
+
path: "/connections/#{WorkOS::Util.encode_path(connection_id)}/saml_sp_signing_cert/#{WorkOS::Util.encode_path(certificate_id)}",
|
|
314
|
+
auth: true,
|
|
315
|
+
request_options: request_options
|
|
316
|
+
)
|
|
317
|
+
nil
|
|
318
|
+
end
|
|
319
|
+
|
|
73
320
|
# Get a Connection
|
|
74
321
|
# @param id [String] Unique identifier for the Connection.
|
|
75
322
|
# @param request_options [Hash] (see WorkOS::Types::RequestOptions)
|
|
@@ -89,6 +336,52 @@ module WorkOS
|
|
|
89
336
|
result
|
|
90
337
|
end
|
|
91
338
|
|
|
339
|
+
# Update a Connection
|
|
340
|
+
# @param id [String] Unique identifier for the Connection.
|
|
341
|
+
# @param name [String, nil] A human-readable name for the Connection.
|
|
342
|
+
# @param external_id [String, nil] The customer-owned identifier for the Connection. Set to `null` to stop tracking one.
|
|
343
|
+
# @param connection_type [String, nil] The type of the Connection. Immutable after creation — it may be sent, but only with the Connection current type.
|
|
344
|
+
# @param attribute_maps [WorkOS::PatchConnectionAttributeMaps, nil] How IdP attributes or claims map onto WorkOS profile fields. Only the provided fields are updated.
|
|
345
|
+
# @param protocol_options [WorkOS::SSO::PatchProtocolOptionsSAML, WorkOS::SSO::PatchProtocolOptionsOIDC, nil] Identifies the protocol options.
|
|
346
|
+
# @param request_options [Hash] (see WorkOS::Types::RequestOptions)
|
|
347
|
+
# @return [WorkOS::Connection]
|
|
348
|
+
def update_connection(
|
|
349
|
+
id:,
|
|
350
|
+
name: nil,
|
|
351
|
+
external_id: WorkOS::OMIT,
|
|
352
|
+
connection_type: nil,
|
|
353
|
+
attribute_maps: nil,
|
|
354
|
+
protocol_options: nil,
|
|
355
|
+
request_options: {}
|
|
356
|
+
)
|
|
357
|
+
body = {
|
|
358
|
+
"name" => name,
|
|
359
|
+
"connection_type" => connection_type,
|
|
360
|
+
"attribute_maps" => attribute_maps
|
|
361
|
+
}.compact
|
|
362
|
+
body["external_id"] = external_id unless external_id.equal?(WorkOS::OMIT)
|
|
363
|
+
if protocol_options
|
|
364
|
+
case protocol_options
|
|
365
|
+
when WorkOS::SSO::PatchProtocolOptionsSAML
|
|
366
|
+
body["saml_options"] = protocol_options.saml_options
|
|
367
|
+
when WorkOS::SSO::PatchProtocolOptionsOIDC
|
|
368
|
+
body["oidc_options"] = protocol_options.oidc_options
|
|
369
|
+
else
|
|
370
|
+
raise ArgumentError, "expected protocol_options to be one of: WorkOS::SSO::PatchProtocolOptionsSAML, WorkOS::SSO::PatchProtocolOptionsOIDC, got #{protocol_options.class}"
|
|
371
|
+
end
|
|
372
|
+
end
|
|
373
|
+
response = @client.request(
|
|
374
|
+
method: :patch,
|
|
375
|
+
path: "/connections/#{WorkOS::Util.encode_path(id)}",
|
|
376
|
+
auth: true,
|
|
377
|
+
body: body,
|
|
378
|
+
request_options: request_options
|
|
379
|
+
)
|
|
380
|
+
result = WorkOS::Connection.new(response.body)
|
|
381
|
+
result.last_response = WorkOS::Types::ApiResponse.new(http_status: response.code.to_i, http_headers: response.each_header.to_h, request_id: response["x-request-id"])
|
|
382
|
+
result
|
|
383
|
+
end
|
|
384
|
+
|
|
92
385
|
# Delete a Connection
|
|
93
386
|
# @param id [String] Unique identifier for the Connection.
|
|
94
387
|
# @param request_options [Hash] (see WorkOS::Types::RequestOptions)
|
|
@@ -106,6 +399,74 @@ module WorkOS
|
|
|
106
399
|
nil
|
|
107
400
|
end
|
|
108
401
|
|
|
402
|
+
# Initiate SSO
|
|
403
|
+
# Builds the URL client-side; no HTTP request is made.
|
|
404
|
+
# @param provider_scopes [Array<String>, nil] Additional scopes to request from the identity provider. Applicable when using OAuth or OpenID Connect connections.
|
|
405
|
+
# @param provider_query_params [Hash{String => String}, nil] Key/value pairs of query parameters to pass to the OAuth provider. Only applicable when using OAuth connections.
|
|
406
|
+
# @param client_id [String, nil] The unique identifier of the WorkOS environment client. Defaults to the client's configured client_id.
|
|
407
|
+
# @param domain [String, nil] Deprecated. Use `connection` or `organization` instead. Used to initiate SSO for a connection by domain. The domain must be associated with a connection in your WorkOS environment.
|
|
408
|
+
# @param provider [WorkOS::Types::SSOProvider, nil] Used to initiate OAuth authentication with various providers.
|
|
409
|
+
# @param redirect_uri [String] Where to redirect the user after they complete the authentication process. You must use one of the redirect URIs configured via the [Redirects](https://dashboard.workos.com/redirects) page on the dashboard.
|
|
410
|
+
# @param state [String, nil] An optional parameter that can be used to encode arbitrary information to help restore application state between redirects. If included, the redirect URI received from WorkOS will contain the exact `state` that was passed.
|
|
411
|
+
# @param connection [String, nil] Used to initiate SSO for a connection. The value should be a WorkOS connection ID. You can persist the WorkOS connection ID with application user or team identifiers. WorkOS will use the connection indicated by the connection parameter to direct the user to the corresponding IdP for authentication.
|
|
412
|
+
# @param organization [String, nil] Used to initiate SSO for an organization. The value should be a WorkOS organization ID. You can persist the WorkOS organization ID with application user or team identifiers. WorkOS will use the organization ID to determine the appropriate connection and the IdP to direct the user to for authentication.
|
|
413
|
+
# @param domain_hint [String, nil] Can be used to pre-fill the domain field when initiating authentication with Microsoft OAuth or with a Google SAML connection type.
|
|
414
|
+
# @param login_hint [String, nil] Can be used to pre-fill the username/email address field of the IdP sign-in page for the user, if you know their username ahead of time. Currently supported for OAuth, OpenID Connect, Okta, Entra ID, and custom SAML connections.
|
|
415
|
+
# @param nonce [String, nil] A random string generated by the client that is used to mitigate replay attacks.
|
|
416
|
+
# @param prompt [String, nil] If set to `login`, forces re-authentication at the identity provider. For supported SAML providers this sets `ForceAuthn="true"` in the SAML request; providers that don't support it are unaffected.
|
|
417
|
+
# @return [String]
|
|
418
|
+
def get_authorization_url(
|
|
419
|
+
redirect_uri:,
|
|
420
|
+
provider_scopes: nil,
|
|
421
|
+
provider_query_params: nil,
|
|
422
|
+
client_id: nil,
|
|
423
|
+
domain: nil,
|
|
424
|
+
provider: nil,
|
|
425
|
+
state: nil,
|
|
426
|
+
connection: nil,
|
|
427
|
+
organization: nil,
|
|
428
|
+
domain_hint: nil,
|
|
429
|
+
login_hint: nil,
|
|
430
|
+
nonce: nil,
|
|
431
|
+
prompt: nil
|
|
432
|
+
)
|
|
433
|
+
params = {
|
|
434
|
+
"provider_scopes" => provider_scopes,
|
|
435
|
+
"provider_query_params" => provider_query_params,
|
|
436
|
+
"client_id" => client_id,
|
|
437
|
+
"domain" => domain,
|
|
438
|
+
"provider" => provider,
|
|
439
|
+
"redirect_uri" => redirect_uri,
|
|
440
|
+
"state" => state,
|
|
441
|
+
"connection" => connection,
|
|
442
|
+
"organization" => organization,
|
|
443
|
+
"domain_hint" => domain_hint,
|
|
444
|
+
"login_hint" => login_hint,
|
|
445
|
+
"nonce" => nonce,
|
|
446
|
+
"prompt" => prompt
|
|
447
|
+
}.compact
|
|
448
|
+
params["provider_scopes"] = provider_scopes.join(",") unless provider_scopes.nil?
|
|
449
|
+
params["provider_query_params"] = JSON.generate(provider_query_params) unless provider_query_params.nil?
|
|
450
|
+
params["response_type"] = "code"
|
|
451
|
+
params["client_id"] = @client.client_id if !params.key?("client_id") && !@client.client_id.nil?
|
|
452
|
+
uri = URI.join(@client.base_url, "/sso/authorize")
|
|
453
|
+
uri.query = URI.encode_www_form(params) unless params.empty?
|
|
454
|
+
uri.to_s
|
|
455
|
+
end
|
|
456
|
+
|
|
457
|
+
# Logout Redirect
|
|
458
|
+
# Builds the URL client-side; no HTTP request is made.
|
|
459
|
+
# @param token [String] The logout token returned from the [Logout Authorize](https://workos.com/docs/reference/sso/logout/authorize) endpoint.
|
|
460
|
+
# @return [String]
|
|
461
|
+
def get_logout_url(token:)
|
|
462
|
+
params = {
|
|
463
|
+
"token" => token
|
|
464
|
+
}
|
|
465
|
+
uri = URI.join(@client.base_url, "/sso/logout")
|
|
466
|
+
uri.query = URI.encode_www_form(params) unless params.empty?
|
|
467
|
+
uri.to_s
|
|
468
|
+
end
|
|
469
|
+
|
|
109
470
|
# Logout Authorize
|
|
110
471
|
# @param profile_id [String] The unique ID of the profile to log out.
|
|
111
472
|
# @param request_options [Hash] (see WorkOS::Types::RequestOptions)
|
|
@@ -145,19 +506,28 @@ module WorkOS
|
|
|
145
506
|
end
|
|
146
507
|
|
|
147
508
|
# Get a Profile and Token
|
|
148
|
-
# @param code [String] The authorization code received from the authorization callback.
|
|
509
|
+
# @param code [String, nil] The authorization code received from the authorization callback. Required when `grant_type` is `authorization_code`.
|
|
510
|
+
# @param subject_token [String, nil] The OIDC ID token to exchange. Required when `grant_type` is `urn:ietf:params:oauth:grant-type:token-exchange`. Must be sent in the request body.
|
|
511
|
+
# @param subject_token_type [String, nil] The type of the subject token. Required when `grant_type` is `urn:ietf:params:oauth:grant-type:token-exchange`. Must be sent in the request body.
|
|
512
|
+
# @param organization_id [String, nil] The ID of the organization whose connection the subject token is validated against. Required when `grant_type` is `urn:ietf:params:oauth:grant-type:token-exchange`. Must be sent in the request body.
|
|
149
513
|
# @param request_options [Hash] (see WorkOS::Types::RequestOptions)
|
|
150
514
|
# @return [WorkOS::SSOTokenResponse]
|
|
151
515
|
def get_profile_and_token(
|
|
152
|
-
code
|
|
516
|
+
code: nil,
|
|
517
|
+
subject_token: nil,
|
|
518
|
+
subject_token_type: nil,
|
|
519
|
+
organization_id: nil,
|
|
153
520
|
request_options: {}
|
|
154
521
|
)
|
|
155
522
|
body = {
|
|
156
523
|
"grant_type" => "authorization_code",
|
|
157
524
|
"client_id" => request_options[:client_id] || @client.client_id,
|
|
158
525
|
"client_secret" => request_options[:api_key] || @client.api_key,
|
|
159
|
-
"code" => code
|
|
160
|
-
|
|
526
|
+
"code" => code,
|
|
527
|
+
"subject_token" => subject_token,
|
|
528
|
+
"subject_token_type" => subject_token_type,
|
|
529
|
+
"organization_id" => organization_id
|
|
530
|
+
}.compact
|
|
161
531
|
response = @client.request(
|
|
162
532
|
method: :post,
|
|
163
533
|
path: "/sso/token",
|
|
@@ -171,32 +541,10 @@ module WorkOS
|
|
|
171
541
|
end
|
|
172
542
|
|
|
173
543
|
# @oagen-ignore-start — non-spec helpers (hand-maintained)
|
|
174
|
-
# H14
|
|
175
|
-
#
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
login_hint: nil, nonce: nil, provider_scopes: nil,
|
|
179
|
-
provider_query_params: nil, **)
|
|
180
|
-
cid = client_id || @client.client_id
|
|
181
|
-
raise ArgumentError, "client_id is required (set on Client or pass explicitly)" if cid.nil? || cid.empty?
|
|
182
|
-
params = {
|
|
183
|
-
"client_id" => cid,
|
|
184
|
-
"redirect_uri" => redirect_uri,
|
|
185
|
-
"response_type" => "code",
|
|
186
|
-
"state" => state,
|
|
187
|
-
"connection" => connection,
|
|
188
|
-
"organization" => organization,
|
|
189
|
-
"provider" => provider,
|
|
190
|
-
"domain_hint" => domain_hint,
|
|
191
|
-
"login_hint" => login_hint,
|
|
192
|
-
"nonce" => nonce
|
|
193
|
-
}.compact
|
|
194
|
-
params["provider_scopes"] = Array(provider_scopes).join(",") if provider_scopes
|
|
195
|
-
if provider_query_params.is_a?(Hash) && !provider_query_params.empty?
|
|
196
|
-
params["provider_query_params"] = JSON.generate(provider_query_params)
|
|
197
|
-
end
|
|
198
|
-
build_url("/sso/authorize", params)
|
|
199
|
-
end
|
|
544
|
+
# H14 (sso_authorization_url) is provided by the generated
|
|
545
|
+
# `get_authorization_url` url-builder method, which accepts an optional
|
|
546
|
+
# per-call `client_id` override falling back to the client's configured
|
|
547
|
+
# value; no hand-maintained override is needed here.
|
|
200
548
|
|
|
201
549
|
# H15 — SSO authorization URL with auto-generated PKCE pair + state.
|
|
202
550
|
# Returns [url, code_verifier, state].
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# This file is auto-generated by oagen. Do not edit.
|
|
4
|
+
|
|
5
|
+
module WorkOS
|
|
6
|
+
module Types
|
|
7
|
+
class AgentAdminValidateCredentialRequestType
|
|
8
|
+
API_KEY = "api_key"
|
|
9
|
+
ACCESS_TOKEN = "access_token"
|
|
10
|
+
ALL = [API_KEY, ACCESS_TOKEN].freeze
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# This file is auto-generated by oagen. Do not edit.
|
|
4
|
+
|
|
5
|
+
module WorkOS
|
|
6
|
+
module Types
|
|
7
|
+
class AgentBlueprintsTokenMintTokenRequestType
|
|
8
|
+
USER_DELEGATED = "user_delegated"
|
|
9
|
+
AUTONOMOUS = "autonomous"
|
|
10
|
+
AGENT_DELEGATED = "agent_delegated"
|
|
11
|
+
REFRESH = "refresh"
|
|
12
|
+
ALL = [USER_DELEGATED, AUTONOMOUS, AGENT_DELEGATED, REFRESH].freeze
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# This file is auto-generated by oagen. Do not edit.
|
|
4
|
+
|
|
5
|
+
module WorkOS
|
|
6
|
+
module Types
|
|
7
|
+
class AgentInstanceCreatedDataType
|
|
8
|
+
DELEGATED = "delegated"
|
|
9
|
+
AUTONOMOUS = "autonomous"
|
|
10
|
+
ALL = [DELEGATED, AUTONOMOUS].freeze
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# This file is auto-generated by oagen. Do not edit.
|
|
4
|
+
|
|
5
|
+
module WorkOS
|
|
6
|
+
module Types
|
|
7
|
+
class AgentInstanceSessionStatus
|
|
8
|
+
ACTIVE = "active"
|
|
9
|
+
REVOKED = "revoked"
|
|
10
|
+
EXPIRED = "expired"
|
|
11
|
+
ALL = [ACTIVE, REVOKED, EXPIRED].freeze
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# This file is auto-generated by oagen. Do not edit.
|
|
4
|
+
|
|
5
|
+
module WorkOS
|
|
6
|
+
module Types
|
|
7
|
+
class AgentRegistrationCreatedDataKind
|
|
8
|
+
ANONYMOUS = "anonymous"
|
|
9
|
+
SERVICE_AUTH = "service_auth"
|
|
10
|
+
IDENTITY_ASSERTION = "identity_assertion"
|
|
11
|
+
ALL = [ANONYMOUS, SERVICE_AUTH, IDENTITY_ASSERTION].freeze
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# This file is auto-generated by oagen. Do not edit.
|
|
4
|
+
|
|
5
|
+
module WorkOS
|
|
6
|
+
module Types
|
|
7
|
+
class AgentRegistrationCreatedDataMethod
|
|
8
|
+
ANONYMOUS = "anonymous"
|
|
9
|
+
SERVICE_AUTH = "service_auth"
|
|
10
|
+
ID_JAG = "id_jag"
|
|
11
|
+
ALL = [ANONYMOUS, SERVICE_AUTH, ID_JAG].freeze
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# This file is auto-generated by oagen. Do not edit.
|
|
4
|
+
|
|
5
|
+
module WorkOS
|
|
6
|
+
module Types
|
|
7
|
+
class AgentRegistrationCreatedDataStatus
|
|
8
|
+
UNVERIFIED = "unverified"
|
|
9
|
+
VERIFIED = "verified"
|
|
10
|
+
EXPIRED = "expired"
|
|
11
|
+
REVOKED = "revoked"
|
|
12
|
+
ALL = [UNVERIFIED, VERIFIED, EXPIRED, REVOKED].freeze
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# This file is auto-generated by oagen. Do not edit.
|
|
4
|
+
|
|
5
|
+
module WorkOS
|
|
6
|
+
module Types
|
|
7
|
+
class ApplicationsRegistrationTypes
|
|
8
|
+
DYNAMIC = "dynamic"
|
|
9
|
+
AUTHENTICATED = "authenticated"
|
|
10
|
+
ALL = [DYNAMIC, AUTHENTICATED].freeze
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
@@ -11,7 +11,6 @@ module WorkOS
|
|
|
11
11
|
APPLE_OAUTH = "AppleOAuth"
|
|
12
12
|
BITBUCKET_OAUTH = "BitbucketOAuth"
|
|
13
13
|
CROSS_APP_AUTH = "CrossAppAuth"
|
|
14
|
-
DISCORD_OAUTH = "DiscordOAuth"
|
|
15
14
|
EXTERNAL_AUTH = "ExternalAuth"
|
|
16
15
|
GIT_HUB_OAUTH = "GitHubOAuth"
|
|
17
16
|
GIT_LAB_OAUTH = "GitLabOAuth"
|
|
@@ -27,7 +26,7 @@ module WorkOS
|
|
|
27
26
|
MAGIC_AUTH = "MagicAuth"
|
|
28
27
|
IMPERSONATION = "Impersonation"
|
|
29
28
|
MIGRATED_SESSION = "MigratedSession"
|
|
30
|
-
ALL = [SSO, PASSWORD, PASSKEY, APPLE_OAUTH, BITBUCKET_OAUTH, CROSS_APP_AUTH,
|
|
29
|
+
ALL = [SSO, PASSWORD, PASSKEY, APPLE_OAUTH, BITBUCKET_OAUTH, CROSS_APP_AUTH, EXTERNAL_AUTH, GIT_HUB_OAUTH, GIT_LAB_OAUTH, GOOGLE_OAUTH, INTUIT_OAUTH, LINKED_IN_OAUTH, MICROSOFT_OAUTH, SALESFORCE_OAUTH, SLACK_OAUTH, VERCEL_MARKETPLACE_OAUTH, VERCEL_OAUTH, XERO_OAUTH, MAGIC_AUTH, IMPERSONATION, MIGRATED_SESSION].freeze
|
|
31
30
|
end
|
|
32
31
|
end
|
|
33
32
|
end
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# This file is auto-generated by oagen. Do not edit.
|
|
4
|
+
|
|
5
|
+
module WorkOS
|
|
6
|
+
module Types
|
|
7
|
+
class ConnectedAccountInputState
|
|
8
|
+
CONNECTED = "connected"
|
|
9
|
+
NEEDS_REAUTHORIZATION = "needs_reauthorization"
|
|
10
|
+
ALL = [CONNECTED, NEEDS_REAUTHORIZATION].freeze
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|