Axuz Developers

POST /auth/reauth

Body {method, password?, code?}; o método tem de ser um fator que a conta TEM; 10 falhas/15 min por usuário ⇒ 429; sucesso ⇒ grantReauth.

  • Access: Signed in (incl. pre-session)
  • Service: https://auth-api.axuz.net

Accepted authentication

  • sessionCookie — Sessão plena Axuz (cookie de sessão da casa). Sessão restrita é 403 enrollment_required.
  • bearerSession — JWT de acesso da sessão em `Authorization: Bearer`.

Body {method, password?, code?}; o método tem de ser um fator que a conta TEM; 10 falhas/15 min por usuário ⇒ 429; sucesso ⇒ grantReauth. (Passkey usa /reauth/webauthn/*.)

reauth re-autentica por senha, TOTP ou e-mail OTP.

Retorno: 200 grant; 400 invalid_body | method_unavailable; 401 invalid_credentials | invalid_code{attempts_remaining} | otp_invalid; 429 rate_limited; 500.

Parameters

No parameters.

Request body

Corpo JSON. O schema detalhado deste endpoint ainda não está tipado na spec; veja a descrição da operação.

application/json

NameTypeRequiredDescription
(corpo)objectno
{}

Responses

200

Grant

400

Invalid_body | method_unavailable

NameTypeRequiredDescription
errorstringyes

401

Sem credencial valida

NameTypeRequiredDescription
errorstringyes

429

Limite de requisições excedido.

NameTypeRequiredDescription
errorstringyes

500

Ver descrição

NameTypeRequiredDescription
errorstringyes

Examples

"Try it" is turned off in this reference. Use the examples with your test credential.

curl

curl -sS -X POST 'https://auth-api.axuz.net/auth/reauth' \
  -H "Authorization: Bearer $AXUZ_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{}'

Node.js

const res = await fetch("https://auth-api.axuz.net/auth/reauth", {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.AXUZ_TOKEN}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({}),
});
if (!res.ok) throw new Error(`HTTP ${res.status}: ${await res.text()}`);
console.log(await res.json());

Python

import os
import requests

res = requests.request(
    "POST",
    "https://auth-api.axuz.net/auth/reauth",
    headers={
        "Authorization": f"Bearer {os.environ['AXUZ_TOKEN']}",
    },
    json={},
    timeout=30,
)
res.raise_for_status()
print(res.json())