A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://cloud.google.com/appengine/docs/legacy/standard/python/refdocs/google.appengine.api.users below:

google.appengine.api.users module | App Engine standard environment for Python 2

Skip to main content

Stay organized with collections Save and categorize content based on your preferences.

google.appengine.api.users module Summary

The User Python datastore class to be used as a datastore data type.

Contents
google.appengine.api.users.CreateLoginURL(dest_url=None, _auth_domain=None, federated_identity=None)source

Computes the login URL for redirection.

Parameters Returns

Login URL as a string. The login URL will use Google Accounts.

Raises

NotAllowedError – If federated_identity is not None.

google.appengine.api.users.CreateLogoutURL(dest_url, _auth_domain=None)source

Computes the logout URL and specified destination URL for the request.

This function works for Google Accounts applications.

Parameters

dest_url – String that is the desired final destination URL for the user after the user has logged out. If dest_url does not specify a host, the host from the current request is used.

Returns

Logout URL as a string.

exception google.appengine.api.users.Errorsource

Bases: exceptions.Exception

Base User error type.

google.appengine.api.users.GetCurrentUser()source

Retrieves information associated with the user that is making a request.

Returns:

google.appengine.api.users.IsCurrentUserAdmin()source

Specifies whether the user making a request is an application admin.

Because administrator status is not persisted in the datastore, is_current_user_admin() is a separate function rather than a member function of the User class. The status only exists for the user making the current request.

Returns

True if the user is an administrator; all other user types return False.

class google.appengine.api.users.User(email=None, _auth_domain=None, _user_id=None, federated_identity=None, federated_provider=None, _strict_mode=True)source

Bases: object

Provides the email address, nickname, and ID for a user.

A nickname is a human-readable string that uniquely identifies a Google user, akin to a username. For some users, this nickname is an email address, but for other users, a different nickname is used.

A user is a Google Accounts user.

federated_identity and federated_provider are decommissioned and should not be used.

auth_domain()source

Obtains the user’s authentication domain.

Returns

A string containing the authentication domain. This method is internal and should not be used by client applications.

email()source

Returns the user’s email address.

federated_identity()source

Decommissioned, don’t use.

Returns

A string containing the federated identity of the user. If the user is not a federated user, None is returned.

federated_provider()source

Decommissioned, don’t use.

Returns

A string containing the federated provider. If the user is not a federated user, None is returned.

nickname()source

Returns the user’s nickname.

The nickname will be a unique, human readable identifier for this user with respect to this application. It will be an email address for some users, and part of the email address for some users.

Returns

The nickname of the user as a string.

user_id()source

Obtains the user ID of the user.

Returns

A permanent unique identifying string or None. If the email address was set explicity, this will return None.

google.appengine.api.users.create_login_url(dest_url=None, _auth_domain=None, federated_identity=None)source

Computes the login URL for redirection.

Parameters Returns

Login URL as a string. The login URL will use Google Accounts.

Raises

NotAllowedError – If federated_identity is not None.

google.appengine.api.users.create_logout_url(dest_url, _auth_domain=None)source

Computes the logout URL and specified destination URL for the request.

This function works for Google Accounts applications.

Parameters

dest_url – String that is the desired final destination URL for the user after the user has logged out. If dest_url does not specify a host, the host from the current request is used.

Returns

Logout URL as a string.

google.appengine.api.users.get_current_user()source

Retrieves information associated with the user that is making a request.

Returns:

google.appengine.api.users.is_current_user_admin()source

Specifies whether the user making a request is an application admin.

Because administrator status is not persisted in the datastore, is_current_user_admin() is a separate function rather than a member function of the User class. The status only exists for the user making the current request.

Returns

True if the user is an administrator; all other user types return False.

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-06-16 UTC.

[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-06-16 UTC."],[[["This module provides tools for managing user authentication and authorization within Google App Engine applications, using Google Accounts."],["You can generate login URLs to redirect users for authentication and logout URLs to handle user sign-outs, with customizable destination URLs."],["The `User` class provides access to a user's email, nickname, user ID, and authentication domain, but federated identity features are deprecated."],["Functions are available to retrieve information about the current user and determine if they have administrator privileges within the application."],["The module defines several error types for handling issues related to user authentication, such as `NotAllowedError`, `RedirectTooLongError`, and `UserNotFoundError`."]]],[]]


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4