Authentication
The pylegifrance/auth.py module wraps the logic for obtaining and
refreshing PISTE OAuth tokens. It is used internally by
LegifranceClient; users
don’t need to instantiate it directly.
Behavior
Section titled “Behavior”- An
AuthenticationManageris created alongside the client. - Before each
call_apiorget, the manager checks token freshness and refreshes it againsttoken_urlwhen needed. - Tokens are kept in memory (no disk persistence).
Source of truth
Section titled “Source of truth”The flow is documented in
/en/concepts/piste-oauth.
See also
Section titled “See also”ApiConfig— providesclient_id,client_secret,token_url.LegifranceClient— primary consumer.