#NEWLINE# @ token_authenticated #NEWLINE# def get( self , cookie_name , cookie_value = None ) : #NEWLINE# #INDENT# cookie_name = quote ( cookie_name , safe = '' ) #NEWLINE# if ( cookie_value is None ) : #NEWLINE# #INDENT# self . log . warning ( 'Cookie values in request body is deprecated, use `/cookie_name/cookie_value`' ) #NEWLINE# cookie_value = self . request . body #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# cookie_value = cookie_value . encode ( 'utf8' ) #NEWLINE# #UNINDENT# user = self . _user_for_cookie ( cookie_name , cookie_value ) #NEWLINE# if ( user is None ) : #NEWLINE# #INDENT# raise web . HTTPError ( 404 ) #NEWLINE# #UNINDENT# self . write ( json . dumps ( self . user_model ( user ) ) )