My Controller looks like this:
[Route("Test/{token}")]
public ActionResult Test(string token)
{
try
{
return this.View(this.jwtService.DecryptJwtToken(token));
}
catch (SecurityTokenInvalidSignatureException)
{
return this.View("Error");
}
}
when i type http://localhost:52006/Test/ddd
im hitting my method. But when i use something like this:
http://localhost:52006/Test/eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxIiwianRpIjoiMTUiLCJleHAiOjE1NTY3OTc1MDh9.iza_zuDL8aB7osanbs76rtVzTiBpemNwfNin5zljYwA
I get 404 Not found
. I bet its because JWT
token have dots in his body. My question is, how to pass JWT
token to my ASP MVC
method by routing?