try using a plugin for that will cover 99.99% of what you may want to do
 
https://metacpan.org/release/Mojolicious-Plugin-Authorization
https://metacpan.org/pod/Mojolicious::Plugin::Authentication
 

 
Date: Fri, 17 Oct 2014 16:26:09 +0300
From: [email protected]
To: [email protected]
Subject: Re: [Mojolicious] Routing with Autorization


  
    
  
  
    If u wanna get an answer, you should
      provide a full example (a little app @gist will be good enough)

      

      I guess:

       $r->bridge('/')->to...


      but i'm not sure

      

    
    
      
        my $authorized =
          $r->bridge()->to('auth#is_logged_in');
        

        
        $authorized->get('/')->name('search')->to(template
          => 'search/search');

        
        $authorized->get('/search')->name('search')->to(template
          => 'search/search');
        

        
        $authorized->route('/search')->name('fetch')->to('search#fetch');
        $authorized->route('/view/:action/')->name('action')->to('view#action');

        
        

        
        In result without Autorization we have:
        

        
        1) /search and / Virbidden from auth#is_logged_in it's good
        2) /view/peoples/?id=12345 , /org/peoples/?id=12345 and etc
          is avalible and it's bad(
        

        
        Why? And How to make this right?
        

        
      
      -- 

      You received this message because you are subscribed to the Google
      Groups "Mojolicious" group.

      To unsubscribe from this group and stop receiving emails from it,
      send an email to [email protected].

      To post to this group, send email to [email protected].

      Visit this group at http://groups.google.com/group/mojolicious.

      For more options, visit https://groups.google.com/d/optout.

    
    

  





-- 

You received this message because you are subscribed to the Google Groups 
"Mojolicious" group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].

To post to this group, send email to [email protected].

Visit this group at http://groups.google.com/group/mojolicious.

For more options, visit https://groups.google.com/d/optout.
                                          

-- 
You received this message because you are subscribed to the Google Groups 
"Mojolicious" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.

Reply via email to