gcb_web_auth/views.py
def push_state(request, state_string, destination_param='next'):
    """
    Saves the OAuth state parameter from a request along with a redirect location
    :param request: A request object that may contain the destination param as a query param
    :param state_string: The state to store
    :param destination_param: the parameter name in the URL that contains the destination to store
    :return: The persisted OAuthState object
    """
    if not state_string:
        raise StateException('State string must be present')
    saved_state = OAuthState.objects.create(state=state_string)
    if destination_param in request.GET:
        saved_state.destination = request.GET[destination_param]
        saved_state.save()
    return saved_state

    Saves the OAuth state parameter from a request along with a redirect location
    :param request: A request object that may contain the destination param as a query param
    :param state_string: The state to store
    :param destination_param: the parameter name in the URL that contains the destination to store
    :return: The persisted OAuthState object
    
Saves the OAuth state parameter from a request along with a redirect location
Saves the OAuth state parameter from a request along with a redirect location
def push_state(request, state_string, destination_param='next'):
    if not state_string:
        raise StateException('State string must be present')
    saved_state = OAuthState.objects.create(state=state_string)
    if destination_param in request.GET:
        saved_state.destination = request.GET[destination_param]
        saved_state.save()
    return saved_state
def push_state ( request , state_string , destination_param = 'next' ) : if not state_string : raise StateException ( 'State string must be present' ) saved_state = OAuthState . objects . create ( state = state_string ) if destination_param in request . GET : saved_state . destination = request . GET [ destination_param ] saved_state . save ( ) return saved_state
Saves the OAuth state parameter from a request along with a redirect location
Saves the OAuth state parameter from a request along with a redirect location
"""
    Saves the OAuth state parameter from a request along with a redirect location
    :param request: A request object that may contain the destination param as a query param
    :param state_string: The state to store
    :param destination_param: the parameter name in the URL that contains the destination to store
    :return: The persisted OAuthState object
    """
The persisted OAuthState object
The persisted OAuthState object
request
A request object that may contain the destination param as a query param
A request object that may contain the destination param as a query param
state_string
The state to store
The state to store
destination_param
the parameter name in the URL that contains the destination to store
the parameter name in the URL that contains the destination to store