This is an RPG game API built using .NET Core Web API and utilizing .NET 7 SDK. The game uses SQLite for data storage and Swagger for API documentation. Authentication is implemented using JWT.
- .NET 7 SDK
- Sqlite
The API documentation can be accessed by running the application and visiting the following URL:
https://localhost:<port>/swagger
JWT authentication is implemented using the Microsoft.AspNetCore.Authentication.JwtBearer package. The .env file contains the secret key used for JWT generation and validation.
The API contains the following endpoints:
POST /api/User/Register Allows users to register by providing a username and password in the request body.
Example Request Body:
{
"username": "username",
"password": "password"
}
POST /api/User/Login Allows users to login by providing a username and password in the request body. Returns a JWT token to be used for authentication.
Example Request Body:
{
"username": "username",
"password": "password"
}