Renames OAuth1 code to federation
authorxray7224 <jessica@megworld.co.uk>
Mon, 22 Jul 2013 16:06:00 +0000 (17:06 +0100)
committerxray7224 <jessica@megworld.co.uk>
Mon, 22 Jul 2013 16:06:00 +0000 (17:06 +0100)
mediagoblin/oauth/__init__.py [moved from mediagoblin/federation/__init__.py with 100% similarity]
mediagoblin/oauth/exceptions.py [moved from mediagoblin/federation/exceptions.py with 100% similarity]
mediagoblin/oauth/forms.py [moved from mediagoblin/federation/forms.py with 100% similarity]
mediagoblin/oauth/oauth.py [moved from mediagoblin/federation/oauth.py with 100% similarity]
mediagoblin/oauth/routing.py [moved from mediagoblin/federation/routing.py with 75% similarity]
mediagoblin/oauth/tools/__init__.py [moved from mediagoblin/federation/tools/__init__.py with 100% similarity]
mediagoblin/oauth/tools/forms.py [moved from mediagoblin/federation/tools/forms.py with 100% similarity]
mediagoblin/oauth/tools/request.py [moved from mediagoblin/federation/tools/request.py with 100% similarity]
mediagoblin/oauth/views.py [moved from mediagoblin/federation/views.py with 97% similarity]

similarity index 75%
rename from mediagoblin/federation/routing.py
rename to mediagoblin/oauth/routing.py
index bc3a7a7eb2d8edce73ac6409886a7805550ed63c..e45077bbf1d9f81d1da9193d8f4d99a0b97478c4 100644 (file)
@@ -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"
         )
 
similarity index 97%
rename from mediagoblin/federation/views.py
rename to mediagoblin/oauth/views.py
index 5bb93a68cfb53f497eb4993757e72e0f8edbe3eb..116eb02305c6cfc06d3ed85dfa4f72c24da644ea 100644 (file)
@@ -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