# 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"
)
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
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