PHP/ CakePHP and friendsofCake/CRUD --> authentication -


i have web application built in php, running behind apache. application uses own security logic , sets $_session['username'] valid username if user logs web interface

the original developer has moved on, , adding apis app people can develop 3rd party apps connect. api layer uses friendsofcake crud https://github.com/friendsofcake/crud

the api working great, , want add authentication. know rest apis should stateless etc. in application, people can use apis must able log web console.

given core php app handling authentication , sets $_session, want crud apis check if $_session['user'] user set.

the logic follows: a) http://server/login.php post credentials (not via api layer) b) http://server/api/

if a) not done, b) won't work. goal.

how access $_session ? when try , access in api controller 1 of apis, not defined. available php apps current app uses.

note apis , backend app running on same server so: web/ --> server php code web/api --> api code (via foc crud)


Comments

Popular posts from this blog

c# - Validate object ID from GET to POST -

node.js - Custom Model Validator SailsJS -

php - Find a regex to take part of Email -