I have set up two Silhouette environments and a controller for each (cookie auth and JWT auth). Now I would like to have an endpoint that is accessible by either auth method - that is look for a cookie, and if that is not present look for a JWT token. It seems there could be quite a few ways to implement this.
For example it seems I could make a custom ErrorHandler to pass failed cookie-auth to a SecuredAction in the JWT env.
Or maybe use Action composition in some way…
Or something else?
What is a clean and simple way to do this?