#NEWLINE# def auth_url( self , perms = 'read' ) : #NEWLINE# #INDENT# "Returns the URL the user should visit to authenticate the given\n        oauth Token.\n\n        Use this method in webapps, where you can redirect the user to the\n        returned URL.\n        After authorization by the user, the browser is redirected to the\n        callback URL,\n        which will contain the OAuth verifier. Set the 'verifier' property on\n        this object\n        in order to use it.\n\n        In stand-alone apps, use open_browser_for_authentication instead.\n        " #NEWLINE# if ( self . oauth . client . resource_owner_key is None ) : #NEWLINE# #INDENT# raise FlickrError ( 'No resource owner key set, you probably forgotto call get_request_token(...)' ) #NEWLINE# #UNINDENT# if ( perms not in ( 'read' , 'write' , 'delete' ) ) : #NEWLINE# #INDENT# raise ValueError ( ( 'Invalid parameter perms=%r' % perms ) ) #NEWLINE# #UNINDENT# self . requested_permissions = owner_key #NEWLINE# owner_key = self . oauth . client . resource_owner_key #NEWLINE# return ( '%s?oauth_token=%s&perms=%s' % ( self . AUTHORIZE_URL , owner_key , perms ) )