I've got an issue. I'm using umbraco for an website and I use an external auth provider. The redirect url I've got is something like this: mydomain/auth/token?t=44514544164. I somehow need to get the request to a surface controller.
I've tried something like
routes.MapRoute(
"ticket_validate",
"auth/token/{t}",
new { controller = "Auth", action = "Token" }
);
I think you would want to do this through an API Controller and not directly a surface controller. Umbraco provides information on setting up API Controllers here, including the routes you would want to use to post your request to: https://our.umbraco.org/documentation/reference/routing/webapi/
URL rewriting
Hi,
I've got an issue. I'm using umbraco for an website and I use an external auth provider. The redirect url I've got is something like this: mydomain/auth/token?t=44514544164. I somehow need to get the request to a surface controller.
I've tried something like routes.MapRoute( "ticket_validate", "auth/token/{t}", new { controller = "Auth", action = "Token" } );
Do you have any ideas how I can solve this?
Hi Ligia!
I think you would want to do this through an API Controller and not directly a surface controller. Umbraco provides information on setting up API Controllers here, including the routes you would want to use to post your request to: https://our.umbraco.org/documentation/reference/routing/webapi/
Hope that helps! :)
~Janae
is working on a reply...