StudentAffairsUWM / Laravel-Shibboleth-Service-Provider

Shibboleth Authentication for Laravel
https://packagist.org/packages/saitswebuwm/shibboleth
30 stars 38 forks source link

question: what's the use case for viewOrRedirect()? #27

Open jpuck opened 7 years ago

jpuck commented 7 years ago

ShibbolethController::viewOrRedirect seemed convenient at first glance, but then I started running into quirky situations because I often have views that match the name of a route. So when I intended to redirect to a route with its namesake's view, it would load the page fine, but the URL remained /idp which is just a little strange.

It got me curious, what was the use case that drove this function's creation? I can't imagine it, mostly because I like to rigidly lock down all my application paths, but the dynamic flexibility is interesting. Would it make more sense to load the route first if it exists, then fallback to the view?

thanks