Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Mastering Google App Engine

You're reading from   Mastering Google App Engine Build robust and highly scalable web applications with Google App Engine

Arrow left icon
Product type Paperback
Published in Oct 2015
Publisher
ISBN-13 9781784396671
Length 368 pages
Edition 1st Edition
Languages
Arrow right icon
Toc

Users


It is often the case that there are certain parts of your web application that you don't want to be accessible to everyone, especially in the case of SaaS applications. That's where you need to guard certain functionalities or the entire application behind some sort of user management.

Google App Engine provides you with some really solid and strong user management out of the box. The process is pretty simple. The API is defined in the google.appengine.api.users package. The whole package contains a total of four functions and a single User class, which are as follows, and that's how the process works:

  • get_current_user(): This returns the current logged in user. This is an instance of the User class, which we'll examine in a while. If this function returns None, this means that nobody is logged in.

  • Now, in a case where nobody has logged in, we will have to serve them a login form. How do we do this? There's nothing that you have to do at your end. You just call create_login_url(), which...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime