gcb_web_auth/views.py
def pop_state(request):
    """
    Utility function to validate OAuth state and restore destination redirect param
    If the request does not specify state or it does not match a recent state, an exception is raised
    :param request: a request object that must have 'state=' in the GET parameters
    :return: The value of the stored destination
    """
    if 'state' in request.GET:
        state_string = request.GET['state']
        try:
            state = OAuthState.objects.get(state=state_string)
            # Delete the state
            destination = state.destination
            state.delete()
            return destination
        except ObjectDoesNotExist as e:
            raise StateException('State {} not found'.format(state_string))
    else:
        raise StateException('URL missing state parameter')

    Utility function to validate OAuth state and restore destination redirect param
    If the request does not specify state or it does not match a recent state, an exception is raised
    :param request: a request object that must have 'state=' in the GET parameters
    :return: The value of the stored destination
    
Utility function to validate OAuth state and restore destination redirect param
If the request does not specify state or it does not match a recent state, an exception is raised
Utility function to validate OAuth state and restore destination redirect param If the request does not specify state or it does not match a recent state an exception is raised
def pop_state(request):
    if 'state' in request.GET:
        state_string = request.GET['state']
        try:
            state = OAuthState.objects.get(state=state_string)
            destination = state.destination
            state.delete()
            return destination
        except ObjectDoesNotExist as e:
            raise StateException('State {} not found'.format(state_string))
    else:
        raise StateException('URL missing state parameter')
def pop_state ( request ) : if 'state' in request . GET : state_string = request . GET [ 'state' ] try : state = OAuthState . objects . get ( state = state_string ) destination = state . destination state . delete ( ) return destination except ObjectDoesNotExist as e : raise StateException ( 'State {} not found' . format ( state_string ) ) else : raise StateException ( 'URL missing state parameter' )
Utility function to validate OAuth state and restore destination redirect param
If the request does not specify state or it does not match a recent state, an exception is raised
Utility function to validate OAuth state and restore destination redirect param If the request does not specify state or it does not match a recent state an exception is raised
"""
    Utility function to validate OAuth state and restore destination redirect param
    If the request does not specify state or it does not match a recent state, an exception is raised
    :param request: a request object that must have 'state=' in the GET parameters
    :return: The value of the stored destination
    """ # Delete the state
The value of the stored destination
The value of the stored destination
request
a request object that must have 'state=' in the GET parameters
a request object that must have ' state = ' in the GET parameters