{"repo":"maacpiash/minimal-api-jwt-auth","free":true,"listed":false,"github":"https://github.com/maacpiash/minimal-api-jwt-auth","clone":"git clone https://github.com/maacpiash/minimal-api-jwt-auth.git","description":"🔐 🛂 ASP.NET (versions 10 and 11) minimal API with JWT authentication and authorization","language":"C#","stars":36,"topics":["asp-net","asp-net-core","aspnet","aspnetcore","auth","authentication","authorization","jwt","jwt-authentication","minimal-api"],"license":"MIT","category":"auth-billing-email","readme_excerpt":"Demonstration of ASP.NET (versions 8 and 9) minimal web API with JWT authentication and authorization. Workflow - User signs up with username, email address, and password. These are saved in the database. - When user signs in, the following is returned: - a short-lived access token (JWT) is sent in the response body. This JWT contains the user's details and role. - a longer-lived refresh token (also JWT) is sent as a strict same-site, secure, HTTP-only cookie. This is also saved in an in-memory storage as jti:userID key-value pair. - The user can access their todo s with the access token in the header in Authorization: Bearer {access token} format - When the access token expires, the user can obtain a new access token by calling the refresh endpoint, with the refresh token in the cookie. - This call also replaces the refresh token with a new one. Meaning, the refresh token in the cookie is removed from the in-memory storage and a new refresh token is saved, which is also sent in as a response cookie. Roadmap - [x] JWT generation with symmetric signing - [x] Implementation of refresh token generation with repository (in-memory storage and retrieval) - [ ] Asymmetric signing with JWKS","default_branch":null,"files":null,"tree":[],"storefront":"/r/maacpiash","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/maacpiash/minimal-api-jwt-auth/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}