]> git.rm.cloudns.org Git - xonotic/xonstat.git/commitdiff
Remove Persona since it was shut down. :( remove-persona
authorAnt Zucaro <azucaro@gmail.com>
Fri, 23 Dec 2016 19:00:18 +0000 (14:00 -0500)
committerAnt Zucaro <azucaro@gmail.com>
Fri, 23 Dec 2016 19:00:18 +0000 (14:00 -0500)
development.ini
setup.py
xonstat/__init__.py
xonstat/templates/login.mako
xonstat/templates/nav.mako
xonstat/templates/player_info.mako
xonstat/templates/player_merge.mako
xonstat/views/admin.py

index e7f25339f60b1b7b51872be3ff4efa878207ad9e..62c9c36fac5507f879d0db47d84cec140f4e5af9 100755 (executable)
@@ -20,11 +20,6 @@ cache.regions = hourly_term
 cache.type = memory
 cache.hourly_term.expire = 3600
 
-# Mozilla Persona settings
-persona.secret = This is a secret string. Please change me!
-persona.audiences = http://localhost:6543
-persona.siteName = XonStat
-
 ##### XONSTAT CONFIG SETTINGS #####
 
 # how many "real" players are required before the data
index 9e4fddc18604162cb512cdf1130781613d958a84..a3573d2419e3441ad0be8a9e9807940bc72a1fab 100644 (file)
--- a/setup.py
+++ b/setup.py
@@ -19,7 +19,6 @@ requires = [
     'psycopg2',
     'pyramid_beaker',
     'pyramid_mako',
-    'pyramid_persona',
     'waitress',
     ]
 
index 75c4d2a9f7ab505b0fe518cec9f666177a79081b..f72e5b95b9b8718b48f342ed1fe7bffb0e554508 100644 (file)
@@ -1,6 +1,5 @@
 import sqlahelper
 from pyramid_beaker import set_cache_regions_from_settings
-from pyramid.authentication import AuthTktAuthenticationPolicy
 from pyramid.config import Configurator
 from pyramid.httpexceptions import HTTPNotFound
 from pyramid.renderers import JSONP
@@ -28,15 +27,6 @@ def main(global_config, **settings):
     # mako for templating
     config.include('pyramid_mako')
 
-    # Mozilla Persona as the login verifier. It defines default
-    # authentication and authorization policies.
-    config.include('pyramid_persona')
-
-    # override the authn policy to provide a callback
-    secret = settings.get('persona.secret', None)
-    authn_policy = AuthTktAuthenticationPolicy(secret, callback=groupfinder, hashalg='sha512')
-    config.set_authentication_policy(authn_policy)
-
     # for json-encoded responses
     config.add_renderer('jsonp', JSONP(param_name='callback'))
 
index 3467eb1078183e554d9b36b3cae3d95d70548265..11c38dabf70176ff48f1e88cdb378254c6f6d9a3 100644 (file)
@@ -5,12 +5,6 @@
 ${nav.nav('players')}
 </%block>
 
-<%block name="js">
-${parent.js()}
-<script src="https://login.persona.org/include.js" type="text/javascript"></script>
-<script type="text/javascript">${request.persona_js}</script>
-</%block>
-
 <%block name="title">
 Login
 </%block>
@@ -18,6 +12,5 @@ Login
 <div class="row">
   <div class="span12">
   Hello ${user}
-  ${request.persona_button}
   </div>
 </div>
index 645909f62d87b380a6f479c36bcf16c24b3a4751..deea128cca3afff58d9aa6e0e8f1286c4251f286 100644 (file)
@@ -33,9 +33,6 @@
                 <li><a href="${request.route_url('server_index')}" title="Server Index">Servers</a></li>
                 <li><a href="${request.route_url('map_index')}" title="Map Index">Maps</a></li>
                 <li><a href="${request.route_url('search')}" title="Search">Search</a></li>
-                % if login_logout:
-                  <li><a href="#" title="Log in with Mozilla Persona">${request.persona_button}</a></li>
-                % endif
               </ul>
             </li>
             <li><a href="https://gitlab.com/groups/xonotic" title="Contribute to Xonotic"><i class="fa fa-wrench"></i> Contribute</a></li>
index 956d335f96a1f4a1e29588ae61813b25b7087e7c..d0d619f1131cc18089c84ae6690f5ac0f8383799 100644 (file)
@@ -2,11 +2,8 @@
 <%namespace name="nav" file="nav.mako" />
 
 <%block name="navigation">
-  % if player.email_addr is not None:
-    ${nav.nav('players', True)}
-  % else:
+    ##### Disable the login button until a replacement is implemented.
     ${nav.nav('players', False)}
-  % endif
 </%block>
 
 <%block name="css">
@@ -48,8 +45,6 @@
       drawAccuracyChart("#accuracyChart", data);
     });
   </script>
-  <script src="https://login.persona.org/include.js" type="text/javascript"></script>
-  <script type="text/javascript">${request.persona_js}</script>
 </%block>
 
 <%block name="title">
index 5e8a35aa541da1ff1561caf4686fa83996330863..830838210036b22488bcabfe4424132d71a4e7a7 100644 (file)
@@ -5,12 +5,6 @@
 ${nav.nav('players')}
 </%block>
 
-<%block name="js">
-${parent.js()}
-<script src="https://login.persona.org/include.js" type="text/javascript"></script>
-<script type="text/javascript">${request.persona_js}</script>
-</%block>
-
 <%block name="title">
 Merge Players
 </%block>
index 9186d5014f0c1b87f9dd58b6af9e336071657515..48eebb83a462641ffc5ae06f92d393845aaf1049 100644 (file)
@@ -1,7 +1,6 @@
 from pyramid.httpexceptions import HTTPFound
 from pyramid.security import remember
 from pyramid.session import check_csrf_token
-from pyramid_persona.views import verify_login
 from xonstat.models import DBSession, Player
 
 
@@ -13,7 +12,8 @@ def forbidden(request):
 
 def login(request):
     # Verify the assertion and get the email of the user
-    persona_email = verify_login(request)
+    # Short-circuit this to prevent anyone from logging in right now.
+    persona_email = None
 
     # Check that the email exists in the players table
     player_email = DBSession.query(Player).\