Register an email address with a URL that serves a plaintext Argon2 password hash, then test login against the current remote hash.
-----BEGIN PUBLIC KEY----- MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA0Q1fEt/4vqkkW8r3dCcO HUASWT3sItDPv3hcDN1J1xK1hjOa2F5TSF1S7heVqMQE6Dlo1Ou0c52NYc7bEQOU qxxz9fsCdq3yljzl6YERq+Y5jM/lbBpN/235l7wN467ji03EjKQ2Q4UqPishFzsb +nT1aBjHQKe39OCTzPljhNIo5uBoCT/PPbHNJt0Dl4abXa8SflzdVQZIJNHZ4Tc3 Ggo7V4hbrHjvpzSjHdO+wDgdCoom3Q++nqvPkM964WMREVwLrSrMr+fyXVKy60Ci 1S7QWhKur1qxgGUdKIvqVVUc+VFoxDczEM3VLst+32IPTkqn41E7xOmk/P5zGy8y qQIDAQAB -----END PUBLIC KEY-----
The API accepts either HTML form posts or JSON requests. For API use, send Accept: application/json. For JSON bodies, also send Content-Type: application/json.
| Setting | Details |
|---|---|
| JWT_ISSUER | Required. Used for the JWT iss claim. |
| Field | Required | Description |
|---|---|---|
| yes | Email address to register. Must be unique. | |
| password_hash_url | yes | URL that returns a plaintext Argon2 password hash. |
| password | yes | Plaintext password used to prove the remote hash belongs to the registrant. |
Example JSON request:
{
"email": "user@example.com",
"password_hash_url": "https://example.com/hash.txt",
"password": "correct horse battery staple"
}
Successful JSON response:
{
"email": "user@example.com",
"password_hash_url": "https://example.com/hash.txt"
}
Error JSON response:
{
"error": "Password does not match the remote Argon2 hash."
}
| Field | Required | Description |
|---|---|---|
| yes | Registered email address. | |
| password | yes | Plaintext password to verify against the current remote Argon2 hash. |
Example JSON request:
{
"email": "user@example.com",
"password": "correct horse battery staple"
}
Successful JSON response:
{
"token": "JWT_TOKEN_HERE",
"token_type": "Bearer",
"email": "user@example.com"
}
Decoded JWT payload fields:
| Claim | Description |
|---|---|
| sub | User email. |
| User email. | |
| iss | Value of JWT_ISSUER. |
| iat | Issued-at timestamp. |
| exp | Expiry timestamp, one hour after issue. |
Error JSON response:
{
"error": "Invalid email or password."
}