Module: Svix

Defined in:
lib/svix/util.rb,
lib/svix/svix.rb,
lib/svix/errors.rb,
lib/svix/version.rb,
lib/svix/webhook.rb,
lib/svix/internal.rb,
lib/svix/api_error.rb,
lib/svix/api_client.rb,
lib/svix/message_api.rb,
lib/svix/endpoint_api.rb,
lib/svix/configuration.rb,
lib/svix/api/events_api.rb,
lib/svix/api/health_api.rb,
lib/svix/event_type_api.rb,
lib/svix/models/sink_in.rb,
lib/svix/statistics_api.rb,
lib/svix/api/inbound_api.rb,
lib/svix/api/message_api.rb,
lib/svix/application_api.rb,
lib/svix/integration_api.rb,
lib/svix/models/duration.rb,
lib/svix/models/event_in.rb,
lib/svix/models/ordering.rb,
lib/svix/models/sink_out.rb,
lib/svix/api/endpoint_api.rb,
lib/svix/models/event_out.rb,
lib/svix/models/replay_in.rb,
lib/svix/api/broadcast_api.rb,
lib/svix/models/message_in.rb,
lib/svix/models/recover_in.rb,
lib/svix/models/replay_out.rb,
lib/svix/api/event_type_api.rb,
lib/svix/api/statistics_api.rb,
lib/svix/authentication_api.rb,
lib/svix/models/endpoint_in.rb,
lib/svix/models/generate_in.rb,
lib/svix/models/message_out.rb,
lib/svix/models/recover_out.rb,
lib/svix/models/settings_in.rb,
lib/svix/models/template_in.rb,
lib/svix/api/application_api.rb,
lib/svix/api/environment_api.rb,
lib/svix/api/integration_api.rb,
lib/svix/message_attempt_api.rb,
lib/svix/models/endpoint_out.rb,
lib/svix/models/generate_out.rb,
lib/svix/models/settings_out.rb,
lib/svix/models/template_out.rb,
lib/svix/background_tasks_api.rb,
lib/svix/models/event_type_in.rb,
lib/svix/models/application_in.rb,
lib/svix/models/auth_token_out.rb,
lib/svix/models/endpoint_patch.rb,
lib/svix/models/endpoint_stats.rb,
lib/svix/models/environment_in.rb,
lib/svix/models/event_type_out.rb,
lib/svix/models/http_error_out.rb,
lib/svix/models/integration_in.rb,
lib/svix/models/message_status.rb,
lib/svix/models/sink_in_one_of.rb,
lib/svix/models/template_patch.rb,
lib/svix/api/authentication_api.rb,
lib/svix/models/application_out.rb,
lib/svix/models/endpoint_update.rb,
lib/svix/models/environment_out.rb,
lib/svix/models/integration_out.rb,
lib/svix/models/rotated_url_out.rb,
lib/svix/models/sink_in_one_of1.rb,
lib/svix/models/sink_in_one_of2.rb,
lib/svix/models/sink_in_one_of3.rb,
lib/svix/models/template_update.rb,
lib/svix/api/message_attempt_api.rb,
lib/svix/models/create_stream_in.rb,
lib/svix/models/event_example_in.rb,
lib/svix/models/event_stream_out.rb,
lib/svix/models/event_type_patch.rb,
lib/svix/models/font_size_config.rb,
lib/svix/models/validation_error.rb,
lib/svix/api/background_tasks_api.rb,
lib/svix/models/application_patch.rb,
lib/svix/models/application_stats.rb,
lib/svix/models/completion_choice.rb,
lib/svix/models/event_type_update.rb,
lib/svix/models/o_auth_payload_in.rb,
lib/svix/models/one_time_token_in.rb,
lib/svix/models/statistics_period.rb,
lib/svix/models/status_code_class.rb,
lib/svix/models/app_usage_stats_in.rb,
lib/svix/models/border_radius_enum.rb,
lib/svix/models/completion_message.rb,
lib/svix/models/integration_update.rb,
lib/svix/models/message_events_out.rb,
lib/svix/models/o_auth_payload_out.rb,
lib/svix/models/one_time_token_out.rb,
lib/svix/models/app_usage_stats_out.rb,
lib/svix/models/background_task_out.rb,
lib/svix/models/endpoint_headers_in.rb,
lib/svix/models/endpoint_secret_out.rb,
lib/svix/models/inbound_path_params.rb,
lib/svix/models/integration_key_out.rb,
lib/svix/models/message_attempt_out.rb,
lib/svix/models/app_portal_access_in.rb,
lib/svix/models/background_task_type.rb,
lib/svix/models/border_radius_config.rb,
lib/svix/models/custom_color_palette.rb,
lib/svix/models/dashboard_access_out.rb,
lib/svix/models/endpoint_headers_out.rb,
lib/svix/models/endpoint_message_out.rb,
lib/svix/models/event_type_schema_in.rb,
lib/svix/models/message_broadcast_in.rb,
lib/svix/models/message_endpoint_out.rb,
lib/svix/models/oauth2_grant_type_in.rb,
lib/svix/api/environment_settings_api.rb,
lib/svix/models/app_portal_access_out.rb,
lib/svix/models/custom_theme_override.rb,
lib/svix/models/export_event_type_out.rb,
lib/svix/models/http_validation_error.rb,
lib/svix/models/message_broadcast_out.rb,
lib/svix/models/oauth2_auth_method_in.rb,
lib/svix/models/retry_schedule_in_out.rb,
lib/svix/models/background_task_status.rb,
lib/svix/models/endpoint_created_event.rb,
lib/svix/models/endpoint_deleted_event.rb,
lib/svix/models/endpoint_updated_event.rb,
lib/svix/models/event_type_example_out.rb,
lib/svix/models/list_response_sink_out.rb,
lib/svix/models/attempt_statistics_data.rb,
lib/svix/models/create_message_token_in.rb,
lib/svix/models/endpoint_disabled_event.rb,
lib/svix/models/endpoint_mtls_config_in.rb,
lib/svix/models/hubspot_oauth_config_in.rb,
lib/svix/models/message_raw_payload_out.rb,
lib/svix/api/transformation_template_api.rb,
lib/svix/models/endpoint_oauth_config_in.rb,
lib/svix/models/environment_settings_out.rb,
lib/svix/models/event_type_from_open_api.rb,
lib/svix/models/aggregate_event_types_out.rb,
lib/svix/models/endpoint_headers_patch_in.rb,
lib/svix/models/endpoint_secret_rotate_in.rb,
lib/svix/models/list_response_message_out.rb,
lib/svix/models/endpoint_transformation_in.rb,
lib/svix/models/list_response_endpoint_out.rb,
lib/svix/models/list_response_template_out.rb,
lib/svix/models/transformation_http_method.rb,
lib/svix/models/transformation_simulate_in.rb,
lib/svix/models/application_token_expire_in.rb,
lib/svix/models/attempt_statistics_response.rb,
lib/svix/models/client_secret_jwt_params_in.rb,
lib/svix/models/endpoint_created_event_data.rb,
lib/svix/models/endpoint_deleted_event_data.rb,
lib/svix/models/endpoint_transformation_out.rb,
lib/svix/models/endpoint_updated_event_data.rb,
lib/svix/models/message_attempt_failed_data.rb,
lib/svix/models/message_attempt_headers_out.rb,
lib/svix/models/oauth_jws_signing_algorithm.rb,
lib/svix/models/transformation_simulate_out.rb,
lib/svix/models/endpoint_disabled_event_data.rb,
lib/svix/models/incoming_webhook_payload_out.rb,
lib/svix/models/kafka_security_protocol_type.rb,
lib/svix/models/list_response_event_type_out.rb,
lib/svix/models/message_attempt_endpoint_out.rb,
lib/svix/models/message_attempt_trigger_type.rb,
lib/svix/models/transformation_template_kind.rb,
lib/svix/models/event_type_import_open_api_in.rb,
lib/svix/models/list_response_application_out.rb,
lib/svix/models/list_response_integration_out.rb,
lib/svix/models/message_attempt_failing_event.rb,
lib/svix/models/event_type_import_open_api_out.rb,
lib/svix/models/list_response_application_stats.rb,
lib/svix/models/message_attempt_exhausted_event.rb,
lib/svix/models/message_attempt_recovered_event.rb,
lib/svix/models/list_response_background_task_out.rb,
lib/svix/models/list_response_message_attempt_out.rb,
lib/svix/models/message_subscriber_auth_token_out.rb,
lib/svix/models/list_response_endpoint_message_out.rb,
lib/svix/models/list_response_message_endpoint_out.rb,
lib/svix/models/message_attempt_failing_event_data.rb,
lib/svix/models/endpoint_transformation_simulate_in.rb,
lib/svix/models/event_type_import_open_api_out_data.rb,
lib/svix/models/endpoint_transformation_simulate_out.rb,
lib/svix/models/message_attempt_exhausted_event_data.rb,
lib/svix/models/message_attempt_recovered_event_data.rb,
lib/svix/models/list_response_message_attempt_endpoint_out.rb

