original_docstring:  Create an HTTP 401 Not Authorized response to trigger Mapzen OAuth.
  
          Start by redirecting the user to Mapzen OAuth authorization page:
          https://github.com/mapzen/wiki/wiki/mapzen.com-OAuth#1-redirect-users-to-request-mapzen-access
      
docstring: Create an HTTP 401 Not Authorized response to trigger Mapzen OAuth.
docstring_tokens: Create an HTTP 401 Not Authorized response to trigger Mapzen OAuth .
code: def make_401_response(should_see_interstitial):
      ''' Create an HTTP 401 Not Authorized response to trigger Mapzen OAuth.
  
          Start by redirecting the user to Mapzen OAuth authorization page:
          https://github.com/mapzen/wiki/wiki/mapzen.com-OAuth#1-redirect-users-to-request-mapzen-access
      '''
      state_id = str(uuid4())
      states = session.get('states', {})
      try:
          states[state_id] = dict(redirect=request.url, created=time())
      except TypeError:
          # an older version of this code used a list for session.states.
          states = {state_id: dict(redirect=request.url, created=time())}
      session['states'] = states
  
      args = dict(redirect_uri=urljoin(request.url, url_for('OAuth.get_oauth_callback')))
      args.update(client_id=current_app.config['MAPZEN_APP_ID'], state=state_id)
      args.update(response_type='code')
  
      if should_see_interstitial:
          return make_response(render_template('error-authenticate.html', util=util,
                                               href=mapzen_authorize_url, **args), 401)
  
      return redirect(mapzen_authorize_url+'?'+urlencode(args), 302)
code_tokens: def make_401_response ( should_see_interstitial ) : state_id = str ( uuid4 ( ) ) states = session . get ( 'states' , { } ) try : states [ state_id ] = dict ( redirect = request . url , created = time ( ) ) except TypeError : states = { state_id : dict ( redirect = request . url , created = time ( ) ) } session [ 'states' ] = states args = dict ( redirect_uri = urljoin ( request . url , url_for ( 'OAuth.get_oauth_callback' ) ) ) args . update ( client_id = current_app . config [ 'MAPZEN_APP_ID' ] , state = state_id ) args . update ( response_type = 'code' ) if should_see_interstitial : return make_response ( render_template ( 'error-authenticate.html' , util = util , href = mapzen_authorize_url , ** args ) , 401 ) return redirect ( mapzen_authorize_url + '?' + urlencode ( args ) , 302 )
short_docstring: Create an HTTP 401 Not Authorized response to trigger Mapzen OAuth.
short_docstring_tokens: Create an HTTP 401 Not Authorized response to trigger Mapzen OAuth .
comment: ''' Create an HTTP 401 Not Authorized response to trigger Mapzen OAuth.
  
          Start by redirecting the user to Mapzen OAuth authorization page:
          https://github.com/mapzen/wiki/wiki/mapzen.com-OAuth#1-redirect-users-to-request-mapzen-access
      '''$SEP$# an older version of this code used a list for session.states.