java - Can you set up a simple log on system with google endpoints -


i have demo create needs have 3 different log on types. not familiar php , have been using google app engine endpoints quite recently.

i looking have simple log on system user name , password , have set 3 different entity types (admin, merchant , store manager).

the problem objectify queries created need pre defined , cannot search user username , password matching correct 1 specified on index page means can't retrieve data datastore using api's unless filter before had won't work log on system.

the problem objectify queries created need pre defined , cannot search user username , password matching correct 1 specified on index page means can't retrieve data datastore using api's unless filter before had won't work log on system.

not sure mean this, nor got info. implementing login simple pretty straightforward using endpoints + objectify. query user, if user not null check password , act accordingly.

   @apimethod(name = "loginuser", path="login")     public loginresponse login(loginrequest req, httpservletrequest context) {         //todo user search para buscar los usuarios?         useraccount user = ofy().load().type(useraccount.class).filter("username", req.getusername()).first()                 .now();         if(user == null){             // return error         }         if(user.getpassword().equals(encryptionutils.encrypt(req.getpassword()))){         //do whatever session handling     } } 

Comments

Popular posts from this blog

javascript - gulp-nodemon - nodejs restart after file change - Error: listen EADDRINUSE events.js:85 -

Fatal Python error: Py_Initialize: unable to load the file system codec. ImportError: No module named 'encodings' -

javascript - oscilloscope of speaker input stops rendering after a few seconds -