def authenticate_token( self, token ):
token_data = self.data_store.fetch( '<STR_LIT>', token=token )<EOL>if not token_data:<EOL><INDENT>raise Proauth2Error( '<STR_LIT>',<EOL>'<STR_LIT>' )<EOL><DEDENT>return token_data['<STR_LIT>']<EOL>
authenticate_token checks the passed token and returns the user_id it is
associated with. it is assumed that this method won't be directly exposed to
the oauth client, but some kind of framework or wrapper. this allows the
framework to have the user_id without doing additional DB calls.