Developer Blog

  • Blog
  • /
  • Auth Module
By Dracony on 2 April 2013

A new authentication and authorization module has been released. It will help you to easily implement user login and access control based on user roles. Currently it allows logging in using the login/password approach and using Facebook login. As for the access control, you can configure roles both as ORM models with relationships to your user model, or by simply having a role column in your users table.

The modules is itself modular, so it’s very easy to add your own login providers or role drivers. The included Facebook lgoin controller can be extended or modified to facilitate almoast any OAuth authorization (e.g. Twitter). there is also a small tutorial for the basic Auth setup included in the module section.

Also PHPixie version is 1.70 now, aside from bugfixes it includes 3 usefull methods:

  • Controller::redirect($url) – shortcut for redirecting the user
  • Request::url($with_params) – returns current URL of the request
  • ORM::id() – Returns the value of the items id field

Note that these methods are all instance methods and not static, the ‘::’ notation is just to show the class they belong to.

comments powered by Disqus