Google Appengine Authentication

I would like to check out appengine. At the moment, it is not clear to me whether there are libraries that support user authentication. I want the user to be able to create an account on the site without having a Google account (or any other).

Is there such a library, or do you need to write it from scratch? Can someone provide me with a step by step example? (if such a library exists, of course.)

(I would like to use Java if possible)

Thanks!

+3
source share
2 answers

- , . , , , gaeutilities, cookie .

: http://gaeutilities.appspot.com/session

:

from appengine_utlities import sessions

def authenticate(login, password):
    user = User.all().filter('login', login).filter('password', password).get()
    if not user: return False

    s = sessions.Session()
    s["user"] = user
    return True

def is_authenticated():
    s = sessions.Session()
    return s.has_key("user")

def get_user():
    s = sessions.Session()
    return s["user"] if s.has_key("user") else None
+2

Google Friend Connect? Google, Yahoo, Open ID .

0

Source: https://habr.com/ru/post/1721863/


All Articles