This repository has been archived by the owner on Oct 10, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 97
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change password input flow for external APIs
Program flow is more straight forward and intuitive. Program flow is documented in separate chapter.
- Loading branch information
Showing
3 changed files
with
57 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
When using external APIs for newsfeeds, the user has different options for how | ||
to provide the password to authenticate against the API. | ||
Instead of directly writing the password into the configuration file, | ||
the user can choose to provide a file containing the password or an external | ||
command that evaluates to the user's password. | ||
This is useful if the user wants to share the configuration file online or | ||
store the password in a password manager or the systems keyring. | ||
|
||
For example when using the API for "The Old Reader", | ||
Newsbeuter will first check the `oldreader-password` configuration variable, | ||
if this variable is set (meaning it's present and not empty), | ||
then its value will be used for authentication. | ||
If `oldreader-password` is not set (meaning it's not present or it's empty) | ||
but the `oldreader-passwordfile` configuration variable is set, | ||
then the first line of this file will be used as the password. | ||
This is, unless the file doesn't exist, is unreadable or its first line is empty, | ||
in those cases Newsbeuter will exit with an error. | ||
If `oldreader-passwordfile` is not set but `oldreader-passwordeval` is set, | ||
then the command will be evaluated and the first line of the result will be | ||
used as the password. | ||
This is, unless the first line of the result's string is empty, | ||
in those cases Newsbeuter will exit with an error. | ||
Newsbeuter will ignore the exit status of the command, | ||
however it will wait for the command to exit. | ||
The command's output to stderr will be ignored by Newsbeuter and forwarded to | ||
the user, the output to stdout on the other hand will never be printed. | ||
If neither `oldreader-password`, `oldreader-passwordfile` nor | ||
`oldreader-passwordeval` are set, then Newsbeuter will ask for the user's | ||
password with an interactive prompt. | ||
The entered password will be used unless it is empty, | ||
in which case Newsbeuter will exit with an error. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters