magpie.cli.purge_expired_network_tokens

Removes expired network tokens from the database.

This ensures that the network_tokens table doesn’t fill up with expired tokens. Both an expired token and a non-existent token behave the same from an access perspective (user is denied) so it is safe to automatically remove all expired tokens.

Attributes

LOGGER

Functions

make_parser(→ argparse.ArgumentParser)

get_login_session(magpie_url, username, password)

main(→ int)

Module Contents

magpie.cli.purge_expired_network_tokens.LOGGER[source]
magpie.cli.purge_expired_network_tokens.make_parser() argparse.ArgumentParser[source]
magpie.cli.purge_expired_network_tokens.get_login_session(magpie_url, username, password)[source]
magpie.cli.purge_expired_network_tokens.main(args: Sequence[magpie.typedefs.Str] | None = None, parser: argparse.ArgumentParser | None = None, namespace: argparse.Namespace | None = None) int[source]