From 005181b1663a05e55faa56a474cf6f5d81a255c9 Mon Sep 17 00:00:00 2001 From: xray7224 Date: Mon, 22 Jul 2013 17:06:00 +0100 Subject: [PATCH] Renames OAuth1 code to federation --- mediagoblin/{federation => oauth}/__init__.py | 0 mediagoblin/{federation => oauth}/exceptions.py | 0 mediagoblin/{federation => oauth}/forms.py | 0 mediagoblin/{federation => oauth}/oauth.py | 0 mediagoblin/{federation => oauth}/routing.py | 16 ++++++++-------- .../{federation => oauth}/tools/__init__.py | 0 mediagoblin/{federation => oauth}/tools/forms.py | 0 .../{federation => oauth}/tools/request.py | 0 mediagoblin/{federation => oauth}/views.py | 10 +++++----- 9 files changed, 13 insertions(+), 13 deletions(-) rename mediagoblin/{federation => oauth}/__init__.py (100%) rename mediagoblin/{federation => oauth}/exceptions.py (100%) rename mediagoblin/{federation => oauth}/forms.py (100%) rename mediagoblin/{federation => oauth}/oauth.py (100%) rename mediagoblin/{federation => oauth}/routing.py (75%) rename mediagoblin/{federation => oauth}/tools/__init__.py (100%) rename mediagoblin/{federation => oauth}/tools/forms.py (100%) rename mediagoblin/{federation => oauth}/tools/request.py (100%) rename mediagoblin/{federation => oauth}/views.py (97%) diff --git a/mediagoblin/federation/__init__.py b/mediagoblin/oauth/__init__.py similarity index 100% rename from mediagoblin/federation/__init__.py rename to mediagoblin/oauth/__init__.py diff --git a/mediagoblin/federation/exceptions.py b/mediagoblin/oauth/exceptions.py similarity index 100% rename from mediagoblin/federation/exceptions.py rename to mediagoblin/oauth/exceptions.py diff --git a/mediagoblin/federation/forms.py b/mediagoblin/oauth/forms.py similarity index 100% rename from mediagoblin/federation/forms.py rename to mediagoblin/oauth/forms.py diff --git a/mediagoblin/federation/oauth.py b/mediagoblin/oauth/oauth.py similarity index 100% rename from mediagoblin/federation/oauth.py rename to mediagoblin/oauth/oauth.py diff --git a/mediagoblin/federation/routing.py b/mediagoblin/oauth/routing.py similarity index 75% rename from mediagoblin/federation/routing.py rename to mediagoblin/oauth/routing.py index bc3a7a7e..e45077bb 100644 --- a/mediagoblin/federation/routing.py +++ b/mediagoblin/oauth/routing.py @@ -18,26 +18,26 @@ from mediagoblin.tools.routing import add_route # client registration & oauth add_route( - "mediagoblin.federation", + "mediagoblin.oauth", "/api/client/register", - "mediagoblin.federation.views:client_register" + "mediagoblin.oauth.views:client_register" ) add_route( - "mediagoblin.federation", + "mediagoblin.oauth", "/oauth/request_token", - "mediagoblin.federation.views:request_token" + "mediagoblin.oauth.views:request_token" ) add_route( - "mediagoblin.federation", + "mediagoblin.oauth", "/oauth/authorize", - "mediagoblin.federation.views:authorize", + "mediagoblin.oauth.views:authorize", ) add_route( - "mediagoblin.federation", + "mediagoblin.oauth", "/oauth/access_token", - "mediagoblin.federation.views:access_token" + "mediagoblin.oauth.views:access_token" ) diff --git a/mediagoblin/federation/tools/__init__.py b/mediagoblin/oauth/tools/__init__.py similarity index 100% rename from mediagoblin/federation/tools/__init__.py rename to mediagoblin/oauth/tools/__init__.py diff --git a/mediagoblin/federation/tools/forms.py b/mediagoblin/oauth/tools/forms.py similarity index 100% rename from mediagoblin/federation/tools/forms.py rename to mediagoblin/oauth/tools/forms.py diff --git a/mediagoblin/federation/tools/request.py b/mediagoblin/oauth/tools/request.py similarity index 100% rename from mediagoblin/federation/tools/request.py rename to mediagoblin/oauth/tools/request.py diff --git a/mediagoblin/federation/views.py b/mediagoblin/oauth/views.py similarity index 97% rename from mediagoblin/federation/views.py rename to mediagoblin/oauth/views.py index 5bb93a68..116eb023 100644 --- a/mediagoblin/federation/views.py +++ b/mediagoblin/oauth/views.py @@ -18,7 +18,7 @@ import datetime from oauthlib.oauth1 import (RequestTokenEndpoint, AuthorizationEndpoint, AccessTokenEndpoint) - + from mediagoblin.decorators import require_active_login from mediagoblin.tools.translate import pass_to_ugettext from mediagoblin.meddleware.csrf import csrf_exempt @@ -28,10 +28,10 @@ from mediagoblin.tools.response import (render_to_response, redirect, form_response) from mediagoblin.tools.crypto import random_string from mediagoblin.tools.validator import validate_email, validate_url -from mediagoblin.federation.forms import AuthorizeForm -from mediagoblin.federation.oauth import GMGRequestValidator, GMGRequest -from mediagoblin.federation.tools.request import decode_authorization_header -from mediagoblin.federation.tools.forms import WTFormData +from mediagoblin.oauth.forms import AuthorizeForm +from mediagoblin.oauth.oauth import GMGRequestValidator, GMGRequest +from mediagoblin.oauth.tools.request import decode_authorization_header +from mediagoblin.oauth.tools.forms import WTFormData from mediagoblin.db.models import NonceTimestamp, Client, RequestToken # possible client types -- 2.25.1