zyphr 0.1.34 → 0.1.35
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/README.md +14 -13
- data/docs/AuthEmailOTPApi.md +384 -0
- data/docs/CheckEmailOtpAvailability200Response.md +18 -0
- data/docs/{PhoneAuthAvailabilityResponseData.md → CheckEmailOtpAvailability200ResponseData.md} +2 -2
- data/docs/PhoneAuthAvailabilityResponse.md +1 -1
- data/docs/SendEmailOtpRegistrationRequest.md +18 -0
- data/docs/VerifyEmailOtpLoginRequest.md +22 -0
- data/docs/VerifyEmailOtpRegistrationRequest.md +24 -0
- data/lib/zyphr/api/auth_email_otp_api.rb +351 -0
- data/lib/zyphr/models/check_email_otp_availability200_response.rb +220 -0
- data/lib/zyphr/models/{phone_auth_availability_response_data.rb → check_email_otp_availability200_response_data.rb} +3 -3
- data/lib/zyphr/models/phone_auth_availability_response.rb +1 -1
- data/lib/zyphr/models/send_email_otp_registration_request.rb +237 -0
- data/lib/zyphr/models/verify_email_otp_login_request.rb +272 -0
- data/lib/zyphr/models/verify_email_otp_registration_request.rb +281 -0
- data/lib/zyphr.rb +6 -1
- data/spec/api/auth_email_otp_api_spec.rb +94 -0
- data/spec/models/{phone_auth_availability_response_data_spec.rb → check_email_otp_availability200_response_data_spec.rb} +6 -6
- data/spec/models/check_email_otp_availability200_response_spec.rb +36 -0
- data/spec/models/send_email_otp_registration_request_spec.rb +36 -0
- data/spec/models/verify_email_otp_login_request_spec.rb +48 -0
- data/spec/models/verify_email_otp_registration_request_spec.rb +54 -0
- data/zyphr.gemspec +1 -1
- metadata +441 -421
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: bbc90277332c8fd92e70a3dab17024c962e58c650f1331956da643d2cadb0aa0
|
|
4
|
+
data.tar.gz: 77cfebd35228ba5910ab9c3b460923fad441e067c4f2dd346ca87a06beefcc46
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 54011e02c71f5a0f3957eff79192beacc31519aec82545501a6ddf8583edb191767b77216d490400ec1f200f45bdf0d1685be166d47239e827644a57b76c9a89
|
|
7
|
+
data.tar.gz: dd0bb3b0099dcf756113f5295c72ec8e22a8476c4c55f8ffcccddca11414b08aa46fe8978179b94deb49d6e131c23f1febe0e6cda9c5fa10e3bebf6ae5c884d7
|
data/README.md
CHANGED
|
@@ -95,13 +95,6 @@ require 'zyphr'
|
|
|
95
95
|
|
|
96
96
|
# Setup authorization
|
|
97
97
|
Zyphr.configure do |config|
|
|
98
|
-
# Configure API key authorization: ApplicationSecret
|
|
99
|
-
config.api_key['X-Application-Secret'] = 'YOUR API KEY'
|
|
100
|
-
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
101
|
-
# config.api_key_prefix['X-Application-Secret'] = 'Bearer'
|
|
102
|
-
# Configure faraday connection
|
|
103
|
-
config.configure_faraday_connection { |connection| 'YOUR CONNECTION CONFIG PROC' }
|
|
104
|
-
|
|
105
98
|
# Configure API key authorization: ApplicationPublicKey
|
|
106
99
|
config.api_key['X-Application-Key'] = 'YOUR API KEY'
|
|
107
100
|
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
@@ -110,15 +103,14 @@ Zyphr.configure do |config|
|
|
|
110
103
|
config.configure_faraday_connection { |connection| 'YOUR CONNECTION CONFIG PROC' }
|
|
111
104
|
end
|
|
112
105
|
|
|
113
|
-
api_instance = Zyphr::
|
|
114
|
-
bulk_upsert_auth_email_templates_request = Zyphr::BulkUpsertAuthEmailTemplatesRequest.new # BulkUpsertAuthEmailTemplatesRequest |
|
|
106
|
+
api_instance = Zyphr::AuthEmailOTPApi.new
|
|
115
107
|
|
|
116
108
|
begin
|
|
117
|
-
#
|
|
118
|
-
result = api_instance.
|
|
109
|
+
#Check email OTP availability
|
|
110
|
+
result = api_instance.check_email_otp_availability
|
|
119
111
|
p result
|
|
120
112
|
rescue Zyphr::ApiError => e
|
|
121
|
-
puts "Exception when calling
|
|
113
|
+
puts "Exception when calling AuthEmailOTPApi->check_email_otp_availability: #{e}"
|
|
122
114
|
end
|
|
123
115
|
|
|
124
116
|
```
|
|
@@ -129,6 +121,11 @@ All URIs are relative to *https://api.zyphr.dev/v1*
|
|
|
129
121
|
|
|
130
122
|
Class | Method | HTTP request | Description
|
|
131
123
|
------------ | ------------- | ------------- | -------------
|
|
124
|
+
*Zyphr::AuthEmailOTPApi* | [**check_email_otp_availability**](docs/AuthEmailOTPApi.md#check_email_otp_availability) | **GET** /auth/email-otp/available | Check email OTP availability
|
|
125
|
+
*Zyphr::AuthEmailOTPApi* | [**send_email_otp_login**](docs/AuthEmailOTPApi.md#send_email_otp_login) | **POST** /auth/email-otp/login/send | Send email OTP for login
|
|
126
|
+
*Zyphr::AuthEmailOTPApi* | [**send_email_otp_registration**](docs/AuthEmailOTPApi.md#send_email_otp_registration) | **POST** /auth/email-otp/register/send | Send email OTP for registration
|
|
127
|
+
*Zyphr::AuthEmailOTPApi* | [**verify_email_otp_login**](docs/AuthEmailOTPApi.md#verify_email_otp_login) | **POST** /auth/email-otp/login/verify | Verify email OTP login
|
|
128
|
+
*Zyphr::AuthEmailOTPApi* | [**verify_email_otp_registration**](docs/AuthEmailOTPApi.md#verify_email_otp_registration) | **POST** /auth/email-otp/register/verify | Verify email OTP registration
|
|
132
129
|
*Zyphr::AuthEmailTemplatesApi* | [**bulk_upsert_auth_email_templates**](docs/AuthEmailTemplatesApi.md#bulk_upsert_auth_email_templates) | **PUT** /auth/email-templates | Bulk-upsert auth email templates
|
|
133
130
|
*Zyphr::AuthEmailTemplatesApi* | [**delete_auth_email_template**](docs/AuthEmailTemplatesApi.md#delete_auth_email_template) | **DELETE** /auth/email-templates/{type} | Remove a tenant override
|
|
134
131
|
*Zyphr::AuthEmailTemplatesApi* | [**get_auth_email_template**](docs/AuthEmailTemplatesApi.md#get_auth_email_template) | **GET** /auth/email-templates/{type} | Get an auth email template
|
|
@@ -409,6 +406,8 @@ Class | Method | HTTP request | Description
|
|
|
409
406
|
- [Zyphr::Category](docs/Category.md)
|
|
410
407
|
- [Zyphr::CategoryListResponse](docs/CategoryListResponse.md)
|
|
411
408
|
- [Zyphr::CategoryResponse](docs/CategoryResponse.md)
|
|
409
|
+
- [Zyphr::CheckEmailOtpAvailability200Response](docs/CheckEmailOtpAvailability200Response.md)
|
|
410
|
+
- [Zyphr::CheckEmailOtpAvailability200ResponseData](docs/CheckEmailOtpAvailability200ResponseData.md)
|
|
412
411
|
- [Zyphr::ConfirmEmailVerificationRequest](docs/ConfirmEmailVerificationRequest.md)
|
|
413
412
|
- [Zyphr::ConfirmEmailVerificationResponse](docs/ConfirmEmailVerificationResponse.md)
|
|
414
413
|
- [Zyphr::ConfirmEmailVerificationResponseData](docs/ConfirmEmailVerificationResponseData.md)
|
|
@@ -559,7 +558,6 @@ Class | Method | HTTP request | Description
|
|
|
559
558
|
- [Zyphr::PayloadTooLargeErrorError](docs/PayloadTooLargeErrorError.md)
|
|
560
559
|
- [Zyphr::PayloadTooLargeErrorErrorDetails](docs/PayloadTooLargeErrorErrorDetails.md)
|
|
561
560
|
- [Zyphr::PhoneAuthAvailabilityResponse](docs/PhoneAuthAvailabilityResponse.md)
|
|
562
|
-
- [Zyphr::PhoneAuthAvailabilityResponseData](docs/PhoneAuthAvailabilityResponseData.md)
|
|
563
561
|
- [Zyphr::PhoneLoginVerifyRequest](docs/PhoneLoginVerifyRequest.md)
|
|
564
562
|
- [Zyphr::PhoneOtpSendRequest](docs/PhoneOtpSendRequest.md)
|
|
565
563
|
- [Zyphr::PhoneOtpSentResponse](docs/PhoneOtpSentResponse.md)
|
|
@@ -609,6 +607,7 @@ Class | Method | HTTP request | Description
|
|
|
609
607
|
- [Zyphr::SendBatchSmsData](docs/SendBatchSmsData.md)
|
|
610
608
|
- [Zyphr::SendBatchSmsRequest](docs/SendBatchSmsRequest.md)
|
|
611
609
|
- [Zyphr::SendBatchSmsResponse](docs/SendBatchSmsResponse.md)
|
|
610
|
+
- [Zyphr::SendEmailOtpRegistrationRequest](docs/SendEmailOtpRegistrationRequest.md)
|
|
612
611
|
- [Zyphr::SendEmailRequest](docs/SendEmailRequest.md)
|
|
613
612
|
- [Zyphr::SendEmailResponse](docs/SendEmailResponse.md)
|
|
614
613
|
- [Zyphr::SendEmailResponseData](docs/SendEmailResponseData.md)
|
|
@@ -720,6 +719,8 @@ Class | Method | HTTP request | Description
|
|
|
720
719
|
- [Zyphr::VerificationStatusResponseData](docs/VerificationStatusResponseData.md)
|
|
721
720
|
- [Zyphr::VerifyDomainResponse](docs/VerifyDomainResponse.md)
|
|
722
721
|
- [Zyphr::VerifyDomainResponseData](docs/VerifyDomainResponseData.md)
|
|
722
|
+
- [Zyphr::VerifyEmailOtpLoginRequest](docs/VerifyEmailOtpLoginRequest.md)
|
|
723
|
+
- [Zyphr::VerifyEmailOtpRegistrationRequest](docs/VerifyEmailOtpRegistrationRequest.md)
|
|
723
724
|
- [Zyphr::VerifySmsConfigData](docs/VerifySmsConfigData.md)
|
|
724
725
|
- [Zyphr::VerifySmsConfigResponse](docs/VerifySmsConfigResponse.md)
|
|
725
726
|
- [Zyphr::WaaSApplication](docs/WaaSApplication.md)
|
|
@@ -0,0 +1,384 @@
|
|
|
1
|
+
# Zyphr::AuthEmailOTPApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *https://api.zyphr.dev/v1*
|
|
4
|
+
|
|
5
|
+
| Method | HTTP request | Description |
|
|
6
|
+
| ------ | ------------ | ----------- |
|
|
7
|
+
| [**check_email_otp_availability**](AuthEmailOTPApi.md#check_email_otp_availability) | **GET** /auth/email-otp/available | Check email OTP availability |
|
|
8
|
+
| [**send_email_otp_login**](AuthEmailOTPApi.md#send_email_otp_login) | **POST** /auth/email-otp/login/send | Send email OTP for login |
|
|
9
|
+
| [**send_email_otp_registration**](AuthEmailOTPApi.md#send_email_otp_registration) | **POST** /auth/email-otp/register/send | Send email OTP for registration |
|
|
10
|
+
| [**verify_email_otp_login**](AuthEmailOTPApi.md#verify_email_otp_login) | **POST** /auth/email-otp/login/verify | Verify email OTP login |
|
|
11
|
+
| [**verify_email_otp_registration**](AuthEmailOTPApi.md#verify_email_otp_registration) | **POST** /auth/email-otp/register/verify | Verify email OTP registration |
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## check_email_otp_availability
|
|
15
|
+
|
|
16
|
+
> <CheckEmailOtpAvailability200Response> check_email_otp_availability
|
|
17
|
+
|
|
18
|
+
Check email OTP availability
|
|
19
|
+
|
|
20
|
+
Check if numeric email OTP authentication is available for this application. Requires a verified sending domain on the project.
|
|
21
|
+
|
|
22
|
+
### Examples
|
|
23
|
+
|
|
24
|
+
```ruby
|
|
25
|
+
require 'time'
|
|
26
|
+
require 'zyphr'
|
|
27
|
+
# setup authorization
|
|
28
|
+
Zyphr.configure do |config|
|
|
29
|
+
# Configure API key authorization: ApplicationPublicKey
|
|
30
|
+
config.api_key['X-Application-Key'] = 'YOUR API KEY'
|
|
31
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
32
|
+
# config.api_key_prefix['X-Application-Key'] = 'Bearer'
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
api_instance = Zyphr::AuthEmailOTPApi.new
|
|
36
|
+
|
|
37
|
+
begin
|
|
38
|
+
# Check email OTP availability
|
|
39
|
+
result = api_instance.check_email_otp_availability
|
|
40
|
+
p result
|
|
41
|
+
rescue Zyphr::ApiError => e
|
|
42
|
+
puts "Error when calling AuthEmailOTPApi->check_email_otp_availability: #{e}"
|
|
43
|
+
end
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
#### Using the check_email_otp_availability_with_http_info variant
|
|
47
|
+
|
|
48
|
+
This returns an Array which contains the response data, status code and headers.
|
|
49
|
+
|
|
50
|
+
> <Array(<CheckEmailOtpAvailability200Response>, Integer, Hash)> check_email_otp_availability_with_http_info
|
|
51
|
+
|
|
52
|
+
```ruby
|
|
53
|
+
begin
|
|
54
|
+
# Check email OTP availability
|
|
55
|
+
data, status_code, headers = api_instance.check_email_otp_availability_with_http_info
|
|
56
|
+
p status_code # => 2xx
|
|
57
|
+
p headers # => { ... }
|
|
58
|
+
p data # => <CheckEmailOtpAvailability200Response>
|
|
59
|
+
rescue Zyphr::ApiError => e
|
|
60
|
+
puts "Error when calling AuthEmailOTPApi->check_email_otp_availability_with_http_info: #{e}"
|
|
61
|
+
end
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
### Parameters
|
|
65
|
+
|
|
66
|
+
This endpoint does not need any parameter.
|
|
67
|
+
|
|
68
|
+
### Return type
|
|
69
|
+
|
|
70
|
+
[**CheckEmailOtpAvailability200Response**](CheckEmailOtpAvailability200Response.md)
|
|
71
|
+
|
|
72
|
+
### Authorization
|
|
73
|
+
|
|
74
|
+
[ApplicationPublicKey](../README.md#ApplicationPublicKey)
|
|
75
|
+
|
|
76
|
+
### HTTP request headers
|
|
77
|
+
|
|
78
|
+
- **Content-Type**: Not defined
|
|
79
|
+
- **Accept**: application/json
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
## send_email_otp_login
|
|
83
|
+
|
|
84
|
+
> <PhoneOtpSentResponse> send_email_otp_login(send_email_otp_registration_request)
|
|
85
|
+
|
|
86
|
+
Send email OTP for login
|
|
87
|
+
|
|
88
|
+
Send a numeric verification code to an existing user's email address for login.
|
|
89
|
+
|
|
90
|
+
### Examples
|
|
91
|
+
|
|
92
|
+
```ruby
|
|
93
|
+
require 'time'
|
|
94
|
+
require 'zyphr'
|
|
95
|
+
# setup authorization
|
|
96
|
+
Zyphr.configure do |config|
|
|
97
|
+
# Configure API key authorization: ApplicationSecret
|
|
98
|
+
config.api_key['X-Application-Secret'] = 'YOUR API KEY'
|
|
99
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
100
|
+
# config.api_key_prefix['X-Application-Secret'] = 'Bearer'
|
|
101
|
+
|
|
102
|
+
# Configure API key authorization: ApplicationPublicKey
|
|
103
|
+
config.api_key['X-Application-Key'] = 'YOUR API KEY'
|
|
104
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
105
|
+
# config.api_key_prefix['X-Application-Key'] = 'Bearer'
|
|
106
|
+
end
|
|
107
|
+
|
|
108
|
+
api_instance = Zyphr::AuthEmailOTPApi.new
|
|
109
|
+
send_email_otp_registration_request = Zyphr::SendEmailOtpRegistrationRequest.new({email: 'email_example'}) # SendEmailOtpRegistrationRequest |
|
|
110
|
+
|
|
111
|
+
begin
|
|
112
|
+
# Send email OTP for login
|
|
113
|
+
result = api_instance.send_email_otp_login(send_email_otp_registration_request)
|
|
114
|
+
p result
|
|
115
|
+
rescue Zyphr::ApiError => e
|
|
116
|
+
puts "Error when calling AuthEmailOTPApi->send_email_otp_login: #{e}"
|
|
117
|
+
end
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
#### Using the send_email_otp_login_with_http_info variant
|
|
121
|
+
|
|
122
|
+
This returns an Array which contains the response data, status code and headers.
|
|
123
|
+
|
|
124
|
+
> <Array(<PhoneOtpSentResponse>, Integer, Hash)> send_email_otp_login_with_http_info(send_email_otp_registration_request)
|
|
125
|
+
|
|
126
|
+
```ruby
|
|
127
|
+
begin
|
|
128
|
+
# Send email OTP for login
|
|
129
|
+
data, status_code, headers = api_instance.send_email_otp_login_with_http_info(send_email_otp_registration_request)
|
|
130
|
+
p status_code # => 2xx
|
|
131
|
+
p headers # => { ... }
|
|
132
|
+
p data # => <PhoneOtpSentResponse>
|
|
133
|
+
rescue Zyphr::ApiError => e
|
|
134
|
+
puts "Error when calling AuthEmailOTPApi->send_email_otp_login_with_http_info: #{e}"
|
|
135
|
+
end
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
### Parameters
|
|
139
|
+
|
|
140
|
+
| Name | Type | Description | Notes |
|
|
141
|
+
| ---- | ---- | ----------- | ----- |
|
|
142
|
+
| **send_email_otp_registration_request** | [**SendEmailOtpRegistrationRequest**](SendEmailOtpRegistrationRequest.md) | | |
|
|
143
|
+
|
|
144
|
+
### Return type
|
|
145
|
+
|
|
146
|
+
[**PhoneOtpSentResponse**](PhoneOtpSentResponse.md)
|
|
147
|
+
|
|
148
|
+
### Authorization
|
|
149
|
+
|
|
150
|
+
[ApplicationSecret](../README.md#ApplicationSecret), [ApplicationPublicKey](../README.md#ApplicationPublicKey)
|
|
151
|
+
|
|
152
|
+
### HTTP request headers
|
|
153
|
+
|
|
154
|
+
- **Content-Type**: application/json
|
|
155
|
+
- **Accept**: application/json
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
## send_email_otp_registration
|
|
159
|
+
|
|
160
|
+
> <PhoneOtpSentResponse> send_email_otp_registration(send_email_otp_registration_request)
|
|
161
|
+
|
|
162
|
+
Send email OTP for registration
|
|
163
|
+
|
|
164
|
+
Send a numeric verification code to an email address for new user registration.
|
|
165
|
+
|
|
166
|
+
### Examples
|
|
167
|
+
|
|
168
|
+
```ruby
|
|
169
|
+
require 'time'
|
|
170
|
+
require 'zyphr'
|
|
171
|
+
# setup authorization
|
|
172
|
+
Zyphr.configure do |config|
|
|
173
|
+
# Configure API key authorization: ApplicationSecret
|
|
174
|
+
config.api_key['X-Application-Secret'] = 'YOUR API KEY'
|
|
175
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
176
|
+
# config.api_key_prefix['X-Application-Secret'] = 'Bearer'
|
|
177
|
+
|
|
178
|
+
# Configure API key authorization: ApplicationPublicKey
|
|
179
|
+
config.api_key['X-Application-Key'] = 'YOUR API KEY'
|
|
180
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
181
|
+
# config.api_key_prefix['X-Application-Key'] = 'Bearer'
|
|
182
|
+
end
|
|
183
|
+
|
|
184
|
+
api_instance = Zyphr::AuthEmailOTPApi.new
|
|
185
|
+
send_email_otp_registration_request = Zyphr::SendEmailOtpRegistrationRequest.new({email: 'email_example'}) # SendEmailOtpRegistrationRequest |
|
|
186
|
+
|
|
187
|
+
begin
|
|
188
|
+
# Send email OTP for registration
|
|
189
|
+
result = api_instance.send_email_otp_registration(send_email_otp_registration_request)
|
|
190
|
+
p result
|
|
191
|
+
rescue Zyphr::ApiError => e
|
|
192
|
+
puts "Error when calling AuthEmailOTPApi->send_email_otp_registration: #{e}"
|
|
193
|
+
end
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
#### Using the send_email_otp_registration_with_http_info variant
|
|
197
|
+
|
|
198
|
+
This returns an Array which contains the response data, status code and headers.
|
|
199
|
+
|
|
200
|
+
> <Array(<PhoneOtpSentResponse>, Integer, Hash)> send_email_otp_registration_with_http_info(send_email_otp_registration_request)
|
|
201
|
+
|
|
202
|
+
```ruby
|
|
203
|
+
begin
|
|
204
|
+
# Send email OTP for registration
|
|
205
|
+
data, status_code, headers = api_instance.send_email_otp_registration_with_http_info(send_email_otp_registration_request)
|
|
206
|
+
p status_code # => 2xx
|
|
207
|
+
p headers # => { ... }
|
|
208
|
+
p data # => <PhoneOtpSentResponse>
|
|
209
|
+
rescue Zyphr::ApiError => e
|
|
210
|
+
puts "Error when calling AuthEmailOTPApi->send_email_otp_registration_with_http_info: #{e}"
|
|
211
|
+
end
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
### Parameters
|
|
215
|
+
|
|
216
|
+
| Name | Type | Description | Notes |
|
|
217
|
+
| ---- | ---- | ----------- | ----- |
|
|
218
|
+
| **send_email_otp_registration_request** | [**SendEmailOtpRegistrationRequest**](SendEmailOtpRegistrationRequest.md) | | |
|
|
219
|
+
|
|
220
|
+
### Return type
|
|
221
|
+
|
|
222
|
+
[**PhoneOtpSentResponse**](PhoneOtpSentResponse.md)
|
|
223
|
+
|
|
224
|
+
### Authorization
|
|
225
|
+
|
|
226
|
+
[ApplicationSecret](../README.md#ApplicationSecret), [ApplicationPublicKey](../README.md#ApplicationPublicKey)
|
|
227
|
+
|
|
228
|
+
### HTTP request headers
|
|
229
|
+
|
|
230
|
+
- **Content-Type**: application/json
|
|
231
|
+
- **Accept**: application/json
|
|
232
|
+
|
|
233
|
+
|
|
234
|
+
## verify_email_otp_login
|
|
235
|
+
|
|
236
|
+
> <AuthLoginResponse> verify_email_otp_login(verify_email_otp_login_request)
|
|
237
|
+
|
|
238
|
+
Verify email OTP login
|
|
239
|
+
|
|
240
|
+
Verify the numeric code and login an existing user. If MFA is enabled, returns mfa_required with a challenge token.
|
|
241
|
+
|
|
242
|
+
### Examples
|
|
243
|
+
|
|
244
|
+
```ruby
|
|
245
|
+
require 'time'
|
|
246
|
+
require 'zyphr'
|
|
247
|
+
# setup authorization
|
|
248
|
+
Zyphr.configure do |config|
|
|
249
|
+
# Configure API key authorization: ApplicationSecret
|
|
250
|
+
config.api_key['X-Application-Secret'] = 'YOUR API KEY'
|
|
251
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
252
|
+
# config.api_key_prefix['X-Application-Secret'] = 'Bearer'
|
|
253
|
+
|
|
254
|
+
# Configure API key authorization: ApplicationPublicKey
|
|
255
|
+
config.api_key['X-Application-Key'] = 'YOUR API KEY'
|
|
256
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
257
|
+
# config.api_key_prefix['X-Application-Key'] = 'Bearer'
|
|
258
|
+
end
|
|
259
|
+
|
|
260
|
+
api_instance = Zyphr::AuthEmailOTPApi.new
|
|
261
|
+
verify_email_otp_login_request = Zyphr::VerifyEmailOtpLoginRequest.new({email: 'email_example', code: 'code_example'}) # VerifyEmailOtpLoginRequest |
|
|
262
|
+
|
|
263
|
+
begin
|
|
264
|
+
# Verify email OTP login
|
|
265
|
+
result = api_instance.verify_email_otp_login(verify_email_otp_login_request)
|
|
266
|
+
p result
|
|
267
|
+
rescue Zyphr::ApiError => e
|
|
268
|
+
puts "Error when calling AuthEmailOTPApi->verify_email_otp_login: #{e}"
|
|
269
|
+
end
|
|
270
|
+
```
|
|
271
|
+
|
|
272
|
+
#### Using the verify_email_otp_login_with_http_info variant
|
|
273
|
+
|
|
274
|
+
This returns an Array which contains the response data, status code and headers.
|
|
275
|
+
|
|
276
|
+
> <Array(<AuthLoginResponse>, Integer, Hash)> verify_email_otp_login_with_http_info(verify_email_otp_login_request)
|
|
277
|
+
|
|
278
|
+
```ruby
|
|
279
|
+
begin
|
|
280
|
+
# Verify email OTP login
|
|
281
|
+
data, status_code, headers = api_instance.verify_email_otp_login_with_http_info(verify_email_otp_login_request)
|
|
282
|
+
p status_code # => 2xx
|
|
283
|
+
p headers # => { ... }
|
|
284
|
+
p data # => <AuthLoginResponse>
|
|
285
|
+
rescue Zyphr::ApiError => e
|
|
286
|
+
puts "Error when calling AuthEmailOTPApi->verify_email_otp_login_with_http_info: #{e}"
|
|
287
|
+
end
|
|
288
|
+
```
|
|
289
|
+
|
|
290
|
+
### Parameters
|
|
291
|
+
|
|
292
|
+
| Name | Type | Description | Notes |
|
|
293
|
+
| ---- | ---- | ----------- | ----- |
|
|
294
|
+
| **verify_email_otp_login_request** | [**VerifyEmailOtpLoginRequest**](VerifyEmailOtpLoginRequest.md) | | |
|
|
295
|
+
|
|
296
|
+
### Return type
|
|
297
|
+
|
|
298
|
+
[**AuthLoginResponse**](AuthLoginResponse.md)
|
|
299
|
+
|
|
300
|
+
### Authorization
|
|
301
|
+
|
|
302
|
+
[ApplicationSecret](../README.md#ApplicationSecret), [ApplicationPublicKey](../README.md#ApplicationPublicKey)
|
|
303
|
+
|
|
304
|
+
### HTTP request headers
|
|
305
|
+
|
|
306
|
+
- **Content-Type**: application/json
|
|
307
|
+
- **Accept**: application/json
|
|
308
|
+
|
|
309
|
+
|
|
310
|
+
## verify_email_otp_registration
|
|
311
|
+
|
|
312
|
+
> <AuthResultResponse> verify_email_otp_registration(verify_email_otp_registration_request)
|
|
313
|
+
|
|
314
|
+
Verify email OTP registration
|
|
315
|
+
|
|
316
|
+
Verify the numeric code and create a new user account with the email address.
|
|
317
|
+
|
|
318
|
+
### Examples
|
|
319
|
+
|
|
320
|
+
```ruby
|
|
321
|
+
require 'time'
|
|
322
|
+
require 'zyphr'
|
|
323
|
+
# setup authorization
|
|
324
|
+
Zyphr.configure do |config|
|
|
325
|
+
# Configure API key authorization: ApplicationSecret
|
|
326
|
+
config.api_key['X-Application-Secret'] = 'YOUR API KEY'
|
|
327
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
328
|
+
# config.api_key_prefix['X-Application-Secret'] = 'Bearer'
|
|
329
|
+
|
|
330
|
+
# Configure API key authorization: ApplicationPublicKey
|
|
331
|
+
config.api_key['X-Application-Key'] = 'YOUR API KEY'
|
|
332
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
333
|
+
# config.api_key_prefix['X-Application-Key'] = 'Bearer'
|
|
334
|
+
end
|
|
335
|
+
|
|
336
|
+
api_instance = Zyphr::AuthEmailOTPApi.new
|
|
337
|
+
verify_email_otp_registration_request = Zyphr::VerifyEmailOtpRegistrationRequest.new({email: 'email_example', code: 'code_example'}) # VerifyEmailOtpRegistrationRequest |
|
|
338
|
+
|
|
339
|
+
begin
|
|
340
|
+
# Verify email OTP registration
|
|
341
|
+
result = api_instance.verify_email_otp_registration(verify_email_otp_registration_request)
|
|
342
|
+
p result
|
|
343
|
+
rescue Zyphr::ApiError => e
|
|
344
|
+
puts "Error when calling AuthEmailOTPApi->verify_email_otp_registration: #{e}"
|
|
345
|
+
end
|
|
346
|
+
```
|
|
347
|
+
|
|
348
|
+
#### Using the verify_email_otp_registration_with_http_info variant
|
|
349
|
+
|
|
350
|
+
This returns an Array which contains the response data, status code and headers.
|
|
351
|
+
|
|
352
|
+
> <Array(<AuthResultResponse>, Integer, Hash)> verify_email_otp_registration_with_http_info(verify_email_otp_registration_request)
|
|
353
|
+
|
|
354
|
+
```ruby
|
|
355
|
+
begin
|
|
356
|
+
# Verify email OTP registration
|
|
357
|
+
data, status_code, headers = api_instance.verify_email_otp_registration_with_http_info(verify_email_otp_registration_request)
|
|
358
|
+
p status_code # => 2xx
|
|
359
|
+
p headers # => { ... }
|
|
360
|
+
p data # => <AuthResultResponse>
|
|
361
|
+
rescue Zyphr::ApiError => e
|
|
362
|
+
puts "Error when calling AuthEmailOTPApi->verify_email_otp_registration_with_http_info: #{e}"
|
|
363
|
+
end
|
|
364
|
+
```
|
|
365
|
+
|
|
366
|
+
### Parameters
|
|
367
|
+
|
|
368
|
+
| Name | Type | Description | Notes |
|
|
369
|
+
| ---- | ---- | ----------- | ----- |
|
|
370
|
+
| **verify_email_otp_registration_request** | [**VerifyEmailOtpRegistrationRequest**](VerifyEmailOtpRegistrationRequest.md) | | |
|
|
371
|
+
|
|
372
|
+
### Return type
|
|
373
|
+
|
|
374
|
+
[**AuthResultResponse**](AuthResultResponse.md)
|
|
375
|
+
|
|
376
|
+
### Authorization
|
|
377
|
+
|
|
378
|
+
[ApplicationSecret](../README.md#ApplicationSecret), [ApplicationPublicKey](../README.md#ApplicationPublicKey)
|
|
379
|
+
|
|
380
|
+
### HTTP request headers
|
|
381
|
+
|
|
382
|
+
- **Content-Type**: application/json
|
|
383
|
+
- **Accept**: application/json
|
|
384
|
+
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Zyphr::CheckEmailOtpAvailability200Response
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **data** | [**CheckEmailOtpAvailability200ResponseData**](CheckEmailOtpAvailability200ResponseData.md) | | [optional] |
|
|
8
|
+
|
|
9
|
+
## Example
|
|
10
|
+
|
|
11
|
+
```ruby
|
|
12
|
+
require 'zyphr'
|
|
13
|
+
|
|
14
|
+
instance = Zyphr::CheckEmailOtpAvailability200Response.new(
|
|
15
|
+
data: null
|
|
16
|
+
)
|
|
17
|
+
```
|
|
18
|
+
|
data/docs/{PhoneAuthAvailabilityResponseData.md → CheckEmailOtpAvailability200ResponseData.md}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Zyphr::
|
|
1
|
+
# Zyphr::CheckEmailOtpAvailability200ResponseData
|
|
2
2
|
|
|
3
3
|
## Properties
|
|
4
4
|
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
```ruby
|
|
13
13
|
require 'zyphr'
|
|
14
14
|
|
|
15
|
-
instance = Zyphr::
|
|
15
|
+
instance = Zyphr::CheckEmailOtpAvailability200ResponseData.new(
|
|
16
16
|
available: null,
|
|
17
17
|
message: null
|
|
18
18
|
)
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
| Name | Type | Description | Notes |
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
|
7
|
-
| **data** | [**
|
|
7
|
+
| **data** | [**CheckEmailOtpAvailability200ResponseData**](CheckEmailOtpAvailability200ResponseData.md) | | [optional] |
|
|
8
8
|
| **meta** | [**RequestMeta**](RequestMeta.md) | | [optional] |
|
|
9
9
|
|
|
10
10
|
## Example
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Zyphr::SendEmailOtpRegistrationRequest
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **email** | **String** | | |
|
|
8
|
+
|
|
9
|
+
## Example
|
|
10
|
+
|
|
11
|
+
```ruby
|
|
12
|
+
require 'zyphr'
|
|
13
|
+
|
|
14
|
+
instance = Zyphr::SendEmailOtpRegistrationRequest.new(
|
|
15
|
+
email: null
|
|
16
|
+
)
|
|
17
|
+
```
|
|
18
|
+
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# Zyphr::VerifyEmailOtpLoginRequest
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **email** | **String** | | |
|
|
8
|
+
| **code** | **String** | | |
|
|
9
|
+
| **custom_claims** | **Object** | | [optional] |
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```ruby
|
|
14
|
+
require 'zyphr'
|
|
15
|
+
|
|
16
|
+
instance = Zyphr::VerifyEmailOtpLoginRequest.new(
|
|
17
|
+
email: null,
|
|
18
|
+
code: null,
|
|
19
|
+
custom_claims: null
|
|
20
|
+
)
|
|
21
|
+
```
|
|
22
|
+
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Zyphr::VerifyEmailOtpRegistrationRequest
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **email** | **String** | | |
|
|
8
|
+
| **code** | **String** | | |
|
|
9
|
+
| **name** | **String** | | [optional] |
|
|
10
|
+
| **metadata** | **Object** | | [optional] |
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```ruby
|
|
15
|
+
require 'zyphr'
|
|
16
|
+
|
|
17
|
+
instance = Zyphr::VerifyEmailOtpRegistrationRequest.new(
|
|
18
|
+
email: null,
|
|
19
|
+
code: null,
|
|
20
|
+
name: null,
|
|
21
|
+
metadata: null
|
|
22
|
+
)
|
|
23
|
+
```
|
|
24
|
+
|