qsafe-sdk 1.0.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.
Potentially problematic release.
This version of qsafe-sdk might be problematic. Click here for more details.
- checksums.yaml +7 -0
- data/Gemfile +9 -0
- data/README.md +210 -0
- data/Rakefile +10 -0
- data/docs/APIKeysApi.md +427 -0
- data/docs/ApiKey.md +36 -0
- data/docs/AuthResponse.md +20 -0
- data/docs/AuthResponseData.md +24 -0
- data/docs/AuthenticationApi.md +276 -0
- data/docs/ChangePassword200Response.md +20 -0
- data/docs/ChangePasswordRequest.md +20 -0
- data/docs/CreateApiKey201Response.md +22 -0
- data/docs/CreateApiKeyRequest.md +28 -0
- data/docs/CryptographicOperationsApi.md +331 -0
- data/docs/DebugApi.md +84 -0
- data/docs/DebugRedisTest200Response.md +30 -0
- data/docs/DebugRedisTest200ResponseRateLimitTest.md +22 -0
- data/docs/DebugRedisTest200ResponseServicesStatus.md +24 -0
- data/docs/DebugRedisTest500Response.md +20 -0
- data/docs/DecryptData200Response.md +20 -0
- data/docs/DecryptData200ResponseData.md +24 -0
- data/docs/DecryptRequest.md +28 -0
- data/docs/DecryptRequestEphemeralCrypto.md +24 -0
- data/docs/EncryptData200Response.md +20 -0
- data/docs/EncryptData200ResponseData.md +28 -0
- data/docs/EncryptRequest.md +26 -0
- data/docs/EncryptRequestEphemeralStorage.md +22 -0
- data/docs/Error.md +28 -0
- data/docs/GenerateKeypair201Response.md +22 -0
- data/docs/GenerateKeypairRequest.md +24 -0
- data/docs/GenerateKeypairRequestKeyPolicy.md +20 -0
- data/docs/GetApiKey200Response.md +20 -0
- data/docs/GetApiKeyUsage200Response.md +20 -0
- data/docs/GetApiKeyUsage200ResponseData.md +22 -0
- data/docs/GetApiKeyUsage200ResponseDataDailyUsageInner.md +20 -0
- data/docs/GetAuthInfo200Response.md +20 -0
- data/docs/GetAuthInfo200ResponseData.md +26 -0
- data/docs/GetHealth200Response.md +22 -0
- data/docs/GetHealth200ResponseServices.md +22 -0
- data/docs/GetHealth200ResponseServicesApi.md +22 -0
- data/docs/GetHealth200ResponseServicesEphemeralStorage.md +18 -0
- data/docs/GetHealth200ResponseServicesRedis.md +20 -0
- data/docs/GetRateLimitStatus200Response.md +20 -0
- data/docs/GetRateLimitStatus200ResponseData.md +22 -0
- data/docs/GetRateLimitStatus200ResponseDataCurrentUsage.md +22 -0
- data/docs/GetRateLimitStatus200ResponseDataLimits.md +22 -0
- data/docs/GetRateLimitStatus200ResponseDataResetTimes.md +22 -0
- data/docs/HealthApi.md +69 -0
- data/docs/Keypair.md +40 -0
- data/docs/KeypairsApi.md +341 -0
- data/docs/ListApiKeys200Response.md +20 -0
- data/docs/ListApiKeys200ResponseData.md +22 -0
- data/docs/ListApiKeys200ResponseDataPagination.md +22 -0
- data/docs/ListKeypairs200Response.md +20 -0
- data/docs/ListKeypairs200ResponseData.md +22 -0
- data/docs/ListKeypairs200ResponseDataPagination.md +22 -0
- data/docs/LoginRequest.md +20 -0
- data/docs/RegisterRequest.md +24 -0
- data/docs/RevokeKeypair200Response.md +22 -0
- data/docs/RevokeKeypairRequest.md +22 -0
- data/docs/RotateApiKey200Response.md +22 -0
- data/docs/SignData200Response.md +20 -0
- data/docs/SignData200ResponseData.md +28 -0
- data/docs/SignRequest.md +26 -0
- data/docs/SignRequestEphemeralStorage.md +20 -0
- data/docs/UpdateApiKeyRequest.md +28 -0
- data/docs/UpdateKeypair200Response.md +20 -0
- data/docs/UpdateKeypairRequest.md +24 -0
- data/docs/User.md +28 -0
- data/docs/UtilitiesApi.md +81 -0
- data/docs/VerifyRequest.md +26 -0
- data/docs/VerifySignature200Response.md +20 -0
- data/docs/VerifySignature200ResponseData.md +26 -0
- data/git_push.sh +57 -0
- data/lib/qsafe/api/api_keys_api.rb +430 -0
- data/lib/qsafe/api/authentication_api.rb +275 -0
- data/lib/qsafe/api/cryptographic_operations_api.rb +314 -0
- data/lib/qsafe/api/debug_api.rb +79 -0
- data/lib/qsafe/api/health_api.rb +79 -0
- data/lib/qsafe/api/keypairs_api.rb +345 -0
- data/lib/qsafe/api/utilities_api.rb +79 -0
- data/lib/qsafe/api_client.rb +394 -0
- data/lib/qsafe/api_error.rb +58 -0
- data/lib/qsafe/configuration.rb +327 -0
- data/lib/qsafe/models/api_key.rb +325 -0
- data/lib/qsafe/models/auth_response.rb +223 -0
- data/lib/qsafe/models/auth_response_data.rb +242 -0
- data/lib/qsafe/models/change_password200_response.rb +223 -0
- data/lib/qsafe/models/change_password_request.rb +256 -0
- data/lib/qsafe/models/create_api_key201_response.rb +233 -0
- data/lib/qsafe/models/create_api_key_request.rb +350 -0
- data/lib/qsafe/models/debug_redis_test200_response.rb +304 -0
- data/lib/qsafe/models/debug_redis_test200_response_rate_limit_test.rb +232 -0
- data/lib/qsafe/models/debug_redis_test200_response_services_status.rb +241 -0
- data/lib/qsafe/models/debug_redis_test500_response.rb +223 -0
- data/lib/qsafe/models/decrypt_data200_response.rb +223 -0
- data/lib/qsafe/models/decrypt_data200_response_data.rb +242 -0
- data/lib/qsafe/models/decrypt_request.rb +301 -0
- data/lib/qsafe/models/decrypt_request_ephemeral_crypto.rb +276 -0
- data/lib/qsafe/models/encrypt_data200_response.rb +223 -0
- data/lib/qsafe/models/encrypt_data200_response_data.rb +263 -0
- data/lib/qsafe/models/encrypt_request.rb +322 -0
- data/lib/qsafe/models/encrypt_request_ephemeral_storage.rb +289 -0
- data/lib/qsafe/models/error.rb +275 -0
- data/lib/qsafe/models/generate_keypair201_response.rb +233 -0
- data/lib/qsafe/models/generate_keypair_request.rb +297 -0
- data/lib/qsafe/models/generate_keypair_request_key_policy.rb +266 -0
- data/lib/qsafe/models/get_api_key200_response.rb +223 -0
- data/lib/qsafe/models/get_api_key_usage200_response.rb +223 -0
- data/lib/qsafe/models/get_api_key_usage200_response_data.rb +236 -0
- data/lib/qsafe/models/get_api_key_usage200_response_data_daily_usage_inner.rb +223 -0
- data/lib/qsafe/models/get_auth_info200_response.rb +223 -0
- data/lib/qsafe/models/get_auth_info200_response_data.rb +284 -0
- data/lib/qsafe/models/get_health200_response.rb +232 -0
- data/lib/qsafe/models/get_health200_response_services.rb +232 -0
- data/lib/qsafe/models/get_health200_response_services_api.rb +232 -0
- data/lib/qsafe/models/get_health200_response_services_ephemeral_storage.rb +214 -0
- data/lib/qsafe/models/get_health200_response_services_redis.rb +223 -0
- data/lib/qsafe/models/get_rate_limit_status200_response.rb +223 -0
- data/lib/qsafe/models/get_rate_limit_status200_response_data.rb +232 -0
- data/lib/qsafe/models/get_rate_limit_status200_response_data_current_usage.rb +232 -0
- data/lib/qsafe/models/get_rate_limit_status200_response_data_limits.rb +232 -0
- data/lib/qsafe/models/get_rate_limit_status200_response_data_reset_times.rb +232 -0
- data/lib/qsafe/models/keypair.rb +379 -0
- data/lib/qsafe/models/list_api_keys200_response.rb +223 -0
- data/lib/qsafe/models/list_api_keys200_response_data.rb +234 -0
- data/lib/qsafe/models/list_api_keys200_response_data_pagination.rb +232 -0
- data/lib/qsafe/models/list_keypairs200_response.rb +223 -0
- data/lib/qsafe/models/list_keypairs200_response_data.rb +234 -0
- data/lib/qsafe/models/list_keypairs200_response_data_pagination.rb +232 -0
- data/lib/qsafe/models/login_request.rb +237 -0
- data/lib/qsafe/models/register_request.rb +345 -0
- data/lib/qsafe/models/revoke_keypair200_response.rb +232 -0
- data/lib/qsafe/models/revoke_keypair_request.rb +301 -0
- data/lib/qsafe/models/rotate_api_key200_response.rb +232 -0
- data/lib/qsafe/models/sign_data200_response.rb +223 -0
- data/lib/qsafe/models/sign_data200_response_data.rb +262 -0
- data/lib/qsafe/models/sign_request.rb +321 -0
- data/lib/qsafe/models/sign_request_ephemeral_storage.rb +279 -0
- data/lib/qsafe/models/update_api_key_request.rb +343 -0
- data/lib/qsafe/models/update_keypair200_response.rb +223 -0
- data/lib/qsafe/models/update_keypair_request.rb +317 -0
- data/lib/qsafe/models/user.rb +293 -0
- data/lib/qsafe/models/verify_request.rb +389 -0
- data/lib/qsafe/models/verify_signature200_response.rb +223 -0
- data/lib/qsafe/models/verify_signature200_response_data.rb +251 -0
- data/lib/qsafe/version.rb +15 -0
- data/lib/qsafe-sdk/api/api_keys_api.rb +430 -0
- data/lib/qsafe-sdk/api/authentication_api.rb +275 -0
- data/lib/qsafe-sdk/api/cryptographic_operations_api.rb +314 -0
- data/lib/qsafe-sdk/api/debug_api.rb +79 -0
- data/lib/qsafe-sdk/api/health_api.rb +79 -0
- data/lib/qsafe-sdk/api/keypairs_api.rb +345 -0
- data/lib/qsafe-sdk/api/utilities_api.rb +79 -0
- data/lib/qsafe-sdk/api_client.rb +394 -0
- data/lib/qsafe-sdk/api_error.rb +58 -0
- data/lib/qsafe-sdk/configuration.rb +327 -0
- data/lib/qsafe-sdk/models/api_key.rb +325 -0
- data/lib/qsafe-sdk/models/auth_response.rb +223 -0
- data/lib/qsafe-sdk/models/auth_response_data.rb +242 -0
- data/lib/qsafe-sdk/models/change_password200_response.rb +223 -0
- data/lib/qsafe-sdk/models/change_password_request.rb +256 -0
- data/lib/qsafe-sdk/models/create_api_key201_response.rb +233 -0
- data/lib/qsafe-sdk/models/create_api_key_request.rb +350 -0
- data/lib/qsafe-sdk/models/debug_redis_test200_response.rb +304 -0
- data/lib/qsafe-sdk/models/debug_redis_test200_response_rate_limit_test.rb +232 -0
- data/lib/qsafe-sdk/models/debug_redis_test200_response_services_status.rb +241 -0
- data/lib/qsafe-sdk/models/debug_redis_test500_response.rb +223 -0
- data/lib/qsafe-sdk/models/decrypt_data200_response.rb +223 -0
- data/lib/qsafe-sdk/models/decrypt_data200_response_data.rb +242 -0
- data/lib/qsafe-sdk/models/decrypt_request.rb +301 -0
- data/lib/qsafe-sdk/models/decrypt_request_ephemeral_crypto.rb +276 -0
- data/lib/qsafe-sdk/models/encrypt_data200_response.rb +223 -0
- data/lib/qsafe-sdk/models/encrypt_data200_response_data.rb +263 -0
- data/lib/qsafe-sdk/models/encrypt_request.rb +322 -0
- data/lib/qsafe-sdk/models/encrypt_request_ephemeral_storage.rb +289 -0
- data/lib/qsafe-sdk/models/error.rb +275 -0
- data/lib/qsafe-sdk/models/generate_keypair201_response.rb +233 -0
- data/lib/qsafe-sdk/models/generate_keypair_request.rb +297 -0
- data/lib/qsafe-sdk/models/generate_keypair_request_key_policy.rb +266 -0
- data/lib/qsafe-sdk/models/get_api_key200_response.rb +223 -0
- data/lib/qsafe-sdk/models/get_api_key_usage200_response.rb +223 -0
- data/lib/qsafe-sdk/models/get_api_key_usage200_response_data.rb +236 -0
- data/lib/qsafe-sdk/models/get_api_key_usage200_response_data_daily_usage_inner.rb +223 -0
- data/lib/qsafe-sdk/models/get_auth_info200_response.rb +223 -0
- data/lib/qsafe-sdk/models/get_auth_info200_response_data.rb +284 -0
- data/lib/qsafe-sdk/models/get_health200_response.rb +232 -0
- data/lib/qsafe-sdk/models/get_health200_response_services.rb +232 -0
- data/lib/qsafe-sdk/models/get_health200_response_services_api.rb +232 -0
- data/lib/qsafe-sdk/models/get_health200_response_services_ephemeral_storage.rb +214 -0
- data/lib/qsafe-sdk/models/get_health200_response_services_redis.rb +223 -0
- data/lib/qsafe-sdk/models/get_rate_limit_status200_response.rb +223 -0
- data/lib/qsafe-sdk/models/get_rate_limit_status200_response_data.rb +232 -0
- data/lib/qsafe-sdk/models/get_rate_limit_status200_response_data_current_usage.rb +232 -0
- data/lib/qsafe-sdk/models/get_rate_limit_status200_response_data_limits.rb +232 -0
- data/lib/qsafe-sdk/models/get_rate_limit_status200_response_data_reset_times.rb +232 -0
- data/lib/qsafe-sdk/models/keypair.rb +379 -0
- data/lib/qsafe-sdk/models/list_api_keys200_response.rb +223 -0
- data/lib/qsafe-sdk/models/list_api_keys200_response_data.rb +234 -0
- data/lib/qsafe-sdk/models/list_api_keys200_response_data_pagination.rb +232 -0
- data/lib/qsafe-sdk/models/list_keypairs200_response.rb +223 -0
- data/lib/qsafe-sdk/models/list_keypairs200_response_data.rb +234 -0
- data/lib/qsafe-sdk/models/list_keypairs200_response_data_pagination.rb +232 -0
- data/lib/qsafe-sdk/models/login_request.rb +237 -0
- data/lib/qsafe-sdk/models/register_request.rb +345 -0
- data/lib/qsafe-sdk/models/revoke_keypair200_response.rb +232 -0
- data/lib/qsafe-sdk/models/revoke_keypair_request.rb +301 -0
- data/lib/qsafe-sdk/models/rotate_api_key200_response.rb +232 -0
- data/lib/qsafe-sdk/models/sign_data200_response.rb +223 -0
- data/lib/qsafe-sdk/models/sign_data200_response_data.rb +262 -0
- data/lib/qsafe-sdk/models/sign_request.rb +321 -0
- data/lib/qsafe-sdk/models/sign_request_ephemeral_storage.rb +279 -0
- data/lib/qsafe-sdk/models/update_api_key_request.rb +343 -0
- data/lib/qsafe-sdk/models/update_keypair200_response.rb +223 -0
- data/lib/qsafe-sdk/models/update_keypair_request.rb +317 -0
- data/lib/qsafe-sdk/models/user.rb +293 -0
- data/lib/qsafe-sdk/models/verify_request.rb +389 -0
- data/lib/qsafe-sdk/models/verify_signature200_response.rb +223 -0
- data/lib/qsafe-sdk/models/verify_signature200_response_data.rb +251 -0
- data/lib/qsafe-sdk/version.rb +15 -0
- data/lib/qsafe-sdk.rb +108 -0
- data/lib/qsafe.rb +108 -0
- data/qsafe-sdk.gemspec +39 -0
- data/qsafe.gemspec +39 -0
- data/spec/api/api_keys_api_spec.rb +105 -0
- data/spec/api/authentication_api_spec.rb +78 -0
- data/spec/api/cryptographic_operations_api_spec.rb +85 -0
- data/spec/api/debug_api_spec.rb +46 -0
- data/spec/api/health_api_spec.rb +46 -0
- data/spec/api/keypairs_api_spec.rb +89 -0
- data/spec/api/utilities_api_spec.rb +46 -0
- data/spec/models/api_key_spec.rb +94 -0
- data/spec/models/auth_response_data_spec.rb +54 -0
- data/spec/models/auth_response_spec.rb +42 -0
- data/spec/models/change_password200_response_spec.rb +42 -0
- data/spec/models/change_password_request_spec.rb +42 -0
- data/spec/models/create_api_key201_response_spec.rb +48 -0
- data/spec/models/create_api_key_request_spec.rb +70 -0
- data/spec/models/debug_redis_test200_response_rate_limit_test_spec.rb +48 -0
- data/spec/models/debug_redis_test200_response_services_status_spec.rb +54 -0
- data/spec/models/debug_redis_test200_response_spec.rb +76 -0
- data/spec/models/debug_redis_test500_response_spec.rb +42 -0
- data/spec/models/decrypt_data200_response_data_spec.rb +54 -0
- data/spec/models/decrypt_data200_response_spec.rb +42 -0
- data/spec/models/decrypt_request_ephemeral_crypto_spec.rb +54 -0
- data/spec/models/decrypt_request_spec.rb +66 -0
- data/spec/models/encrypt_data200_response_data_spec.rb +66 -0
- data/spec/models/encrypt_data200_response_spec.rb +42 -0
- data/spec/models/encrypt_request_ephemeral_storage_spec.rb +48 -0
- data/spec/models/encrypt_request_spec.rb +64 -0
- data/spec/models/error_spec.rb +66 -0
- data/spec/models/generate_keypair201_response_spec.rb +48 -0
- data/spec/models/generate_keypair_request_key_policy_spec.rb +46 -0
- data/spec/models/generate_keypair_request_spec.rb +62 -0
- data/spec/models/get_api_key200_response_spec.rb +42 -0
- data/spec/models/get_api_key_usage200_response_data_daily_usage_inner_spec.rb +42 -0
- data/spec/models/get_api_key_usage200_response_data_spec.rb +48 -0
- data/spec/models/get_api_key_usage200_response_spec.rb +42 -0
- data/spec/models/get_auth_info200_response_data_spec.rb +64 -0
- data/spec/models/get_auth_info200_response_spec.rb +42 -0
- data/spec/models/get_health200_response_services_api_spec.rb +48 -0
- data/spec/models/get_health200_response_services_ephemeral_storage_spec.rb +36 -0
- data/spec/models/get_health200_response_services_redis_spec.rb +42 -0
- data/spec/models/get_health200_response_services_spec.rb +48 -0
- data/spec/models/get_health200_response_spec.rb +48 -0
- data/spec/models/get_rate_limit_status200_response_data_current_usage_spec.rb +48 -0
- data/spec/models/get_rate_limit_status200_response_data_limits_spec.rb +48 -0
- data/spec/models/get_rate_limit_status200_response_data_reset_times_spec.rb +48 -0
- data/spec/models/get_rate_limit_status200_response_data_spec.rb +48 -0
- data/spec/models/get_rate_limit_status200_response_spec.rb +42 -0
- data/spec/models/keypair_spec.rb +114 -0
- data/spec/models/list_api_keys200_response_data_pagination_spec.rb +48 -0
- data/spec/models/list_api_keys200_response_data_spec.rb +48 -0
- data/spec/models/list_api_keys200_response_spec.rb +42 -0
- data/spec/models/list_keypairs200_response_data_pagination_spec.rb +48 -0
- data/spec/models/list_keypairs200_response_data_spec.rb +48 -0
- data/spec/models/list_keypairs200_response_spec.rb +42 -0
- data/spec/models/login_request_spec.rb +42 -0
- data/spec/models/register_request_spec.rb +54 -0
- data/spec/models/revoke_keypair200_response_spec.rb +48 -0
- data/spec/models/revoke_keypair_request_spec.rb +52 -0
- data/spec/models/rotate_api_key200_response_spec.rb +48 -0
- data/spec/models/sign_data200_response_data_spec.rb +66 -0
- data/spec/models/sign_data200_response_spec.rb +42 -0
- data/spec/models/sign_request_ephemeral_storage_spec.rb +42 -0
- data/spec/models/sign_request_spec.rb +64 -0
- data/spec/models/update_api_key_request_spec.rb +70 -0
- data/spec/models/update_keypair200_response_spec.rb +42 -0
- data/spec/models/update_keypair_request_spec.rb +58 -0
- data/spec/models/user_spec.rb +70 -0
- data/spec/models/verify_request_spec.rb +64 -0
- data/spec/models/verify_signature200_response_data_spec.rb +60 -0
- data/spec/models/verify_signature200_response_spec.rb +42 -0
- data/spec/spec_helper.rb +111 -0
- metadata +453 -0
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#QSafe PQC API
|
|
3
|
+
|
|
4
|
+
#Post-quantum cryptography SaaS API supporting ML-KEM (Kyber) and ML-DSA (Dilithium) algorithms. Provides keypair management and cryptographic operations (encrypt, decrypt, sign, verify). ## Authentication - **JWT Bearer Token** — user-based auth, obtained from `/auth/login` or `/auth/register` - **API Key (header)** — programmatic access via `X-API-Key` header - **API Key (query)** — programmatic access via `?api_key=` query parameter ## Quick Start 1. Register → `POST /auth/register` 2. Login → `POST /auth/login` → copy `data.token` 3. Generate keypair → `POST /generate-keypair` 4. Encrypt / Sign with the keypair ID
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
7
|
+
Contact: support@qsafeapi.com
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.9.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'spec_helper'
|
|
14
|
+
require 'json'
|
|
15
|
+
|
|
16
|
+
# Unit tests for QSafe::AuthenticationApi
|
|
17
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
18
|
+
# Please update as you see appropriate
|
|
19
|
+
describe 'AuthenticationApi' do
|
|
20
|
+
before do
|
|
21
|
+
# run before each test
|
|
22
|
+
@api_instance = QSafe::AuthenticationApi.new
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
after do
|
|
26
|
+
# run after each test
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
describe 'test an instance of AuthenticationApi' do
|
|
30
|
+
it 'should create an instance of AuthenticationApi' do
|
|
31
|
+
expect(@api_instance).to be_instance_of(QSafe::AuthenticationApi)
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
# unit tests for change_password
|
|
36
|
+
# Change password (JWT only)
|
|
37
|
+
# @param change_password_request
|
|
38
|
+
# @param [Hash] opts the optional parameters
|
|
39
|
+
# @return [ChangePassword200Response]
|
|
40
|
+
describe 'change_password test' do
|
|
41
|
+
it 'should work' do
|
|
42
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
# unit tests for get_auth_info
|
|
47
|
+
# Get current auth context (JWT or API key)
|
|
48
|
+
# @param [Hash] opts the optional parameters
|
|
49
|
+
# @return [GetAuthInfo200Response]
|
|
50
|
+
describe 'get_auth_info test' do
|
|
51
|
+
it 'should work' do
|
|
52
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
53
|
+
end
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
# unit tests for login_user
|
|
57
|
+
# Login and get JWT token
|
|
58
|
+
# @param login_request
|
|
59
|
+
# @param [Hash] opts the optional parameters
|
|
60
|
+
# @return [AuthResponse]
|
|
61
|
+
describe 'login_user test' do
|
|
62
|
+
it 'should work' do
|
|
63
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
64
|
+
end
|
|
65
|
+
end
|
|
66
|
+
|
|
67
|
+
# unit tests for register_user
|
|
68
|
+
# Register a new user
|
|
69
|
+
# @param register_request
|
|
70
|
+
# @param [Hash] opts the optional parameters
|
|
71
|
+
# @return [AuthResponse]
|
|
72
|
+
describe 'register_user test' do
|
|
73
|
+
it 'should work' do
|
|
74
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
75
|
+
end
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
end
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#QSafe PQC API
|
|
3
|
+
|
|
4
|
+
#Post-quantum cryptography SaaS API supporting ML-KEM (Kyber) and ML-DSA (Dilithium) algorithms. Provides keypair management and cryptographic operations (encrypt, decrypt, sign, verify). ## Authentication - **JWT Bearer Token** — user-based auth, obtained from `/auth/login` or `/auth/register` - **API Key (header)** — programmatic access via `X-API-Key` header - **API Key (query)** — programmatic access via `?api_key=` query parameter ## Quick Start 1. Register → `POST /auth/register` 2. Login → `POST /auth/login` → copy `data.token` 3. Generate keypair → `POST /generate-keypair` 4. Encrypt / Sign with the keypair ID
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
7
|
+
Contact: support@qsafeapi.com
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.9.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'spec_helper'
|
|
14
|
+
require 'json'
|
|
15
|
+
|
|
16
|
+
# Unit tests for QSafe::CryptographicOperationsApi
|
|
17
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
18
|
+
# Please update as you see appropriate
|
|
19
|
+
describe 'CryptographicOperationsApi' do
|
|
20
|
+
before do
|
|
21
|
+
# run before each test
|
|
22
|
+
@api_instance = QSafe::CryptographicOperationsApi.new
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
after do
|
|
26
|
+
# run after each test
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
describe 'test an instance of CryptographicOperationsApi' do
|
|
30
|
+
it 'should create an instance of CryptographicOperationsApi' do
|
|
31
|
+
expect(@api_instance).to be_instance_of(QSafe::CryptographicOperationsApi)
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
# unit tests for decrypt_data
|
|
36
|
+
# Decrypt data with a keypair's private key
|
|
37
|
+
# @param keypair_id UUID v4 keypair identifier
|
|
38
|
+
# @param decrypt_request
|
|
39
|
+
# @param [Hash] opts the optional parameters
|
|
40
|
+
# @return [DecryptData200Response]
|
|
41
|
+
describe 'decrypt_data test' do
|
|
42
|
+
it 'should work' do
|
|
43
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
# unit tests for encrypt_data
|
|
48
|
+
# Encrypt data with a keypair's public key
|
|
49
|
+
# Uses ML-KEM (Kyber). The keypair must use a `KYBER*` algorithm. Optionally stores result in ephemeral storage and returns an `ephemeral_id` for later decryption without passing raw ciphertext.
|
|
50
|
+
# @param keypair_id UUID v4 keypair identifier
|
|
51
|
+
# @param encrypt_request
|
|
52
|
+
# @param [Hash] opts the optional parameters
|
|
53
|
+
# @return [EncryptData200Response]
|
|
54
|
+
describe 'encrypt_data test' do
|
|
55
|
+
it 'should work' do
|
|
56
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
57
|
+
end
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
# unit tests for sign_data
|
|
61
|
+
# Sign data with a keypair's private key
|
|
62
|
+
# Uses ML-DSA (Dilithium). The keypair must use a `DILITHIUM*` algorithm.
|
|
63
|
+
# @param keypair_id UUID v4 keypair identifier
|
|
64
|
+
# @param sign_request
|
|
65
|
+
# @param [Hash] opts the optional parameters
|
|
66
|
+
# @return [SignData200Response]
|
|
67
|
+
describe 'sign_data test' do
|
|
68
|
+
it 'should work' do
|
|
69
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
70
|
+
end
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
# unit tests for verify_signature
|
|
74
|
+
# Verify a signature
|
|
75
|
+
# @param keypair_id UUID v4 keypair identifier
|
|
76
|
+
# @param verify_request
|
|
77
|
+
# @param [Hash] opts the optional parameters
|
|
78
|
+
# @return [VerifySignature200Response]
|
|
79
|
+
describe 'verify_signature test' do
|
|
80
|
+
it 'should work' do
|
|
81
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
82
|
+
end
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
end
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#QSafe PQC API
|
|
3
|
+
|
|
4
|
+
#Post-quantum cryptography SaaS API supporting ML-KEM (Kyber) and ML-DSA (Dilithium) algorithms. Provides keypair management and cryptographic operations (encrypt, decrypt, sign, verify). ## Authentication - **JWT Bearer Token** — user-based auth, obtained from `/auth/login` or `/auth/register` - **API Key (header)** — programmatic access via `X-API-Key` header - **API Key (query)** — programmatic access via `?api_key=` query parameter ## Quick Start 1. Register → `POST /auth/register` 2. Login → `POST /auth/login` → copy `data.token` 3. Generate keypair → `POST /generate-keypair` 4. Encrypt / Sign with the keypair ID
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
7
|
+
Contact: support@qsafeapi.com
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.9.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'spec_helper'
|
|
14
|
+
require 'json'
|
|
15
|
+
|
|
16
|
+
# Unit tests for QSafe::DebugApi
|
|
17
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
18
|
+
# Please update as you see appropriate
|
|
19
|
+
describe 'DebugApi' do
|
|
20
|
+
before do
|
|
21
|
+
# run before each test
|
|
22
|
+
@api_instance = QSafe::DebugApi.new
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
after do
|
|
26
|
+
# run after each test
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
describe 'test an instance of DebugApi' do
|
|
30
|
+
it 'should create an instance of DebugApi' do
|
|
31
|
+
expect(@api_instance).to be_instance_of(QSafe::DebugApi)
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
# unit tests for debug_redis_test
|
|
36
|
+
# Test Redis and internal services
|
|
37
|
+
# ⚠️ Disable in production. Tests Redis connectivity and all enhanced services.
|
|
38
|
+
# @param [Hash] opts the optional parameters
|
|
39
|
+
# @return [DebugRedisTest200Response]
|
|
40
|
+
describe 'debug_redis_test test' do
|
|
41
|
+
it 'should work' do
|
|
42
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
end
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#QSafe PQC API
|
|
3
|
+
|
|
4
|
+
#Post-quantum cryptography SaaS API supporting ML-KEM (Kyber) and ML-DSA (Dilithium) algorithms. Provides keypair management and cryptographic operations (encrypt, decrypt, sign, verify). ## Authentication - **JWT Bearer Token** — user-based auth, obtained from `/auth/login` or `/auth/register` - **API Key (header)** — programmatic access via `X-API-Key` header - **API Key (query)** — programmatic access via `?api_key=` query parameter ## Quick Start 1. Register → `POST /auth/register` 2. Login → `POST /auth/login` → copy `data.token` 3. Generate keypair → `POST /generate-keypair` 4. Encrypt / Sign with the keypair ID
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
7
|
+
Contact: support@qsafeapi.com
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.9.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'spec_helper'
|
|
14
|
+
require 'json'
|
|
15
|
+
|
|
16
|
+
# Unit tests for QSafe::HealthApi
|
|
17
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
18
|
+
# Please update as you see appropriate
|
|
19
|
+
describe 'HealthApi' do
|
|
20
|
+
before do
|
|
21
|
+
# run before each test
|
|
22
|
+
@api_instance = QSafe::HealthApi.new
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
after do
|
|
26
|
+
# run after each test
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
describe 'test an instance of HealthApi' do
|
|
30
|
+
it 'should create an instance of HealthApi' do
|
|
31
|
+
expect(@api_instance).to be_instance_of(QSafe::HealthApi)
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
# unit tests for get_health
|
|
36
|
+
# Health check
|
|
37
|
+
# Returns status of all internal services (Redis, ephemeral storage, API).
|
|
38
|
+
# @param [Hash] opts the optional parameters
|
|
39
|
+
# @return [GetHealth200Response]
|
|
40
|
+
describe 'get_health test' do
|
|
41
|
+
it 'should work' do
|
|
42
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
end
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#QSafe PQC API
|
|
3
|
+
|
|
4
|
+
#Post-quantum cryptography SaaS API supporting ML-KEM (Kyber) and ML-DSA (Dilithium) algorithms. Provides keypair management and cryptographic operations (encrypt, decrypt, sign, verify). ## Authentication - **JWT Bearer Token** — user-based auth, obtained from `/auth/login` or `/auth/register` - **API Key (header)** — programmatic access via `X-API-Key` header - **API Key (query)** — programmatic access via `?api_key=` query parameter ## Quick Start 1. Register → `POST /auth/register` 2. Login → `POST /auth/login` → copy `data.token` 3. Generate keypair → `POST /generate-keypair` 4. Encrypt / Sign with the keypair ID
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
7
|
+
Contact: support@qsafeapi.com
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.9.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'spec_helper'
|
|
14
|
+
require 'json'
|
|
15
|
+
|
|
16
|
+
# Unit tests for QSafe::KeypairsApi
|
|
17
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
18
|
+
# Please update as you see appropriate
|
|
19
|
+
describe 'KeypairsApi' do
|
|
20
|
+
before do
|
|
21
|
+
# run before each test
|
|
22
|
+
@api_instance = QSafe::KeypairsApi.new
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
after do
|
|
26
|
+
# run after each test
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
describe 'test an instance of KeypairsApi' do
|
|
30
|
+
it 'should create an instance of KeypairsApi' do
|
|
31
|
+
expect(@api_instance).to be_instance_of(QSafe::KeypairsApi)
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
# unit tests for generate_keypair
|
|
36
|
+
# Generate a new keypair
|
|
37
|
+
# Supports dual authentication (JWT or API key). Use `KYBER*` algorithms for encryption (KEM), `DILITHIUM*` for signing.
|
|
38
|
+
# @param generate_keypair_request
|
|
39
|
+
# @param [Hash] opts the optional parameters
|
|
40
|
+
# @return [GenerateKeypair201Response]
|
|
41
|
+
describe 'generate_keypair test' do
|
|
42
|
+
it 'should work' do
|
|
43
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
# unit tests for list_keypairs
|
|
48
|
+
# List keypairs
|
|
49
|
+
# @param [Hash] opts the optional parameters
|
|
50
|
+
# @option opts [Integer] :page
|
|
51
|
+
# @option opts [Integer] :limit
|
|
52
|
+
# @option opts [String] :algorithm
|
|
53
|
+
# @option opts [String] :status
|
|
54
|
+
# @option opts [String] :key_type
|
|
55
|
+
# @option opts [Time] :created_after
|
|
56
|
+
# @option opts [Time] :created_before
|
|
57
|
+
# @option opts [String] :search Search in keypair metadata (alphanumeric, spaces, hyphens, underscores)
|
|
58
|
+
# @return [ListKeypairs200Response]
|
|
59
|
+
describe 'list_keypairs test' do
|
|
60
|
+
it 'should work' do
|
|
61
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
62
|
+
end
|
|
63
|
+
end
|
|
64
|
+
|
|
65
|
+
# unit tests for revoke_keypair
|
|
66
|
+
# Revoke a keypair
|
|
67
|
+
# @param keypair_id UUID v4 keypair identifier
|
|
68
|
+
# @param revoke_keypair_request
|
|
69
|
+
# @param [Hash] opts the optional parameters
|
|
70
|
+
# @return [RevokeKeypair200Response]
|
|
71
|
+
describe 'revoke_keypair test' do
|
|
72
|
+
it 'should work' do
|
|
73
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
74
|
+
end
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
# unit tests for update_keypair
|
|
78
|
+
# Update keypair metadata / tags
|
|
79
|
+
# @param keypair_id UUID v4 keypair identifier
|
|
80
|
+
# @param update_keypair_request
|
|
81
|
+
# @param [Hash] opts the optional parameters
|
|
82
|
+
# @return [UpdateKeypair200Response]
|
|
83
|
+
describe 'update_keypair test' do
|
|
84
|
+
it 'should work' do
|
|
85
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
86
|
+
end
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
end
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#QSafe PQC API
|
|
3
|
+
|
|
4
|
+
#Post-quantum cryptography SaaS API supporting ML-KEM (Kyber) and ML-DSA (Dilithium) algorithms. Provides keypair management and cryptographic operations (encrypt, decrypt, sign, verify). ## Authentication - **JWT Bearer Token** — user-based auth, obtained from `/auth/login` or `/auth/register` - **API Key (header)** — programmatic access via `X-API-Key` header - **API Key (query)** — programmatic access via `?api_key=` query parameter ## Quick Start 1. Register → `POST /auth/register` 2. Login → `POST /auth/login` → copy `data.token` 3. Generate keypair → `POST /generate-keypair` 4. Encrypt / Sign with the keypair ID
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
7
|
+
Contact: support@qsafeapi.com
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.9.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'spec_helper'
|
|
14
|
+
require 'json'
|
|
15
|
+
|
|
16
|
+
# Unit tests for QSafe::UtilitiesApi
|
|
17
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
18
|
+
# Please update as you see appropriate
|
|
19
|
+
describe 'UtilitiesApi' do
|
|
20
|
+
before do
|
|
21
|
+
# run before each test
|
|
22
|
+
@api_instance = QSafe::UtilitiesApi.new
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
after do
|
|
26
|
+
# run after each test
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
describe 'test an instance of UtilitiesApi' do
|
|
30
|
+
it 'should create an instance of UtilitiesApi' do
|
|
31
|
+
expect(@api_instance).to be_instance_of(QSafe::UtilitiesApi)
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
# unit tests for get_rate_limit_status
|
|
36
|
+
# Get rate limit status for the current API key
|
|
37
|
+
# API key authentication only — JWT not supported for this endpoint.
|
|
38
|
+
# @param [Hash] opts the optional parameters
|
|
39
|
+
# @return [GetRateLimitStatus200Response]
|
|
40
|
+
describe 'get_rate_limit_status test' do
|
|
41
|
+
it 'should work' do
|
|
42
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
end
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#QSafe PQC API
|
|
3
|
+
|
|
4
|
+
#Post-quantum cryptography SaaS API supporting ML-KEM (Kyber) and ML-DSA (Dilithium) algorithms. Provides keypair management and cryptographic operations (encrypt, decrypt, sign, verify). ## Authentication - **JWT Bearer Token** — user-based auth, obtained from `/auth/login` or `/auth/register` - **API Key (header)** — programmatic access via `X-API-Key` header - **API Key (query)** — programmatic access via `?api_key=` query parameter ## Quick Start 1. Register → `POST /auth/register` 2. Login → `POST /auth/login` → copy `data.token` 3. Generate keypair → `POST /generate-keypair` 4. Encrypt / Sign with the keypair ID
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
7
|
+
Contact: support@qsafeapi.com
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.9.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'spec_helper'
|
|
14
|
+
require 'json'
|
|
15
|
+
require 'date'
|
|
16
|
+
|
|
17
|
+
# Unit tests for QSafe::ApiKey
|
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
19
|
+
# Please update as you see appropriate
|
|
20
|
+
describe QSafe::ApiKey do
|
|
21
|
+
let(:instance) { QSafe::ApiKey.new }
|
|
22
|
+
|
|
23
|
+
describe 'test an instance of ApiKey' do
|
|
24
|
+
it 'should create an instance of ApiKey' do
|
|
25
|
+
# uncomment below to test the instance creation
|
|
26
|
+
#expect(instance).to be_instance_of(QSafe::ApiKey)
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
describe 'test attribute "id"' do
|
|
31
|
+
it 'should work' do
|
|
32
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
describe 'test attribute "name"' do
|
|
37
|
+
it 'should work' do
|
|
38
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
describe 'test attribute "permissions"' do
|
|
43
|
+
it 'should work' do
|
|
44
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
45
|
+
# validator = Petstore::EnumTest::EnumAttributeValidator.new('Array<String>', ["read", "write", "crypto_encrypt", "crypto_decrypt", "crypto_sign", "crypto_verify"])
|
|
46
|
+
# validator.allowable_values.each do |value|
|
|
47
|
+
# expect { instance.permissions = value }.not_to raise_error
|
|
48
|
+
# end
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
describe 'test attribute "rate_limits"' do
|
|
53
|
+
it 'should work' do
|
|
54
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
55
|
+
end
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
describe 'test attribute "is_active"' do
|
|
59
|
+
it 'should work' do
|
|
60
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
61
|
+
end
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
describe 'test attribute "created_at"' do
|
|
65
|
+
it 'should work' do
|
|
66
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
67
|
+
end
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
describe 'test attribute "last_used"' do
|
|
71
|
+
it 'should work' do
|
|
72
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
73
|
+
end
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
describe 'test attribute "expires_at"' do
|
|
77
|
+
it 'should work' do
|
|
78
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
79
|
+
end
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
describe 'test attribute "allowed_ips"' do
|
|
83
|
+
it 'should work' do
|
|
84
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
85
|
+
end
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
describe 'test attribute "allowed_origins"' do
|
|
89
|
+
it 'should work' do
|
|
90
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
91
|
+
end
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
end
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#QSafe PQC API
|
|
3
|
+
|
|
4
|
+
#Post-quantum cryptography SaaS API supporting ML-KEM (Kyber) and ML-DSA (Dilithium) algorithms. Provides keypair management and cryptographic operations (encrypt, decrypt, sign, verify). ## Authentication - **JWT Bearer Token** — user-based auth, obtained from `/auth/login` or `/auth/register` - **API Key (header)** — programmatic access via `X-API-Key` header - **API Key (query)** — programmatic access via `?api_key=` query parameter ## Quick Start 1. Register → `POST /auth/register` 2. Login → `POST /auth/login` → copy `data.token` 3. Generate keypair → `POST /generate-keypair` 4. Encrypt / Sign with the keypair ID
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
7
|
+
Contact: support@qsafeapi.com
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.9.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'spec_helper'
|
|
14
|
+
require 'json'
|
|
15
|
+
require 'date'
|
|
16
|
+
|
|
17
|
+
# Unit tests for QSafe::AuthResponseData
|
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
19
|
+
# Please update as you see appropriate
|
|
20
|
+
describe QSafe::AuthResponseData do
|
|
21
|
+
let(:instance) { QSafe::AuthResponseData.new }
|
|
22
|
+
|
|
23
|
+
describe 'test an instance of AuthResponseData' do
|
|
24
|
+
it 'should create an instance of AuthResponseData' do
|
|
25
|
+
# uncomment below to test the instance creation
|
|
26
|
+
#expect(instance).to be_instance_of(QSafe::AuthResponseData)
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
describe 'test attribute "token"' do
|
|
31
|
+
it 'should work' do
|
|
32
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
describe 'test attribute "refresh_token"' do
|
|
37
|
+
it 'should work' do
|
|
38
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
describe 'test attribute "expires_in"' do
|
|
43
|
+
it 'should work' do
|
|
44
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
describe 'test attribute "user"' do
|
|
49
|
+
it 'should work' do
|
|
50
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
51
|
+
end
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
end
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#QSafe PQC API
|
|
3
|
+
|
|
4
|
+
#Post-quantum cryptography SaaS API supporting ML-KEM (Kyber) and ML-DSA (Dilithium) algorithms. Provides keypair management and cryptographic operations (encrypt, decrypt, sign, verify). ## Authentication - **JWT Bearer Token** — user-based auth, obtained from `/auth/login` or `/auth/register` - **API Key (header)** — programmatic access via `X-API-Key` header - **API Key (query)** — programmatic access via `?api_key=` query parameter ## Quick Start 1. Register → `POST /auth/register` 2. Login → `POST /auth/login` → copy `data.token` 3. Generate keypair → `POST /generate-keypair` 4. Encrypt / Sign with the keypair ID
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
7
|
+
Contact: support@qsafeapi.com
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.9.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'spec_helper'
|
|
14
|
+
require 'json'
|
|
15
|
+
require 'date'
|
|
16
|
+
|
|
17
|
+
# Unit tests for QSafe::AuthResponse
|
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
19
|
+
# Please update as you see appropriate
|
|
20
|
+
describe QSafe::AuthResponse do
|
|
21
|
+
let(:instance) { QSafe::AuthResponse.new }
|
|
22
|
+
|
|
23
|
+
describe 'test an instance of AuthResponse' do
|
|
24
|
+
it 'should create an instance of AuthResponse' do
|
|
25
|
+
# uncomment below to test the instance creation
|
|
26
|
+
#expect(instance).to be_instance_of(QSafe::AuthResponse)
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
describe 'test attribute "success"' do
|
|
31
|
+
it 'should work' do
|
|
32
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
describe 'test attribute "data"' do
|
|
37
|
+
it 'should work' do
|
|
38
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
end
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#QSafe PQC API
|
|
3
|
+
|
|
4
|
+
#Post-quantum cryptography SaaS API supporting ML-KEM (Kyber) and ML-DSA (Dilithium) algorithms. Provides keypair management and cryptographic operations (encrypt, decrypt, sign, verify). ## Authentication - **JWT Bearer Token** — user-based auth, obtained from `/auth/login` or `/auth/register` - **API Key (header)** — programmatic access via `X-API-Key` header - **API Key (query)** — programmatic access via `?api_key=` query parameter ## Quick Start 1. Register → `POST /auth/register` 2. Login → `POST /auth/login` → copy `data.token` 3. Generate keypair → `POST /generate-keypair` 4. Encrypt / Sign with the keypair ID
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
7
|
+
Contact: support@qsafeapi.com
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.9.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'spec_helper'
|
|
14
|
+
require 'json'
|
|
15
|
+
require 'date'
|
|
16
|
+
|
|
17
|
+
# Unit tests for QSafe::ChangePassword200Response
|
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
19
|
+
# Please update as you see appropriate
|
|
20
|
+
describe QSafe::ChangePassword200Response do
|
|
21
|
+
let(:instance) { QSafe::ChangePassword200Response.new }
|
|
22
|
+
|
|
23
|
+
describe 'test an instance of ChangePassword200Response' do
|
|
24
|
+
it 'should create an instance of ChangePassword200Response' do
|
|
25
|
+
# uncomment below to test the instance creation
|
|
26
|
+
#expect(instance).to be_instance_of(QSafe::ChangePassword200Response)
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
describe 'test attribute "success"' do
|
|
31
|
+
it 'should work' do
|
|
32
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
describe 'test attribute "message"' do
|
|
37
|
+
it 'should work' do
|
|
38
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
end
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#QSafe PQC API
|
|
3
|
+
|
|
4
|
+
#Post-quantum cryptography SaaS API supporting ML-KEM (Kyber) and ML-DSA (Dilithium) algorithms. Provides keypair management and cryptographic operations (encrypt, decrypt, sign, verify). ## Authentication - **JWT Bearer Token** — user-based auth, obtained from `/auth/login` or `/auth/register` - **API Key (header)** — programmatic access via `X-API-Key` header - **API Key (query)** — programmatic access via `?api_key=` query parameter ## Quick Start 1. Register → `POST /auth/register` 2. Login → `POST /auth/login` → copy `data.token` 3. Generate keypair → `POST /generate-keypair` 4. Encrypt / Sign with the keypair ID
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: 1.0.0
|
|
7
|
+
Contact: support@qsafeapi.com
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.9.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'spec_helper'
|
|
14
|
+
require 'json'
|
|
15
|
+
require 'date'
|
|
16
|
+
|
|
17
|
+
# Unit tests for QSafe::ChangePasswordRequest
|
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
|
19
|
+
# Please update as you see appropriate
|
|
20
|
+
describe QSafe::ChangePasswordRequest do
|
|
21
|
+
let(:instance) { QSafe::ChangePasswordRequest.new }
|
|
22
|
+
|
|
23
|
+
describe 'test an instance of ChangePasswordRequest' do
|
|
24
|
+
it 'should create an instance of ChangePasswordRequest' do
|
|
25
|
+
# uncomment below to test the instance creation
|
|
26
|
+
#expect(instance).to be_instance_of(QSafe::ChangePasswordRequest)
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
describe 'test attribute "current_password"' do
|
|
31
|
+
it 'should work' do
|
|
32
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
describe 'test attribute "new_password"' do
|
|
37
|
+
it 'should work' do
|
|
38
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
end
|