Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

global: new configurable OAuthRemoteApp factory #46

Merged
merged 1 commit into from
Apr 28, 2016

Conversation

nharraud
Copy link
Member

Signed-off-by: Nicolas Harraudeau nicolas.harraudeau@cern.ch

@nharraud nharraud self-assigned this Apr 27, 2016
@nharraud nharraud added this to the v1.0.0 milestone Apr 27, 2016
from .utils import load_or_import_from_config, obj_or_import_string


def _default_remote_app_factory(oauth):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

def _default_remote_app_factory(oauth):
    """Default remote OAuth application factory."""
    return oauth.remote_app

?

@coveralls
Copy link

coveralls commented Apr 27, 2016

Coverage Status

Coverage increased (+1.4%) to 78.757% when pulling 48ed0f4 on nharraud:client-factory into 3e5dfff on inveniosoftware:master.

@coveralls
Copy link

coveralls commented Apr 27, 2016

Coverage Status

Coverage increased (+0.5%) to 77.828% when pulling ec04c44 on nharraud:client-factory into 3e5dfff on inveniosoftware:master.

@coveralls
Copy link

coveralls commented Apr 27, 2016

Coverage Status

Coverage increased (+0.5%) to 77.795% when pulling 0ca9774 on nharraud:client-factory into 3e5dfff on inveniosoftware:master.

@@ -26,6 +26,8 @@
an access token. **Default:** ``oauth_token``.
`OAUTHCLIENT_STATE_EXPIRES` Number of seconds after which the state token
expires. Defaults to 300 seconds.
`OAUTHCLIENT_REMOTE_APP_FACTORY` Replaces the default remote application
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OAUTHCLIENT_REMOTE_APP

@coveralls
Copy link

coveralls commented Apr 28, 2016

Coverage Status

Coverage increased (+0.4%) to 77.727% when pulling 845225d on nharraud:client-factory into 3e5dfff on inveniosoftware:master.

@@ -52,14 +53,26 @@ def __init__(self, app):
# Add remote applications
self.oauth.init_app(app)

remote_app_class = load_or_import_from_config(
'OAUTHCLIENT_REMOTE_APP', app,
Copy link
Member

@jirikuncar jirikuncar Apr 28, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just for better consistency:

-            'OAUTHCLIENT_REMOTE_APP', app,
-            OAuthRemoteApp)
+            'OAUTHCLIENT_REMOTE_APP', app, default=OAuthRemoteApp
+        )

@jirikuncar
Copy link
Member

Apart of some styling it looks good. :shipit:

@coveralls
Copy link

coveralls commented Apr 28, 2016

Coverage Status

Coverage increased (+0.4%) to 77.727% when pulling e51454d on nharraud:client-factory into 3e5dfff on inveniosoftware:master.

* NEW Enables to create custom OAuthRemoteApp instances by replacing
  the default remote application factory. (closes inveniosoftware#45)

Signed-off-by: Nicolas Harraudeau <nicolas.harraudeau@cern.ch>
@coveralls
Copy link

coveralls commented Apr 28, 2016

Coverage Status

Coverage increased (+0.4%) to 77.693% when pulling d033b02 on nharraud:client-factory into 3e5dfff on inveniosoftware:master.

@nharraud nharraud assigned jirikuncar and unassigned nharraud Apr 28, 2016
@jirikuncar jirikuncar merged commit d033b02 into inveniosoftware:master Apr 28, 2016
@nharraud nharraud deleted the client-factory branch April 28, 2016 14:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

global: configurable OAuthRemoteApp factory
3 participants