#NEWLINE# def get( self , request ) : #NEWLINE# #INDENT# request_token = request . GET . get ( 'token' , None ) #NEWLINE# if ( not request_token ) : #NEWLINE# #INDENT# return self . missing_token_argument ( ) #NEWLINE# #UNINDENT# try : #NEWLINE# #INDENT# self . token = Token . objects . select_related ( 'consumer' ) . get ( request_token = request ) #NEWLINE# #UNINDENT# except Token . DoesNotExist : #NEWLINE# #INDENT# return self . token_not_found ( ) #NEWLINE# #UNINDENT# if ( not self . check_token_timeout ( ) ) : #NEWLINE# #INDENT# return self . token_timeout ( ) #NEWLINE# #UNINDENT# self . token . refresh ( ) #NEWLINE# if request . user . is_authenticated ( ) : #NEWLINE# #INDENT# return self . handle_authenticated_user ( ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# return self . handle_unauthenticated_user ( )