NAME
pizauth
—
OAuth2 authentication daemon
SYNOPSIS
pizauth |
refresh | reload | server | show | shutdown |
DESCRIPTION
pizauth
requests, shows, and refreshes
OAuth2 tokens. It is formed of two components: a persistent
"server" which interacts with the user to obtain tokens, and
refreshes them as necessary; and a command-line interface which can be used
by other programs to show the OAuth2 token for a current account.
The top-level commands are:
- refresh
[
-u
] account - Request a refresh of the access token for account. Exits
with 0 upon success. If there is not currently a valid access or refresh
token, reports an error to stderr, initiates a new token request, and
exits with 1. Unless
-u
is specified, the error will include an authorization URL. Note that this command does not block and will not start a new refresh if one is ongoing. - reload
- Reload the server's configuration. Exits with 0 upon success or 1 if there is a problem in the configuration.
- server
[
-c
config-file] [-d
] - Start the server. If not specified with
-c
,pizauth
checks for the configuration file (in order) at: $XDG_CONFIG_HOME/pizauth.conf, $HOME/.config/pizauth.conf. The server will daemonise itself unless-d
is specified. Exits with 0 if the server started successfully or 1 otherwise. - show
[
-u
] account - If there is an access token for account, print that
access token to stdout and exit with 0. If there is not currently a valid
access token, prints an error to stderr and exits with 1. If refreshing
might obtain a valid access token, refreshing is initiated in the
background. Otherwise (unless
-u
is specified), the error will include an authorization URL. Note that this command does not block: commands must expect that they might encounter an error when showing an access token. - shutdown
- Shut the server down. Note that shutdown occurs asynchronously: the server may still be alive for a period of time after this command returns.
SEE ALSO
AUTHORS
pizauth
was written by
Laurence Tratt
https://tratt.net/laurie/