Hide
Python

Functions

The google.appengine.api.oauth package provides the following functions:

get_current_user()

Returns the User object for the user represented by the OAuth consumer making this request. If the OAuth consumer did not make a valid OAuth request (such as an invalid token or other protocol parameters), calling this function raises a OAuthRequestError.

When called in the local development server, this method always returns a User object with email set to "example@example.com" and user ID set to 0.

is_current_user_admin()

Returns True if the user of the OAuth consumer making this request is currently registered as an administrator of this application. If the OAuth consumer did not make a valid OAuth request, calling this function raises a OAuthRequestError.

get_oauth_consumer_key()

Returns the OAuth consumer key provided with the current request. If the OAuth consumer did not make a valid OAuth request, calling this function raises a OAuthRequestError.