Closed SailingYYC closed 12 years ago
Thank you, most appreciated.
Although I've spent the last hour trying to find a way to pass a variable value (set in a before_dispatch) to authenticated without success. It would appear the routing condition is a closure. I'm still new to Mojolicious so am trying to figure things out...
Hi Ben, Kudos on an excellent plugin!
I have a circumstance where depending on a client's setup they may want users authenticated for certain routes while other clients don't. I immediately thought of of using (authenticated => $loginreq), but it always failed, regardless of value for $loginreq.
I peaked at the code and the present logic will always fail if $required <> true. Below is a diff that permits this behaviour, which based on the naming conventions I'm guessing was your intent. Can you advise if this was your intent or if there is a known downfall? I would love to see this incorporated so I don't have to fork for such a simple modification.
Most appreciated, Colin.