zyphr 0.1.48 → 0.1.50
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 +5 -1
- data/docs/ApplicationSelf.md +4 -2
- data/docs/AuthApplicationApi.md +1 -1
- data/docs/PasswordPolicy.md +30 -0
- data/docs/PasswordRequirementsResponseData.md +3 -1
- data/docs/PasswordStrength.md +24 -0
- data/docs/PasswordStrengthRequest.md +20 -0
- data/docs/PasswordStrengthResponse.md +20 -0
- data/docs/SetSelfApplicationTestRecipientsRequest.md +4 -2
- data/docs/UtilityApi.md +73 -1
- data/lib/zyphr/api/utility_api.rb +70 -2
- data/lib/zyphr/models/application_self.rb +34 -5
- data/lib/zyphr/models/password_policy.rb +401 -0
- data/lib/zyphr/models/password_requirements_response_data.rb +49 -3
- data/lib/zyphr/models/password_strength.rb +363 -0
- data/lib/zyphr/models/{password_requirements.rb → password_strength_request.rb} +36 -52
- data/lib/zyphr/models/password_strength_response.rb +229 -0
- data/lib/zyphr/models/set_self_application_test_recipients_request.rb +47 -19
- data/lib/zyphr.rb +4 -1
- data/spec/api/utility_api_spec.rb +13 -1
- data/spec/models/application_self_spec.rb +10 -0
- data/spec/models/{password_requirements_spec.rb → password_policy_spec.rb} +12 -6
- data/spec/models/password_requirements_response_data_spec.rb +6 -0
- data/spec/models/password_strength_request_spec.rb +42 -0
- data/spec/models/password_strength_response_spec.rb +42 -0
- data/spec/models/password_strength_spec.rb +58 -0
- data/spec/models/set_self_application_test_recipients_request_spec.rb +10 -0
- data/zyphr.gemspec +1 -1
- metadata +18 -6
- data/docs/PasswordRequirements.md +0 -28
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a4fd52fa232b4a334d6ea406412fa92ee9d076583b6038b8e9d0231b5c77c016
|
|
4
|
+
data.tar.gz: 2f2e95c64d51dc3f4c48309a580d7e21960fc5a3665359b5986431e1f833c6b5
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 48bdb019fd49d35023234cc46edb30ed3aa0716a267aefa6fbfb8c3147be8e3cde1bf60bd01f0c12e1e443111fd5bb58f49a853d2c09e1c28b91040103c1f0fe
|
|
7
|
+
data.tar.gz: fc7da20a4d8529d1a12e120bf0ffcf30588f26cc4abbfe8c0ea386c21d3435eac9aca82229a96f416d8d5826542881ec71c62f47c453b75179bdd9fd9f94e734
|
data/README.md
CHANGED
|
@@ -326,6 +326,7 @@ Class | Method | HTTP request | Description
|
|
|
326
326
|
*Zyphr::TopicsApi* | [**list_topics**](docs/TopicsApi.md#list_topics) | **GET** /topics | List topics
|
|
327
327
|
*Zyphr::TopicsApi* | [**remove_topic_subscribers**](docs/TopicsApi.md#remove_topic_subscribers) | **DELETE** /topics/{key}/subscribers | Remove subscribers from a topic
|
|
328
328
|
*Zyphr::TopicsApi* | [**update_topic**](docs/TopicsApi.md#update_topic) | **PATCH** /topics/{key} | Update a topic
|
|
329
|
+
*Zyphr::UtilityApi* | [**check_password_strength**](docs/UtilityApi.md#check_password_strength) | **POST** /auth/password-strength | Check password strength
|
|
329
330
|
*Zyphr::UtilityApi* | [**get_password_requirements**](docs/UtilityApi.md#get_password_requirements) | **GET** /auth/password-requirements | Get password requirements
|
|
330
331
|
*Zyphr::WaaSApplicationsApi* | [**create_waa_s_application**](docs/WaaSApplicationsApi.md#create_waa_s_application) | **POST** /v1/waas/applications | Create a WaaS application
|
|
331
332
|
*Zyphr::WaaSApplicationsApi* | [**delete_waa_s_application**](docs/WaaSApplicationsApi.md#delete_waa_s_application) | **DELETE** /v1/waas/applications/{appId} | Delete a WaaS application
|
|
@@ -623,9 +624,12 @@ Class | Method | HTTP request | Description
|
|
|
623
624
|
- [Zyphr::OrganizationMembershipWithUser](docs/OrganizationMembershipWithUser.md)
|
|
624
625
|
- [Zyphr::OrganizationResponse](docs/OrganizationResponse.md)
|
|
625
626
|
- [Zyphr::PaginationMeta](docs/PaginationMeta.md)
|
|
626
|
-
- [Zyphr::
|
|
627
|
+
- [Zyphr::PasswordPolicy](docs/PasswordPolicy.md)
|
|
627
628
|
- [Zyphr::PasswordRequirementsResponse](docs/PasswordRequirementsResponse.md)
|
|
628
629
|
- [Zyphr::PasswordRequirementsResponseData](docs/PasswordRequirementsResponseData.md)
|
|
630
|
+
- [Zyphr::PasswordStrength](docs/PasswordStrength.md)
|
|
631
|
+
- [Zyphr::PasswordStrengthRequest](docs/PasswordStrengthRequest.md)
|
|
632
|
+
- [Zyphr::PasswordStrengthResponse](docs/PasswordStrengthResponse.md)
|
|
629
633
|
- [Zyphr::PayloadTooLargeError](docs/PayloadTooLargeError.md)
|
|
630
634
|
- [Zyphr::PayloadTooLargeErrorError](docs/PayloadTooLargeErrorError.md)
|
|
631
635
|
- [Zyphr::PayloadTooLargeErrorErrorDetails](docs/PayloadTooLargeErrorErrorDetails.md)
|
data/docs/ApplicationSelf.md
CHANGED
|
@@ -8,7 +8,8 @@
|
|
|
8
8
|
| **name** | **String** | Human-readable application name. | |
|
|
9
9
|
| **environment** | **String** | The environment mode of the credentials used to authenticate this request. `null` when the environment cannot be determined (e.g. a legacy application-level key that predates environment-scoped keys) — not defaulted to a guessed value. | |
|
|
10
10
|
| **signing_algorithm** | **String** | JWT signing algorithm for this application's end-user tokens. | |
|
|
11
|
-
| **test_recipients** | **Array<String>** | The auth-email
|
|
11
|
+
| **test_recipients** | **Array<String>** | The auth-email allowlist. In `allowlist` mode, only these addresses receive auth emails; in `unrestricted` mode it is ignored. Settable via PATCH /auth/application (sc-7600). | |
|
|
12
|
+
| **auth_email_mode** | **String** | Explicit auth-email gate mode (sc-7673). `unrestricted` sends auth emails to everyone. `allowlist` restricts auth email to `test_recipients` — and an EMPTY allowlist in this mode fails CLOSED (blocks all auth email). This replaces the previous behavior where the gate was inferred from whether `test_recipients` was empty. Defaults to `unrestricted`. | |
|
|
12
13
|
|
|
13
14
|
## Example
|
|
14
15
|
|
|
@@ -20,7 +21,8 @@ instance = Zyphr::ApplicationSelf.new(
|
|
|
20
21
|
name: null,
|
|
21
22
|
environment: null,
|
|
22
23
|
signing_algorithm: null,
|
|
23
|
-
test_recipients: null
|
|
24
|
+
test_recipients: null,
|
|
25
|
+
auth_email_mode: null
|
|
24
26
|
)
|
|
25
27
|
```
|
|
26
28
|
|
data/docs/AuthApplicationApi.md
CHANGED
|
@@ -108,7 +108,7 @@ Zyphr.configure do |config|
|
|
|
108
108
|
end
|
|
109
109
|
|
|
110
110
|
api_instance = Zyphr::AuthApplicationApi.new
|
|
111
|
-
set_self_application_test_recipients_request = Zyphr::SetSelfApplicationTestRecipientsRequest.new
|
|
111
|
+
set_self_application_test_recipients_request = Zyphr::SetSelfApplicationTestRecipientsRequest.new # SetSelfApplicationTestRecipientsRequest |
|
|
112
112
|
|
|
113
113
|
begin
|
|
114
114
|
# Set the authenticating application's auth-email test allowlist
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Zyphr::PasswordPolicy
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **min_length** | **Integer** | Minimum password length. | |
|
|
8
|
+
| **max_length** | **Integer** | Maximum password length. | |
|
|
9
|
+
| **require_uppercase** | **Boolean** | Whether at least one uppercase letter (A-Z) is required. | |
|
|
10
|
+
| **require_lowercase** | **Boolean** | Whether at least one lowercase letter (a-z) is required. | |
|
|
11
|
+
| **require_numbers** | **Boolean** | Whether at least one number (0-9) is required. | |
|
|
12
|
+
| **require_special** | **Boolean** | Whether at least one special character is required. | |
|
|
13
|
+
| **disallow_common** | **Boolean** | Whether commonly used passwords are rejected. | |
|
|
14
|
+
|
|
15
|
+
## Example
|
|
16
|
+
|
|
17
|
+
```ruby
|
|
18
|
+
require 'zyphr'
|
|
19
|
+
|
|
20
|
+
instance = Zyphr::PasswordPolicy.new(
|
|
21
|
+
min_length: null,
|
|
22
|
+
max_length: null,
|
|
23
|
+
require_uppercase: null,
|
|
24
|
+
require_lowercase: null,
|
|
25
|
+
require_numbers: null,
|
|
26
|
+
require_special: null,
|
|
27
|
+
disallow_common: null
|
|
28
|
+
)
|
|
29
|
+
```
|
|
30
|
+
|
|
@@ -4,7 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
| Name | Type | Description | Notes |
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
|
7
|
-
| **
|
|
7
|
+
| **policy** | [**PasswordPolicy**](PasswordPolicy.md) | | |
|
|
8
|
+
| **requirements** | **Array<String>** | Human-readable display strings for the active password rules (e.g. \"At least 8 characters\"). Backward-compatible with the original response shape. | |
|
|
8
9
|
|
|
9
10
|
## Example
|
|
10
11
|
|
|
@@ -12,6 +13,7 @@
|
|
|
12
13
|
require 'zyphr'
|
|
13
14
|
|
|
14
15
|
instance = Zyphr::PasswordRequirementsResponseData.new(
|
|
16
|
+
policy: null,
|
|
15
17
|
requirements: null
|
|
16
18
|
)
|
|
17
19
|
```
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Zyphr::PasswordStrength
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **valid** | **Boolean** | Whether the password would be accepted by the server's enforcement path. A password that is valid here is accepted by registration. | |
|
|
8
|
+
| **score** | **Integer** | Strength score, 0-100. | |
|
|
9
|
+
| **label** | **String** | Strength label derived from the score. | |
|
|
10
|
+
| **feedback** | **Array<String>** | Actionable feedback — policy errors plus strength-improvement suggestions. | |
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```ruby
|
|
15
|
+
require 'zyphr'
|
|
16
|
+
|
|
17
|
+
instance = Zyphr::PasswordStrength.new(
|
|
18
|
+
valid: null,
|
|
19
|
+
score: null,
|
|
20
|
+
label: null,
|
|
21
|
+
feedback: null
|
|
22
|
+
)
|
|
23
|
+
```
|
|
24
|
+
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Zyphr::PasswordStrengthRequest
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **password** | **String** | The password to evaluate. | |
|
|
8
|
+
| **email** | **String** | Optional. When provided, the password is checked for similarity to the email's local-part; a match is flagged and marks the password invalid. | [optional] |
|
|
9
|
+
|
|
10
|
+
## Example
|
|
11
|
+
|
|
12
|
+
```ruby
|
|
13
|
+
require 'zyphr'
|
|
14
|
+
|
|
15
|
+
instance = Zyphr::PasswordStrengthRequest.new(
|
|
16
|
+
password: null,
|
|
17
|
+
email: null
|
|
18
|
+
)
|
|
19
|
+
```
|
|
20
|
+
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Zyphr::PasswordStrengthResponse
|
|
2
|
+
|
|
3
|
+
## Properties
|
|
4
|
+
|
|
5
|
+
| Name | Type | Description | Notes |
|
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
|
7
|
+
| **data** | [**PasswordStrength**](PasswordStrength.md) | | [optional] |
|
|
8
|
+
| **meta** | [**RequestMeta**](RequestMeta.md) | | [optional] |
|
|
9
|
+
|
|
10
|
+
## Example
|
|
11
|
+
|
|
12
|
+
```ruby
|
|
13
|
+
require 'zyphr'
|
|
14
|
+
|
|
15
|
+
instance = Zyphr::PasswordStrengthResponse.new(
|
|
16
|
+
data: null,
|
|
17
|
+
meta: null
|
|
18
|
+
)
|
|
19
|
+
```
|
|
20
|
+
|
|
@@ -4,7 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
| Name | Type | Description | Notes |
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
|
7
|
-
| **test_recipients** | **Array<String>** | Email addresses allowed to receive auth emails.
|
|
7
|
+
| **test_recipients** | **Array<String>** | Email addresses allowed to receive auth emails when auth_email_mode is 'allowlist'. Ignored in 'unrestricted' mode. Optional — omit to leave the current list unchanged. | [optional] |
|
|
8
|
+
| **auth_email_mode** | **String** | Optional (sc-7673). Explicit auth-email gate mode. 'unrestricted' sends to everyone; 'allowlist' restricts to test_recipients (an EMPTY list in allowlist mode fails closed — blocks all auth email). Omit to leave the current mode unchanged. | [optional] |
|
|
8
9
|
|
|
9
10
|
## Example
|
|
10
11
|
|
|
@@ -12,7 +13,8 @@
|
|
|
12
13
|
require 'zyphr'
|
|
13
14
|
|
|
14
15
|
instance = Zyphr::SetSelfApplicationTestRecipientsRequest.new(
|
|
15
|
-
test_recipients: null
|
|
16
|
+
test_recipients: null,
|
|
17
|
+
auth_email_mode: null
|
|
16
18
|
)
|
|
17
19
|
```
|
|
18
20
|
|
data/docs/UtilityApi.md
CHANGED
|
@@ -4,16 +4,88 @@ All URIs are relative to *https://api.zyphr.dev/v1*
|
|
|
4
4
|
|
|
5
5
|
| Method | HTTP request | Description |
|
|
6
6
|
| ------ | ------------ | ----------- |
|
|
7
|
+
| [**check_password_strength**](UtilityApi.md#check_password_strength) | **POST** /auth/password-strength | Check password strength |
|
|
7
8
|
| [**get_password_requirements**](UtilityApi.md#get_password_requirements) | **GET** /auth/password-requirements | Get password requirements |
|
|
8
9
|
|
|
9
10
|
|
|
11
|
+
## check_password_strength
|
|
12
|
+
|
|
13
|
+
> <PasswordStrengthResponse> check_password_strength(password_strength_request)
|
|
14
|
+
|
|
15
|
+
Check password strength
|
|
16
|
+
|
|
17
|
+
Pre-submit password check for a live registration/reset experience. Returns whether the password would be accepted by the server (`valid`), a strength `score` (0-100) and `label`, and actionable `feedback`. When an `email` is supplied, a password that resembles the email's local-part is flagged and marked invalid. The password is never logged or persisted.
|
|
18
|
+
|
|
19
|
+
### Examples
|
|
20
|
+
|
|
21
|
+
```ruby
|
|
22
|
+
require 'time'
|
|
23
|
+
require 'zyphr'
|
|
24
|
+
# setup authorization
|
|
25
|
+
Zyphr.configure do |config|
|
|
26
|
+
# Configure API key authorization: ApplicationPublicKey
|
|
27
|
+
config.api_key['X-Application-Key'] = 'YOUR API KEY'
|
|
28
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
|
29
|
+
# config.api_key_prefix['X-Application-Key'] = 'Bearer'
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
api_instance = Zyphr::UtilityApi.new
|
|
33
|
+
password_strength_request = Zyphr::PasswordStrengthRequest.new({password: 'password_example'}) # PasswordStrengthRequest |
|
|
34
|
+
|
|
35
|
+
begin
|
|
36
|
+
# Check password strength
|
|
37
|
+
result = api_instance.check_password_strength(password_strength_request)
|
|
38
|
+
p result
|
|
39
|
+
rescue Zyphr::ApiError => e
|
|
40
|
+
puts "Error when calling UtilityApi->check_password_strength: #{e}"
|
|
41
|
+
end
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
#### Using the check_password_strength_with_http_info variant
|
|
45
|
+
|
|
46
|
+
This returns an Array which contains the response data, status code and headers.
|
|
47
|
+
|
|
48
|
+
> <Array(<PasswordStrengthResponse>, Integer, Hash)> check_password_strength_with_http_info(password_strength_request)
|
|
49
|
+
|
|
50
|
+
```ruby
|
|
51
|
+
begin
|
|
52
|
+
# Check password strength
|
|
53
|
+
data, status_code, headers = api_instance.check_password_strength_with_http_info(password_strength_request)
|
|
54
|
+
p status_code # => 2xx
|
|
55
|
+
p headers # => { ... }
|
|
56
|
+
p data # => <PasswordStrengthResponse>
|
|
57
|
+
rescue Zyphr::ApiError => e
|
|
58
|
+
puts "Error when calling UtilityApi->check_password_strength_with_http_info: #{e}"
|
|
59
|
+
end
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
### Parameters
|
|
63
|
+
|
|
64
|
+
| Name | Type | Description | Notes |
|
|
65
|
+
| ---- | ---- | ----------- | ----- |
|
|
66
|
+
| **password_strength_request** | [**PasswordStrengthRequest**](PasswordStrengthRequest.md) | | |
|
|
67
|
+
|
|
68
|
+
### Return type
|
|
69
|
+
|
|
70
|
+
[**PasswordStrengthResponse**](PasswordStrengthResponse.md)
|
|
71
|
+
|
|
72
|
+
### Authorization
|
|
73
|
+
|
|
74
|
+
[ApplicationPublicKey](../README.md#ApplicationPublicKey)
|
|
75
|
+
|
|
76
|
+
### HTTP request headers
|
|
77
|
+
|
|
78
|
+
- **Content-Type**: application/json
|
|
79
|
+
- **Accept**: application/json
|
|
80
|
+
|
|
81
|
+
|
|
10
82
|
## get_password_requirements
|
|
11
83
|
|
|
12
84
|
> <PasswordRequirementsResponse> get_password_requirements
|
|
13
85
|
|
|
14
86
|
Get password requirements
|
|
15
87
|
|
|
16
|
-
Get password requirements for the application. Useful for client-side validation before registration.
|
|
88
|
+
Get password requirements for the application. Returns both a structured `policy` object (for driving a live requirements checklist) and human-readable `requirements` display strings. Useful for client-side validation before registration.
|
|
17
89
|
|
|
18
90
|
### Examples
|
|
19
91
|
|
|
@@ -19,8 +19,76 @@ module Zyphr
|
|
|
19
19
|
def initialize(api_client = ApiClient.default)
|
|
20
20
|
@api_client = api_client
|
|
21
21
|
end
|
|
22
|
+
# Check password strength
|
|
23
|
+
# Pre-submit password check for a live registration/reset experience. Returns whether the password would be accepted by the server (`valid`), a strength `score` (0-100) and `label`, and actionable `feedback`. When an `email` is supplied, a password that resembles the email's local-part is flagged and marked invalid. The password is never logged or persisted.
|
|
24
|
+
# @param password_strength_request [PasswordStrengthRequest]
|
|
25
|
+
# @param [Hash] opts the optional parameters
|
|
26
|
+
# @return [PasswordStrengthResponse]
|
|
27
|
+
def check_password_strength(password_strength_request, opts = {})
|
|
28
|
+
data, _status_code, _headers = check_password_strength_with_http_info(password_strength_request, opts)
|
|
29
|
+
data
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# Check password strength
|
|
33
|
+
# Pre-submit password check for a live registration/reset experience. Returns whether the password would be accepted by the server (`valid`), a strength `score` (0-100) and `label`, and actionable `feedback`. When an `email` is supplied, a password that resembles the email's local-part is flagged and marked invalid. The password is never logged or persisted.
|
|
34
|
+
# @param password_strength_request [PasswordStrengthRequest]
|
|
35
|
+
# @param [Hash] opts the optional parameters
|
|
36
|
+
# @return [Array<(PasswordStrengthResponse, Integer, Hash)>] PasswordStrengthResponse data, response status code and response headers
|
|
37
|
+
def check_password_strength_with_http_info(password_strength_request, opts = {})
|
|
38
|
+
if @api_client.config.debugging
|
|
39
|
+
@api_client.config.logger.debug 'Calling API: UtilityApi.check_password_strength ...'
|
|
40
|
+
end
|
|
41
|
+
# verify the required parameter 'password_strength_request' is set
|
|
42
|
+
if @api_client.config.client_side_validation && password_strength_request.nil?
|
|
43
|
+
fail ArgumentError, "Missing the required parameter 'password_strength_request' when calling UtilityApi.check_password_strength"
|
|
44
|
+
end
|
|
45
|
+
# resource path
|
|
46
|
+
local_var_path = '/auth/password-strength'
|
|
47
|
+
|
|
48
|
+
# query parameters
|
|
49
|
+
query_params = opts[:query_params] || {}
|
|
50
|
+
|
|
51
|
+
# header parameters
|
|
52
|
+
header_params = opts[:header_params] || {}
|
|
53
|
+
# HTTP header 'Accept' (if needed)
|
|
54
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
55
|
+
# HTTP header 'Content-Type'
|
|
56
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
57
|
+
if !content_type.nil?
|
|
58
|
+
header_params['Content-Type'] = content_type
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
# form parameters
|
|
62
|
+
form_params = opts[:form_params] || {}
|
|
63
|
+
|
|
64
|
+
# http body (model)
|
|
65
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(password_strength_request)
|
|
66
|
+
|
|
67
|
+
# return_type
|
|
68
|
+
return_type = opts[:debug_return_type] || 'PasswordStrengthResponse'
|
|
69
|
+
|
|
70
|
+
# auth_names
|
|
71
|
+
auth_names = opts[:debug_auth_names] || ['ApplicationPublicKey']
|
|
72
|
+
|
|
73
|
+
new_options = opts.merge(
|
|
74
|
+
:operation => :"UtilityApi.check_password_strength",
|
|
75
|
+
:header_params => header_params,
|
|
76
|
+
:query_params => query_params,
|
|
77
|
+
:form_params => form_params,
|
|
78
|
+
:body => post_body,
|
|
79
|
+
:auth_names => auth_names,
|
|
80
|
+
:return_type => return_type
|
|
81
|
+
)
|
|
82
|
+
|
|
83
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
84
|
+
if @api_client.config.debugging
|
|
85
|
+
@api_client.config.logger.debug "API called: UtilityApi#check_password_strength\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
86
|
+
end
|
|
87
|
+
return data, status_code, headers
|
|
88
|
+
end
|
|
89
|
+
|
|
22
90
|
# Get password requirements
|
|
23
|
-
# Get password requirements for the application. Useful for client-side validation before registration.
|
|
91
|
+
# Get password requirements for the application. Returns both a structured `policy` object (for driving a live requirements checklist) and human-readable `requirements` display strings. Useful for client-side validation before registration.
|
|
24
92
|
# @param [Hash] opts the optional parameters
|
|
25
93
|
# @return [PasswordRequirementsResponse]
|
|
26
94
|
def get_password_requirements(opts = {})
|
|
@@ -29,7 +97,7 @@ module Zyphr
|
|
|
29
97
|
end
|
|
30
98
|
|
|
31
99
|
# Get password requirements
|
|
32
|
-
# Get password requirements for the application. Useful for client-side validation before registration.
|
|
100
|
+
# Get password requirements for the application. Returns both a structured `policy` object (for driving a live requirements checklist) and human-readable `requirements` display strings. Useful for client-side validation before registration.
|
|
33
101
|
# @param [Hash] opts the optional parameters
|
|
34
102
|
# @return [Array<(PasswordRequirementsResponse, Integer, Hash)>] PasswordRequirementsResponse data, response status code and response headers
|
|
35
103
|
def get_password_requirements_with_http_info(opts = {})
|
|
@@ -28,9 +28,12 @@ module Zyphr
|
|
|
28
28
|
# JWT signing algorithm for this application's end-user tokens.
|
|
29
29
|
attr_accessor :signing_algorithm
|
|
30
30
|
|
|
31
|
-
# The auth-email
|
|
31
|
+
# The auth-email allowlist. In `allowlist` mode, only these addresses receive auth emails; in `unrestricted` mode it is ignored. Settable via PATCH /auth/application (sc-7600).
|
|
32
32
|
attr_accessor :test_recipients
|
|
33
33
|
|
|
34
|
+
# Explicit auth-email gate mode (sc-7673). `unrestricted` sends auth emails to everyone. `allowlist` restricts auth email to `test_recipients` — and an EMPTY allowlist in this mode fails CLOSED (blocks all auth email). This replaces the previous behavior where the gate was inferred from whether `test_recipients` was empty. Defaults to `unrestricted`.
|
|
35
|
+
attr_accessor :auth_email_mode
|
|
36
|
+
|
|
34
37
|
class EnumAttributeValidator
|
|
35
38
|
attr_reader :datatype
|
|
36
39
|
attr_reader :allowable_values
|
|
@@ -60,7 +63,8 @@ module Zyphr
|
|
|
60
63
|
:'name' => :'name',
|
|
61
64
|
:'environment' => :'environment',
|
|
62
65
|
:'signing_algorithm' => :'signing_algorithm',
|
|
63
|
-
:'test_recipients' => :'test_recipients'
|
|
66
|
+
:'test_recipients' => :'test_recipients',
|
|
67
|
+
:'auth_email_mode' => :'auth_email_mode'
|
|
64
68
|
}
|
|
65
69
|
end
|
|
66
70
|
|
|
@@ -81,7 +85,8 @@ module Zyphr
|
|
|
81
85
|
:'name' => :'String',
|
|
82
86
|
:'environment' => :'String',
|
|
83
87
|
:'signing_algorithm' => :'String',
|
|
84
|
-
:'test_recipients' => :'Array<String>'
|
|
88
|
+
:'test_recipients' => :'Array<String>',
|
|
89
|
+
:'auth_email_mode' => :'String'
|
|
85
90
|
}
|
|
86
91
|
end
|
|
87
92
|
|
|
@@ -139,6 +144,12 @@ module Zyphr
|
|
|
139
144
|
else
|
|
140
145
|
self.test_recipients = nil
|
|
141
146
|
end
|
|
147
|
+
|
|
148
|
+
if attributes.key?(:'auth_email_mode')
|
|
149
|
+
self.auth_email_mode = attributes[:'auth_email_mode']
|
|
150
|
+
else
|
|
151
|
+
self.auth_email_mode = nil
|
|
152
|
+
end
|
|
142
153
|
end
|
|
143
154
|
|
|
144
155
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -162,6 +173,10 @@ module Zyphr
|
|
|
162
173
|
invalid_properties.push('invalid value for "test_recipients", test_recipients cannot be nil.')
|
|
163
174
|
end
|
|
164
175
|
|
|
176
|
+
if @auth_email_mode.nil?
|
|
177
|
+
invalid_properties.push('invalid value for "auth_email_mode", auth_email_mode cannot be nil.')
|
|
178
|
+
end
|
|
179
|
+
|
|
165
180
|
invalid_properties
|
|
166
181
|
end
|
|
167
182
|
|
|
@@ -177,6 +192,9 @@ module Zyphr
|
|
|
177
192
|
signing_algorithm_validator = EnumAttributeValidator.new('String', ["HS256", "RS256", "ES256"])
|
|
178
193
|
return false unless signing_algorithm_validator.valid?(@signing_algorithm)
|
|
179
194
|
return false if @test_recipients.nil?
|
|
195
|
+
return false if @auth_email_mode.nil?
|
|
196
|
+
auth_email_mode_validator = EnumAttributeValidator.new('String', ["allowlist", "unrestricted"])
|
|
197
|
+
return false unless auth_email_mode_validator.valid?(@auth_email_mode)
|
|
180
198
|
true
|
|
181
199
|
end
|
|
182
200
|
|
|
@@ -230,6 +248,16 @@ module Zyphr
|
|
|
230
248
|
@test_recipients = test_recipients
|
|
231
249
|
end
|
|
232
250
|
|
|
251
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
252
|
+
# @param [Object] auth_email_mode Object to be assigned
|
|
253
|
+
def auth_email_mode=(auth_email_mode)
|
|
254
|
+
validator = EnumAttributeValidator.new('String', ["allowlist", "unrestricted"])
|
|
255
|
+
unless validator.valid?(auth_email_mode)
|
|
256
|
+
fail ArgumentError, "invalid value for \"auth_email_mode\", must be one of #{validator.allowable_values}."
|
|
257
|
+
end
|
|
258
|
+
@auth_email_mode = auth_email_mode
|
|
259
|
+
end
|
|
260
|
+
|
|
233
261
|
# Checks equality by comparing each attribute.
|
|
234
262
|
# @param [Object] Object to be compared
|
|
235
263
|
def ==(o)
|
|
@@ -239,7 +267,8 @@ module Zyphr
|
|
|
239
267
|
name == o.name &&
|
|
240
268
|
environment == o.environment &&
|
|
241
269
|
signing_algorithm == o.signing_algorithm &&
|
|
242
|
-
test_recipients == o.test_recipients
|
|
270
|
+
test_recipients == o.test_recipients &&
|
|
271
|
+
auth_email_mode == o.auth_email_mode
|
|
243
272
|
end
|
|
244
273
|
|
|
245
274
|
# @see the `==` method
|
|
@@ -251,7 +280,7 @@ module Zyphr
|
|
|
251
280
|
# Calculates hash code according to all attributes.
|
|
252
281
|
# @return [Integer] Hash code
|
|
253
282
|
def hash
|
|
254
|
-
[id, name, environment, signing_algorithm, test_recipients].hash
|
|
283
|
+
[id, name, environment, signing_algorithm, test_recipients, auth_email_mode].hash
|
|
255
284
|
end
|
|
256
285
|
|
|
257
286
|
# Builds the object from hash
|