benvanstaveren / Mojolicious-Plugin-Authentication

A plugin to make authentication a bit easier
http://search.cpan.org/dist/Mojolicious-Plugin-Authentication/
Other
20 stars 17 forks source link

Add 'lazy_mode' & signature_exists with test and doc + some small fix. #3

Closed Meettya closed 12 years ago

Meettya commented 12 years ago

Hi!

I think this module may have less strict and more fast method 'signature_exists' - its just check $c->session($session_key). Non-secure, but for fast lookup and devision 'like guest'/'like user'.

Also I add 'lazy_mode' to wipe 'before_dispatch' hook. It seems a little bit expensive to read user data at ANY request. On the contrary in lazy_mode user data to be loaded on firs call. If site have many public pages it`s may improve speed and reduce DB reading.

I add some docs and test. All ok with test, but docs may need some fix - english is`nt my mother tongue.

benvanstaveren commented 12 years ago

Merged :) I will make a new release in the next few days or so, thank you :D