Ignore:
Timestamp:
13/12/12 13:07:05 (6 years ago)
Author:
mnagni
Message:

corrects the previous (wrong) workflow

File:
1 edited

Legend:

Unmodified
Added
Removed
  • mauRepo/dj_security/trunk/dj_security/middleware.py

    r8711 r8712  
    6969            request.session['r'] = request.GET.get('r') 
    7070 
    71         if '/complete/' not in request.path: 
    72             request.session['done'] = False 
    73             return response 
    74  
    75         if request.path == '/account/signin/complete/' \ 
    76                 and not request.session.get('done', False): 
     71        if request.path.endswith('account/register/'): 
    7772            return _encode_authenticated_response(request, response) 
    78  
    79         #if request.path == '/account/signin/complete/' \ 
    80         # and request.session.get('done', False): 
    81         #    return response 
    8273         
    8374        return response 
     
    115106        raise DSJOpenIDNotFoundError(ex)   
    116107 
    117 def _encode_authenticated_response(request, response, context = {}): 
    118     remote_ip = calculate_remote_ip(base64.b64decode(request.session.get('r'))) 
     108def _encode_authenticated_response(request, response): 
     109    remote_ip = _calculate_remote_ip(base64.b64decode(request.session.get('r'))) 
    119110    LOGGER.info("responding to remote_ip: %s" % (remote_ip))  
    120111    username = request.session.get('openid').openid 
     
    132123    LOGGER.debug("Set authTicket in response for %s from %s"  
    133124                 % (username, remote_ip)) 
    134     redirect_parameter = getattr(settings, 'REDIRECT_URL', 'r') 
    135     context['redirect_url'] = \ 
    136         base64.b64decode(request.session.get(redirect_parameter, '')) 
    137     return render_to_response('logged_in.html', context) 
     125    return response 
Note: See TracChangeset for help on using the changeset viewer.