Awkward passwords for a sign-up form's password field
const url = 'https://api.proxymail.qa/v1/variants/passwords?min_length=8&max_length=64&symbols=true';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://api.proxymail.qa/v1/variants/passwords?min_length=8&max_length=64&symbols=true' \ --header 'Authorization: Bearer <token>'Values for testing what a form does with a password, within its rules: accept (exactly the minimum and the maximum, each symbol class including quotes, a backslash and a space, non-ASCII letters), reject (one under the minimum, one over the maximum, a symbol where none are allowed) and decide (only digits, only lower case, a space at the start or end, an emoji, composed and decomposed accents, and when the maximum is over 72 a pair sharing their first 72 bytes, which bcrypt stops at: apps differ, so note what the app did). Each call makes fresh values. See https://proxymail.qa/docs/unusual-names-and-passwords.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”The field’s minimum length.
The field’s maximum length.
Whether the field allows symbols.
Responses
Section titled “Responses”The variants
object
object
What the value checks, e.g. “A hyphen”.
What to type into the field, exactly.
object
What the value checks, e.g. “A hyphen”.
What to type into the field, exactly.
object
What the value checks, e.g. “A hyphen”.
What to type into the field, exactly.
Example generated
{ "min_length": 1, "max_length": 1, "symbols": true, "accept": [ { "tests": "example", "value": "example" } ], "reject": [ { "tests": "example", "value": "example" } ], "decide": [ { "tests": "example", "value": "example" } ]}An error
object
Example generated
{ "error": "example", "message": "example"}