Add note about how to provide the access token
This commit is contained in:
parent
b10d691bb3
commit
c318bfb367
1 changed files with 4 additions and 0 deletions
|
@ -572,6 +572,8 @@ def main():
|
|||
epilog = f"""
|
||||
For further help, use `{prog_name} <action> -h`.
|
||||
|
||||
You can request an access token with `{prog_name} login`, then provide it to future incantations of {prog_name} by setting the environment variable {ENVVAR_ACCESSTOKEN}.
|
||||
|
||||
Where a "URL name" is required, "id:" plus an ID can also be used instead. So these could both be valid:
|
||||
town-square
|
||||
id:123abc456def789ghi012jkl34
|
||||
|
@ -597,6 +599,8 @@ Hint: JSON output can be filtered with jq(1).
|
|||
password_argument_warning = f"""
|
||||
Security note: Other programs and users can typically read which arguments you give to any program. Therefore it strongly advised to use the environment variable (envvar) method when passing the credentials to the program. In many shells you can do so like this:
|
||||
{ENVVAR_USERNAME}='aiden' {ENVVAR_PASSWORD}='2FifeVg2UGbCETYdaWscf7hmDvUHbp' {prog_name} login
|
||||
|
||||
The obtained access token should be passed to future incantations of {prog_name} by setting the environment variable {ENVVAR_ACCESSTOKEN}.
|
||||
""".strip()
|
||||
parser_login = subparsers.add_parser(
|
||||
"login", help="retrieve an access token", epilog=password_argument_warning, formatter_class=argparse.RawTextHelpFormatter)
|
||||
|
|
Loading…
Reference in a new issue