Skip to content

VentixeEventManagement/JwtAuthProvider

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

16 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ” JwtAuthProvider

JwtAuthProvider is a .NET 8 Web API project that provides robust JWT (JSON Web Token) authentication services. It is designed to help secure your applications by issuing and validating JWT tokens, simplifying the implementation of authentication and authorization in your .NET solutions.

This token is used by https://github.com/VentixeEventManagement/ApiGateway to authroize access, (The other microservices are in a isolated enviroment)

πŸš€ Features

  • βœ… Built with .NET 8
  • πŸ” JWT token generation and validation
  • πŸ“‘ RESTful API endpoints for authentication
  • πŸ“˜ Integrated with Swashbuckle (Swagger) for API documentation
  • πŸ§ͺ Unit and integration tests using xUnit and Moq

πŸ› οΈ Getting Started

1. Clone the Repository

git clone https://github.com/your-username/JwtAuthProvider.git
cd JwtAuthProvider
2. Restore Dependencies
bash
dotnet restore
3. Configure Settings
Update the appsettings.json file with your JWT configuration and other necessary settings.

4. Run the Application
bash
dotnet run
Or open the project in Visual Studio 2022 and start debugging.

5. Access API Documentation
Once running, navigate to:
https://localhost:{port}/swagger
Explore and test the API endpoints using Swagger UI.

πŸ“ Project Structure
Code
JwtAuthProvider/
β”œβ”€β”€ Controllers/               # API endpoints for authentication and token management
β”œβ”€β”€ Infrastructure/
β”‚   └── Authentication/        # Core JWT logic and interfaces
β”œβ”€β”€ Properties/                # Launch settings for development
β”œβ”€β”€ appsettings.json           # Application configuration
β”œβ”€β”€ JwtAuthProvider.Tests/     # Unit and integration tests
πŸ§ͺ Testing
This project uses xUnit and Moq for unit and integration testing.

To run the tests:

bash
cd JwtAuthProvider.Tests
dotnet test
πŸ“¦ Dependencies
Microsoft.NET.Test.Sdk
Moq
Swashbuckle.AspNetCore
System.IdentityModel.Tokens.Jwt
xunit
xunit.runner.visualstudio

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages