Merge branch 'oauth2'

This commit is contained in:
Théo Piboubès
2015-09-04 20:28:01 +02:00
8 changed files with 101 additions and 136 deletions

View File

@@ -46,6 +46,13 @@ The installation will place a script in the system path
$ rtv
$ rtv --help
If you're having issues running RTV with Python 2, run RTV as module :
.. code-block:: bash
$ cd /path/to/rtv
$ python2 -m rtv
=====
Usage
=====
@@ -152,19 +159,14 @@ Config File
-----------
RTV will read a configuration placed at ``~/.config/rtv/rtv.cfg`` (or ``$XDG_CONFIG_HOME``).
Each line in the file will replace the corresponding default argument in the launch script.
Each line in the files will replace the corresponding default argument in the launch script.
This can be used to avoid having to re-enter login credentials every time the program is launched.
The OAuth section contains a boolean to trigger auto-login (defaults to False).
When authenticated, two additional fields are written : **access_token** and **refresh_token**.
Those are basically like username and password : they are used to authenticate you on Reddit servers.
Example initial config:
.. code-block:: ini
**rtv.cfg**
[oauth]
auto_login=False
.. code-block:: ini
[rtv]
# Log file location
@@ -180,6 +182,24 @@ Example initial config:
# This may be necessary for compatibility with some terminal browsers
# ascii=True
-----
OAuth
-----
OAuth is an authentication standard, that replaces authentication with login and password.
RTV implements OAuth. It stores OAuth configuration at ``~/.config/rtv/oauth.cfg``(or ``$XDG_CONFIG_HOME``).
**The OAuth configuration file must be writable, and is created automatically if it doesn't exist.**
It contains a boolean to trigger auto-login (defaults to false).
When authenticated, an additional field is written : **refresh_token**.
This acts as a replacement to username and password : it is used to authenticate you on Reddit servers.
Example **oauth.cfg**:
.. code-block:: ini
[oauth]
auto_login=false
=========
Changelog