|
| LoginResult | login (const std::string &username_or_email, const std::string &password) |
| |
| LoginResult | verify_mfa (const Sensitive< std::string > &challenge_token, const std::string &totp_code) |
| | Complete an MFA challenge.
|
| |
| LoginResult | verify_mfa (const std::string &challenge_token, const std::string &totp_code) |
| | Overload for a challenge token obtained out of band (e.g.
|
| |
| TokenPair | refresh () |
| |
| void | logout () |
| |
| AccessDecision | check_access (const std::string &action, const std::string &resource_id, std::optional< std::string > scope=std::nullopt, std::optional< std::string > subject_id=std::nullopt) |
| |
| AccessDecision | can (const std::string &action, const std::string &resource_id, std::optional< std::string > scope=std::nullopt, std::optional< std::string > subject_id=std::nullopt) |
| |
| std::vector< AccessDecision > | batch_check (const std::vector< AccessCheck > &checks) |
| |
| DeviceAuth | authenticate_device () |
| | §6.1 device / service-account authentication via the configured mTLS client certificate (POST /api/v1/auth/device).
|
| |
| std::future< LoginResult > | login_async (std::string username_or_email, std::string password) |
| |
| std::future< TokenPair > | refresh_async () |
| |
| std::future< AccessDecision > | check_access_async (std::string action, std::string resource_id, std::optional< std::string > scope=std::nullopt, std::optional< std::string > subject_id=std::nullopt) |
| |
| std::future< std::vector< AccessDecision > > | batch_check_async (std::vector< AccessCheck > checks) |
| |
| int | refresh_call_count () const |
| | Number of times a network refresh call was actually issued (§9 assertion).
|
| |
| void | _set_retry_test_seams (std::function< double()> jitter, std::function< void(std::chrono::milliseconds)> sleeper) |
| | Test seam: replace the §16 jitter source and the sleep.
|
| |
| std::optional< std::string > | csrf_token () const |
| | Currently-stored CSRF token, if any (§3).
|
| |
| bool | has_session () const |
| | Whether a session has been established (login/verify_mfa succeeded).
|
| |
| JwksVerifier & | jwks () |
| | Shared JWKS verifier bound to this client's transport + base URL.
|
| |
| const std::string & | tenant_header () const |
| | Tenant identifier injected as X-Tenant-ID on every request (§5).
|
| |
| void | close () |
| | Deterministic shutdown (CONTRACT.md §18).
|
| |
| void axiam::Client::close |
( |
| ) |
|
Deterministic shutdown (CONTRACT.md §18).
Releases the transport and its connection pool, and clears the cookie jar, the CSRF token and the §17 memo.
- IDEMPOTENT (§18.1 rule 2): calling it twice is a no-op the second time, never a double release. Cleanup runs from error paths, and an error path that itself throws hides the original failure.
- DOES NOT LOG OUT (§18.1 rule 5): it issues no request. The server-side session deliberately outlives the client object — that is what lets a process restart and resume — so a close() that logged out would silently end every user's session on each deploy.
- USE AFTER CLOSE IS AN ERROR, NOT UNDEFINED (§18.1 rule 4): every operation afterwards throws NetworkError naming the cause rather than silently reconnecting.
The destructor releases whatever close() has not, so a Client that goes out of scope without an explicit close() still frees its transport — §18.1 rule 1's "a destructor plus close()" for C++.