Skip to content

Vin-it-9/Micronaut-JWT

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Micronaut JWT Authentication

🔐 Overview

A modern, secure authentication system built with Micronaut framework and JWT (JSON Web Tokens). This project provides a complete authentication solution with beautiful UI components built using Tailwind CSS and Alpine.js.

Index Preview

✨ Features

  • 🔑 JWT-based Authentication: Secure token-based authentication system
  • 👤 User Management: Registration, login, and profile management
  • 🔄 Token Refresh: Automatic token refreshing mechanism
  • 🔒 Role-based Access Control: Granular permissions for different user types
  • 🎨 Modern UI: Responsive design built with Tailwind CSS and Alpine.js
  • 📱 API-Ready: RESTful API endpoints for integration with any frontend

🛠️ Technologies

Backend

Frontend

📋 Prerequisites

  • Java 17 or later
  • Maven 3.8 or later

🚀 Getting Started

Clone the repository

git clone https://github.com/Vin-it-9/Micronaut-JWT.git
cd Micronaut-JWT

Build and run

./gradlew run

The application will be available at http://localhost:8080

🔄 API Endpoints

Authentication

POST /api/auth/register - Register a new user
POST /api/auth/login    - Login and receive JWT tokens
POST /api/auth/logout   - Invalidate current token
POST /api/auth/refresh  - Refresh an expired access token

User Management

GET    /api/user/me     - Get current user profile
PUT    /api/user/me     - Update user profile
DELETE /api/user/me     - Delete user account

⚙️ Configuration Options

Property Description Default Value
jwt.secret Secret key for signing JWT tokens Required
jwt.accessToken.expiration Access token expiration time in seconds 3600 (1 hour)
jwt.refreshToken.expiration Refresh token expiration time in seconds 2592000 (30 days)
security.oauth.enabled Enable OAuth providers false

🖼️ Screenshots

Login Page

Login Page

Registration Page

Registration Page

Dashboard

Dashboard

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published