Overview

#Svix API

#No description provided (generated by Openapi Generator github.com/openapitools/openapi-generator)

The version of the OpenAPI document: 1.1.1

Generated by: openapi-generator.tech OpenAPI Generator version: 5.2.0

Defined Under Namespace

Modules: SinkIn, SinkOut Classes: AggregateEventTypesOut, ApiError, AppPortalAccessIn, AppPortalAccessOut, AppUsageStatsIn, AppUsageStatsOut, ApplicationAPI, ApplicationIn, ApplicationOut, ApplicationPatch, ApplicationStats, ApplicationTokenExpireIn, AttemptStatisticsData, AttemptStatisticsResponse, AuthTokenOut, AuthenticationAPI, BackgroundTaskOut, BackgroundTaskStatus, BackgroundTaskType, BackgroundTasksAPI, BackgroundTasksApi, BorderRadiusConfig, BorderRadiusEnum, BroadcastApi, Client, ClientSecretJwtParamsIn, CompletionChoice, CompletionMessage, CreateMessageTokenIn, CreateStreamIn, CustomColorPalette, CustomThemeOverride, DashboardAccessOut, Duration, EndpointAPI, EndpointCreatedEvent, EndpointCreatedEventData, EndpointDeletedEvent, EndpointDeletedEventData, EndpointDisabledEvent, EndpointDisabledEventData, EndpointHeadersIn, EndpointHeadersOut, EndpointHeadersPatchIn, EndpointIn, EndpointMessageOut, EndpointMtlsConfigIn, EndpointOauthConfigIn, EndpointOut, EndpointPatch, EndpointSecretOut, EndpointSecretRotateIn, EndpointStats, EndpointTransformationIn, EndpointTransformationOut, EndpointTransformationSimulateIn, EndpointTransformationSimulateOut, EndpointUpdate, EndpointUpdatedEvent, EndpointUpdatedEventData, EnvironmentApi, EnvironmentIn, EnvironmentOut, EnvironmentSettingsApi, EnvironmentSettingsOut, EventExampleIn, EventIn, EventOut, EventStreamOut, EventTypeAPI, EventTypeApi, EventTypeExampleOut, EventTypeFromOpenApi, EventTypeImportOpenApiIn, EventTypeImportOpenApiOut, EventTypeImportOpenApiOutData, EventTypeIn, EventTypeOut, EventTypePatch, EventTypeSchemaIn, EventTypeUpdate, EventsApi, ExportEventTypeOut, FontSizeConfig, GenerateIn, GenerateOut, HubspotOauthConfigIn, InboundApi, InboundPathParams, IncomingWebhookPayloadOut, IntegrationAPI, IntegrationIn, IntegrationKeyOut, IntegrationOut, IntegrationUpdate, KafkaSecurityProtocolType, ListResponseApplicationOut, ListResponseApplicationStats, ListResponseBackgroundTaskOut, ListResponseEndpointMessageOut, ListResponseEndpointOut, ListResponseEventTypeOut, ListResponseIntegrationOut, ListResponseMessageAttemptEndpointOut, ListResponseMessageAttemptOut, ListResponseMessageEndpointOut, ListResponseMessageOut, ListResponseSinkOut, ListResponseTemplateOut, MessageAPI, MessageAttemptAPI, MessageAttemptEndpointOut, MessageAttemptExhaustedEvent, MessageAttemptExhaustedEventData, MessageAttemptFailedData, MessageAttemptFailingEvent, MessageAttemptFailingEventData, MessageAttemptHeadersOut, MessageAttemptOut, MessageAttemptRecoveredEvent, MessageAttemptRecoveredEventData, MessageAttemptTriggerType, MessageBroadcastIn, MessageBroadcastOut, MessageEndpointOut, MessageEventsOut, MessageIn, MessageOut, MessageRawPayloadOut, MessageStatus, MessageSubscriberAuthTokenOut, OAuthPayloadIn, OAuthPayloadOut, Oauth2AuthMethodIn, Oauth2GrantTypeIn, OauthJwsSigningAlgorithm, OneTimeTokenIn, OneTimeTokenOut, Ordering, RecoverIn, RecoverOut, ReplayIn, ReplayOut, RetryScheduleInOut, RotatedUrlOut, SettingsIn, SettingsOut, SinkInOneOf, SinkInOneOf1, SinkInOneOf2, SinkInOneOf3, StatisticsAPI, StatisticsApi, StatisticsPeriod, StatusCodeClass, SvixError, SvixOptions, TemplateIn, TemplateOut, TemplatePatch, TemplateUpdate, TransformationHttpMethod, TransformationSimulateIn, TransformationSimulateOut, TransformationTemplateApi, TransformationTemplateKind, Webhook, WebhookSigningError, WebhookVerificationError

Constant Summary collapse

VERSION =
"1.27.0"

Class Method Summary collapse

Class Method Details

.fixed_length_secure_compare(a, b) ⇒ Object

Raises:

  • (ArgumentError)


11
12
13
# File 'lib/svix/util.rb', line 11

def fixed_length_secure_compare(a, b)
    OpenSSL.fixed_length_secure_compare(a, b)
end

.secure_compare(a, b) ⇒ Object

Secure string comparison for strings of variable length.

While a timing attack would not be able to discern the content of a secret compared via secure_compare, it is possible to determine the secret length. This should be considered when using secure_compare to compare weak, short secrets to user input.



33
34
35
# File 'lib/svix/util.rb', line 33

def secure_compare(a, b)
    a.length == b.length && fixed_length_secure_compare(a, b)
end