php - What should be the right API structure using CakePHP -


i've been working while on api-including project. have apiuserscontroller handles user's actions api , api controller. need ensure secure, i've created apikey() function detects if user sending request api has right credentials.

my question should put apikey() function in order make use of in api controller?

any api security recommendations welcomed.

thank in advance!

my question should put apikey() function in order make use of in api controller?

easy answer, correct place authentication adapter. ceeram has created token (that's you're using) adapter cakephp. see link here.

if want more secure way should go oauth suggested dave. instead of using specific oauth plugin go opauth cakephp, comes oauth strategy adapter.

also instead of creating api controllers use prefix routing , share of code api actions normal actions in model. way can reused easy , no need duplicate work.


Comments

Popular posts from this blog

php - regexp cyrillic filename not matches -

c# - OpenXML hanging while writing elements -

sql - Select Query has unexpected multiple records (MS Access) -