This project demonstrates a secure authentication system built with ASP.NET, using JWT (JSON Web Tokens) for authorization, BCrypt for password hashing, and SQLite as the database.
- Secure user registration
- Password hashing using BCrypt
- JWT-based authentication
- Protected endpoints
- Lightweight SQLite database
Registers a new user.
- Stores the user in the SQLite database
- Hashes the password using BCrypt before saving
- Ensures secure password storage
Authenticates a user.
- Accepts username and password
- Verifies the password against the stored BCrypt hash
- Returns a JWT token if authentication is successful
Protected endpoint.
- Requires a valid JWT token
- Token must be included in the
Authorizationheader as:
<!-- -->
Authorization: Bearer <your_token>
- Accessible only if the token was issued by the backend and is valid
- Passwords are never stored in plain text.
- JWT tokens are required to access protected routes.
- Authentication and authorization are handled securely using industry best practices.
- ASP.NET
- JWT Authentication
- BCrypt
- SQLite