google.appengine.api.oauth.oauth_api module

Summary

OAuth API.

A service that enables App Engine apps to validate OAuth requests.

Classes defined here:

Error: base exception type NotAllowedError: OAuthService exception OAuthRequestError: OAuthService exception InvalidOAuthParametersError: OAuthService exception InvalidOAuthTokenError: OAuthService exception OAuthServiceFailureError: OAuthService exception

Contents

exception google.appengine.api.oauth.oauth_api.Errorsource

Bases: exceptions.Exception

Base error class for this module.

exception google.appengine.api.oauth.oauth_api.InvalidOAuthParametersErrorsource

Bases: google.appengine.api.oauth.oauth_api.OAuthRequestError

Raised if the request was a malformed OAuth request.

For example, the request may have omitted a required parameter, contained an invalid signature, or was made by an unknown consumer.

exception google.appengine.api.oauth.oauth_api.InvalidOAuthTokenErrorsource

Bases: google.appengine.api.oauth.oauth_api.OAuthRequestError

Raised if the request contained an invalid token.

For example, the token may have been revoked by the user.

exception google.appengine.api.oauth.oauth_api.NotAllowedErrorsource

Bases: google.appengine.api.oauth.oauth_api.OAuthRequestError

Raised if the requested URL does not permit OAuth authentication.

exception google.appengine.api.oauth.oauth_api.OAuthRequestErrorsource

Bases: google.appengine.api.oauth.oauth_api.Error

Base error type for invalid OAuth requests.

exception google.appengine.api.oauth.oauth_api.OAuthServiceFailureErrorsource

Bases: google.appengine.api.oauth.oauth_api.Error

Raised if there was a problem communicating with the OAuth service.

google.appengine.api.oauth.oauth_api.get_authorized_scopes(scope)source

Returns authorized scopes from input scopes.

Parameters

scope – The custom OAuth scope or an iterable of scopes at least one of which is accepted.

Returns

A list of authorized OAuth2 scopes

Return type

list

Raises
google.appengine.api.oauth.oauth_api.get_client_id(_scope)source

Returns the value of OAuth2 Client ID from an OAuth2 request.

Parameters

_scope – The custom OAuth scope or an iterable of scopes at least one of which is accepted.

Returns

The value of Client ID.

Return type

string

Raises
google.appengine.api.oauth.oauth_api.get_current_user(_scope=None)source

Returns the User on whose behalf the request was made.

Parameters

_scope – The custom OAuth scope or an iterable of scopes at least one of which is accepted.

Returns

User

Raises
google.appengine.api.oauth.oauth_api.get_oauth_consumer_key()source

OAuth1 authentication is deprecated and turned down.

google.appengine.api.oauth.oauth_api.is_current_user_admin(_scope=None)source

Returns true if the User on whose behalf the request was made is an admin.

Parameters

_scope – The custom OAuth scope or an iterable of scopes at least one of which is accepted.

Returns

boolean

Raises

Monitor your resources on the go

Get the Google Cloud Console app to help you manage your projects.

Send feedback about...

App Engine standard environment for Python