Skip to content

xtr_security_http.command

The console command: mint an OIDC access token for a user.

OidcTokenGenerateCommand

OidcTokenGenerateCommand(generators: Mapping[str, OidcTokenGenerator], clock: ClockInterface | None = None)

Mints the access token a firewall's generator signs, and prints it.

The generators arrive one per firewall — the registry the security bundle fills as it wires the firewalls — so a token is minted by the firewall named, or by the only one configured. Everything the token carries beyond the user it names is either named on the command line or declared as the only one, so a token never leaves here carrying a value nobody chose.

Record the per-firewall generators and the clock a not-before counts from.

Parameters:

  • generators (Mapping[str, OidcTokenGenerator]) –

    The token generator of each firewall configured to mint its own tokens, keyed by the firewall's name.

  • clock (ClockInterface | None, default: None ) –

    What a relative not-before — "-5 minutes" — is counted from.