def prepare_grant_uri(uri, client_id, response_type, redirect_uri=None, scope=None, state=None, **kwargs):
 if (not is_secure_transport(uri)):
  raise InsecureTransportError()
 params = [(u'response_type', response_type), (u'client_id', client_id)]
 if redirect_uri:
  params.append((u'redirect_uri', redirect_uri))
 if scope:
  params.append((u'scope', list_to_scope(scope)))
 if state:
  params.append((u'state', state))
 for k in kwargs:
  if kwargs[k]:
   params.append((unicode_type(k), kwargs[k]))
 return add_params_to_uri(uri, params)

def prepare_grant_uri ( uri , client_id , response_type , redirect_uri = None , scope = None , state = None , ** kwargs ) : if ( not is_secure_transport ( uri ) ) : raise InsecureTransportError ( ) params = [ ( u'response_type' , response_type ) , ( u'client_id' , client_id ) ] if redirect_uri : params . append ( ( u'redirect_uri' , redirect_uri ) ) if scope : params . append ( ( u'scope' , list_to_scope ( scope ) ) ) if state : params . append ( ( u'state' , state ) ) for k in kwargs : if kwargs [ k ] : params . append ( ( unicode_type ( k ) , kwargs [ k ] ) ) return add_params_to_uri ( uri , params )
prepare the authorization grant request uri .