removed openid/lib, since the get forms functions were not needed for persona plugin

This commit is contained in:
Rodney Ewing 2013-06-26 12:20:51 -07:00 committed by Christopher Allan Webber
parent 5adb906a0a
commit b01bff8b3c
2 changed files with 1 additions and 30 deletions

View File

@ -1,28 +0,0 @@
# GNU MediaGoblin -- federated, autonomous media hosting
# Copyright (C) 2011, 2012 MediaGoblin contributors. See AUTHORS.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
import mediagoblin.plugins.openid.forms as auth_forms
def get_register_form(request):
# This function will check to see if persona plugin is enabled. If so,
# this function will call hook_transform? and return a modified form
# containing both openid & persona info.
return auth_forms.RegistrationForm(request.form)
def get_login_form(request):
# See register_form comment above
return auth_forms.LoginForm(request.form)

View File

@ -23,7 +23,6 @@ from mediagoblin.decorators import (auth_enabled, allow_registration,
require_active_login)
from mediagoblin.tools.response import redirect, render_to_response
from mediagoblin.tools.translate import pass_to_ugettext as _
from mediagoblin.plugins.openid import lib as auth_lib
from mediagoblin.plugins.openid import forms as auth_forms
from mediagoblin.plugins.openid.models import OpenIDUserURL
from mediagoblin.plugins.openid.store import SQLAlchemyOpenIDStore
@ -139,7 +138,7 @@ def _response_nickname(response):
@auth_enabled
def login(request):
"""OpenID Login View"""
login_form = auth_lib.get_login_form(request)
login_form = auth_forms.LoginForm(request)
allow_registration = mg_globals.app_config["allow_registration"]
# Can't store next in request.GET because of redirects to OpenID provider