On Tue, Jan 13, 2009 at 4:30 PM, Nicholas Orr <[email protected]>wrote:
> irb(main):001:0> Merb::Authentication.default_strategy_order > => [Merb::Authentication::Strategies::Basic::Base, AuthenticateOnOperator, > AuthenticateOnCompany] > irb(main):002:0> > Merb::Slices::config[:"merb_auth_slice_password"][:no_default_strategies] > => true > > I'm doing ajax in my app and if the user is no longer authenticated, and > they click a button that does a ajax request, the response is 401 and a box > is poped up to login (basic auth). > > How do I redirect to the login page instead of having this basic auth? > > Thanks > > > > > What you're seeing here is some code in the slices default Exceptions#unauthenticated action. http://github.com/wycats/merb/tree/master/merb-auth/merb-auth-slice-password/app/controllers/exceptions.rb#L3 Feel free to just specify your own Exceptions#unauthenticated method in app/controllers/exceptions.rb Just remember that this action is the login form. Cheers Daniel --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "merb" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/merb?hl=en -~----------~----~----~----~------~----~------~--~---
