Commits

Paul Tan committed 9ba2491

Initial commit.

Comments (0)

Files changed (11)

+================
+oauth1providers
+================
+
+oauth1providers aims to be a comprehensive database of all oAuth1 providers
+in the Internet.
+
+Installation
+==============
+Note that in order to use the build script `build.py` you need the
+following dependencies:
+
+- Python 3
+- PyYAML
+
+Run `build.py` in the root directory. This will create a file called 
+`providers.json`. Copy (or symlink) this file to the oauth1 local
+data directory (`~/.local/share/oauth1` or `/usr/share/oauth1`).
+
+Database Format
+=================
+To be written.
+
+#! /usr/bin/python3
+import yaml
+from argparse import ArgumentParser
+from os.path import splitext, basename
+import json
+
+def main():
+    p = ArgumentParser()
+    p.add_argument("-o", dest = "output", default = "providers.json")
+    p.add_argument("files", nargs="+")
+    args = p.parse_args()
+    out = dict()
+    for path in args.files:
+        name = splitext(basename(path))[0]
+        f = open(path, "r")
+        out[name] = yaml.load(f)
+        f.close()
+    f = open(args.output, "w")
+    json.dump(out, f)
+    f.close()
+if __name__ == "__main__":
+    main()
+

providers/bitbucket.yaml

+auth_endpoint: https://bitbucket.org/!api/1.0/oauth/authenticate
+resources: https?://api\.bitbucket\.org
+temp_cred_endpoint: https://bitbucket.org/!api/1.0/oauth/request_token
+token_cred_endpoint: https://bitbucket.org/!api/1.0/oauth/access_token

providers/dropbox.yaml

+auth_endpoint: https://www.dropbox.com/1/oauth/authorize
+resources: https?://api-content\.dropbox\.com|https?://api\.dropbox\.com
+temp_cred_endpoint: https://api.dropbox.com/1/oauth/request_token
+token_cred_endpoint: https://api.dropbox.com/1/oauth/access_token
+version: '1.0'

providers/flickr.yaml

+auth_endpoint: https://www.flickr.com/services/oauth/authorize
+resources: https://api\.flickr\.com|http://api\.flickr\.com|https://www\.flickr\.com|http://www\.flickr\.com
+temp_cred_endpoint: http://www.flickr.com/services/oauth/request_token
+temp_cred_endpoint_method: GET
+token_cred_endpoint: http://www.flickr.com/services/oauth/access_token
+token_cred_endpoint_method: GET
+auth_params: {"perms": "delete"}

providers/trello.yaml

+auth_endpoint: https://trello.com/1/OAuthAuthorizeToken
+resources: https?://trello\.com
+temp_cred_endpoint: https://trello.com/1/OAuthGetRequestToken
+token_cred_endpoint: https://trello.com/1/OAuthGetAccessToken
+auth_params: {"scope": "read,write,account", "expiration": "never"}

providers/tumblr.yaml

+auth_endpoint: https://www.tumblr.com/oauth/authorize
+resources: https://api\.tumblr\.com
+temp_cred_endpoint: https://www.tumblr.com/oauth/request_token
+token_cred_endpoint: https://www.tumblr.com/oauth/access_token

providers/twitter.yaml

+auth_endpoint: https://api.twitter.com/oauth/authorize
+resources: https://api\.twitter\.com|https://userstream\.twitter\.com|https://stream\.twitter\.com
+temp_cred_endpoint: https://api.twitter.com/oauth/request_token
+token_cred_endpoint: https://api.twitter.com/oauth/access_token

providers/vimeo.yaml

+auth_endpoint: https://vimeo.com/oauth/authorize
+resources: https?://vimeo\.com/api/rest/v2
+temp_cred_endpoint: https://vimeo.com/oauth/request_token
+token_cred_endpoint: https://vimeo.com/oauth/access_token
+auth_params: {"permission": "delete"}

providers/weibo.yaml

+auth_endpoint: http://api.t.sina.com.cn/oauth/authorize
+resources: https?://api\.t\.sina\.com\.cn|https?://api\.t\.sina\.com\.cn
+temp_cred_endpoint: http://api.t.sina.com.cn/oauth/request_token
+token_cred_endpoint: http://api.t.sina.com.cn/oauth/access_token

providers/yahoo.yaml

+auth_endpoint: https://api.login.yahoo.com/oauth/v2/request_auth
+resources: http://social\.yahooapis\.com
+temp_cred_endpoint: https://api.login.yahoo.com/oauth/v2/get_request_token
+token_cred_endpoint: https://api.login.yahoo.com/oauth/v2/get_token