Skip to content

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.

  • An AuthenticationManager is created alongside the client.
  • Before each call_api or get, the manager checks token freshness and refreshes it against token_url when needed.
  • Tokens are kept in memory (no disk persistence).

The flow is documented in /en/concepts/piste-oauth.