#NEWLINE# def auth( self , * args , **kw ) : #NEWLINE# #INDENT# '\n        Authenticate the request, determined by Meta.auth_mech.  Arguments\n        and Keyword arguments are just passed to the auth_mech function.\n        \n        ' #NEWLINE# if ( self . _meta . auth_mech in self . auth_mechanizms ) : #NEWLINE# #INDENT# func = getattr ( self , ( '_auth_via_%s' % self . _meta . auth_mech ) ) #NEWLINE# func ( * args , ** args ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# raise exc . dRestAPIError ( 'Unknown TastyPie auth mechanism.' )