HomeSoftware Heritage

cli: Add auth command group

Description

cli: Add auth command group

Usage: swh auth [OPTIONS] COMMAND [ARGS]...

Authenticate Software Heritage users with OpenID Connect.

This CLI tool eases the retrieval of bearer tokens to authenticate a user
querying the Software Heritage Web API.

Options:

--oidc-server-url TEXT  URL of OpenID Connect server (default to
                        "https://auth.softwareheritage.org/auth/")
--realm-name TEXT       Name of the OpenID Connect authentication realm
                        (default to "SoftwareHeritage")
--client-id TEXT        OpenID Connect client identifier in the realm
                        (default to "swh-web")
-h, --help              Show this message and exit.

Commands:

login    Login and create new offline OpenID Connect session.
logout   Logout from an offline OpenID Connect session.
refresh  Refresh an offline OpenID Connect session.

Closes T2268