Closed nharraud closed 8 years ago
Problem: Some OAuth services like B2Access (which uses Unity) or reddit require the use of Basic HTTP authentication when retrieving the access token. Flask-OAuthlib provides an example as to how to handle this specific use-case. It requires a subclass of OAuthRemoteApp.
OAuthRemoteApp
The problem is that there is currently no way to provide a custom OAuthRemoteApp to invenio-oauthclient. The extension creates clients by calling flask-oauth or flask-oauthlib remote_app method.
remote_app
Suggested solution: Create a config variable which would default to the current behavior, but also enables the replacement of self.oauth.remote_app with a custom factory.
self.oauth.remote_app
Who needs it: B2Share in order to use B2Access OAuth service.
Problem: Some OAuth services like B2Access (which uses Unity) or reddit require the use of Basic HTTP authentication when retrieving the access token. Flask-OAuthlib provides an example as to how to handle this specific use-case. It requires a subclass of
OAuthRemoteApp
.The problem is that there is currently no way to provide a custom
OAuthRemoteApp
to invenio-oauthclient. The extension creates clients by calling flask-oauth or flask-oauthlibremote_app
method.Suggested solution: Create a config variable which would default to the current behavior, but also enables the replacement of
self.oauth.remote_app
with a custom factory.Who needs it: B2Share in order to use B2Access OAuth service.