Question

We have developed a web site, online magazine store for android device, there is also an android app that loads the website as web view. Every device has a username, password and a device ID which is sent as post during the loading of web view.

My requirement is :

  • The site should load only if the login credential supplied (post) from the android device is valid.

Where should I check the validity of the the credential? I mean should I write a plugin or whether the checking has to done in bootstrap. I dont need any group based access control all users have the same privilege.

Please show some example with necessary code.

Was it helpful?

Solution

My recommendation here would be to use an Action Helper that checks for your $POST variable and redirects/blocks the user as required.

Writing your own action helper is not difficult and once you've tried it you won't be able to stop! Matthew Weier O'Phinney has written an excellent blog post that will be useful to you too.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top