Debian Codegraph @

PKG-INFO

raw
1 Metadata-Version: 2.1
2 Name: oauth2token
3 Version: 0.0.3
4 Summary: Oauth2 token management for cli applications
5 Home-page: https://github.com/VannTen/oauth2token
6 Author: VannTen
7 Author-email: [email protected]
8 License: UNKNOWN
9 Platform: UNKNOWN
10 Classifier: Programming Language :: Python :: 3
11 Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
12 Classifier: Operating System :: POSIX :: Linux
13 Classifier: Intended Audience :: End Users/Desktop
14 Classifier: Development Status :: 2 - Pre-Alpha
15 Requires-Python: >=3.6
16 Description-Content-Type: text/x-rst
17 License-File: LICENSE.txt
18
19 ###############
20 # Oauth2token #
21 ###############
22
23 Simple cli tools to create and use oauth2token
24
25
26 Configuration
27 -----------------------
28
29 You need to create :code:`config.json` and :code:`scopes.json` at
30 :code:`$XDG_CONFIG_HOME/oauth2token/<provider>/` for each provider you want
31 to use.
32
33 :code:`config.json`
34 ~~~~~~~~~~~~~~~~~~~~
35
36 The main configuration file.
37 Follow the format on client_secret.json_, using your own information obtained
38 from your provider.
39
40 .. _client_secret.json: https://github.com/googleapis/google-api-python-client/blob/master/docs/client-secrets.md
41
42 Example (Just change the :code:`client_id` and :code:`client_secret` values to
43 the ones you got from Google):
44
45 .. code-block:: json
46
47 {
48 "web": {
49 "client_id": "asdfjasdljfasdkjf",
50 "client_secret": "1912308409123890",
51 "auth_uri": "https://accounts.google.com/o/oauth2/auth",
52 "token_uri": "https://accounts.google.com/o/oauth2/token"
53 }
54 }
55
56 :code:`scopes.json`
57 ~~~~~~~~~~~~~~~~~~~~
58
59 The scope your application needs. It's a json array containing the URLs.
60
61 Example :
62
63 .. code-block:: json
64
65 ["https://mail.google.com/"]
66
67
68 Usage
69 -----
70
71
72 :code:`oauth2create` <provider> <account>
73
74 Obtain and store credentials for the account in
75 :code:`$XDG_DATA_HOME/oauth2token/<provider>/<account>`, using the configuration
76 for that provider. It opens a browser where you'll need to log in the account
77 you want to use.
78
79 :code:`oauth2get` <provider> <account>
80
81 Output the access token for that account, refreshing it if needed with the
82 associated refresh token.
83
84