Need a unique gift idea?
A Pastebin account makes a great Christmas gift
SHARE
TWEET

Untitled

a guest Jun 13th, 2018 52 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
 
  1. my $r = $self->routes;
  2.  
  3. ### check for long lived cookies for username hints; also check for authed users
  4. my $user_sniffer = $r->bridge->to(controller => 'auth', action => 'sniff_user');
  5.  
  6. ### homepage
  7. $user_sniffer->route('/')->to(controller => 'dashboard', action => 'home');
  8.  
  9. ### Login doesn't require auth but login might like to sniff the user
  10. $user_sniffer->route('/login')->to(controller => 'auth', action => 'login');
  11. $user_sniffer->route('/logout')->to(controller => 'auth', action => 'logout');
  12.  
  13. ### Auth zone
  14. my $is_authed = $user_sniffer->bridge->to(controller => 'auth', action => 'require_user' );
  15.  
  16. my $home = $is_authed->route('/home')->to(controller => 'member_area');
  17. $home->route()->to( action => 'index' );
  18. $home->route('/profile')->to(action => 'profile');
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top