diff options
author | Bryan Newbold <bnewbold@robocracy.org> | 2019-04-09 18:45:08 -0700 |
---|---|---|
committer | Bryan Newbold <bnewbold@robocracy.org> | 2019-04-09 18:45:08 -0700 |
commit | 5cfd85d926487a959b75a06c110c082f18fcd0ca (patch) | |
tree | fb7b31239824919cb3cb81cfbca47689ed85272d /python | |
parent | 0840e5211309cd9e80ad7b2bbe82df3971423323 (diff) | |
download | fatcat-5cfd85d926487a959b75a06c110c082f18fcd0ca.tar.gz fatcat-5cfd85d926487a959b75a06c110c082f18fcd0ca.zip |
more MWOAuth hackery
Diffstat (limited to 'python')
-rw-r--r-- | python/fatcat_web/__init__.py | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/python/fatcat_web/__init__.py b/python/fatcat_web/__init__.py index d0d3eaf5..6bc97cb1 100644 --- a/python/fatcat_web/__init__.py +++ b/python/fatcat_web/__init__.py @@ -61,20 +61,22 @@ else: print("No privileged token found") priv_api = None +# TODO: refactor integration so this doesn't always need to be definied. If +# key/secret are empty, library will not init; if init is skipped, get +# undefined errors elsewhere. mwoauth = MWOAuth( - consumer_key=Config.WIKIPEDIA_CLIENT_ID, - consumer_secret=Config.WIKIPEDIA_CLIENT_SECRET, + consumer_key=Config.WIKIPEDIA_CLIENT_ID or "dummy", + consumer_secret=Config.WIKIPEDIA_CLIENT_SECRET or "dummy", default_return_to='wp_oauth_finish_login') mwoauth.handshaker.user_agent = "fatcat.wiki;python_web_interface" app.register_blueprint(mwoauth.bp, url_prefix='/auth/wikipedia') from fatcat_web import routes, editing_routes, auth, cors, forms -if Config.ORCID_CLIENT_ID: - # XXX: - pass - #orcid_bp = create_flask_blueprint(ORCID, oauth, auth.handle_oauth) - #app.register_blueprint(orcid_bp, url_prefix='/auth/orcid') +# TODO: blocking on ORCID support in loginpass +#if Config.ORCID_CLIENT_ID: +# orcid_bp = create_flask_blueprint(ORCID, oauth, auth.handle_oauth) +# app.register_blueprint(orcid_bp, url_prefix='/auth/orcid') if Config.GITLAB_CLIENT_ID: gitlab_bp = create_flask_blueprint(Gitlab, oauth, auth.handle_oauth) |