Azazel
Invalidate JWT-Tokens on logout and password change.
I have an ASP.net Web api that handles user interaction. For authentification I use JWT Tokens. I realize that these tokens are only a way to confirm claims and do not carry states in any way.
I want to give uses the ability to log out, i.e invalid tokens and change thier password. I do not like the approach of storing the password hash in the token as it can be read.
Also I have no clue if it would make sense to use a table for invalidated tokens and how I would go about implementing that feature.
If you have any input or pointers I could use to help me it would be greatly appreciated. : )
17 replies
❔ Error with showing Images in Azure App Service.
Using Asp.net and Azure Blob Storage and Azure App Service:
When I run my API locally on my computer I can receive Images. even if they have slashes, indicating that they are part of a directory:
the same code and the same request fails to run when my API is published to the App service.
Instead I get a 404 when trying to request Images with slashes (like the one on top). Images that do not have backslashes in the name instead work normally tho.
the endpoint that retrieves the images is the following.
I suspect that, because the directory symbol is the same as a web-directory, my API fails to show the image. I do not believe that loading the actual image from blob storage is the problem, as images without slashes load normally.
Also if I type in a random name of an image that does not exist I explicitly get a Bad Request stating that the image does not exist, instead of a 404.
Any ideas why that behavior may happen?
362 replies
❔ Cant seem to publish my C# Asp.net Core 6 Web API to Azure.
Guys im trying to publish my .Net Core 6 web api to Azure but I keep getting the same Exception
When publishing I get an error Prompt (probably because of the exception) that tells me to add AddSwaggerGen to my ConfigureServices. Ive done that and its not in an if statement.
My Startup.cs looks like this:
6 replies