I have created a URL with Access Token. When I open the URL, the operator get removed with white-space from the token at backend end-points. Can someone help me to know why this happening? Below is my URL with the token.
api/meeting?token=wf hbRFOp/fI5jSsZ0KT9K7lkvZSJLUHyc8yy6TI9HE2HdEx0WXAqWxEUjQL/6vX
At controller level, Token is recieved as wf hbRFOp/fI5jSsZ0KT9K7lkvZSJLUHyc8yy6TI9HE2HdEx0WXAqWxEUjQL/6vX
CodePudding user response:
When I open the URL, the operator get removed with white-space from the token at backend end-points.
Yes, that's because in URLs,
is the used to represent a space. I suspect your token is actually a base64-encoded value - you should use a URL-safe base64 decodabet instead of just putting the regular base64 value directly into the query. If you must use the regular base64 one, you need to escape the
character as +
. I'd suggest using HttpUtility.UrlEncode
to do that.