A practical implementation of authentication and authorization techniques using modern web technologies.
https://docs.google.com/presentation/d/1sBi5AGHguswuyPuFN94yphvb2Nhwv2qWZI81wZ1dW84
- User registration and login
- JWT-based authentication
- Role-based access control //@Todo
- Password hashing and security best practices
- Session management
- API authentication endpoints
- Currently uses http for demo purpose, but it has to use https //@Todo
- Backend: Spring Boot
- Frontend: HTML, CSS, JavaScript
- Database: MongoDB
- Authentication: JWT
- Security: Spring Security
- Build Tool: Maven/Gradle
- Java 11 or higher
- Maven or Gradle
- IDE (IntelliJ IDEA, Eclipse, or VS Code)
- [Specify any other prerequisites]
- Clone the repository:
git clone [repository-url]
cd diy-authentication-project- Build the project:
# Using Maven
mvn clean install
# Using Gradle
./gradlew build- Configure application properties:
Create a
application.propertiesfile insrc/main/resourceswith:
spring.datasource.url=jdbc:mysql://localhost:3306/auth_db
spring.datasource.username=root
spring.datasource.password=your_password
spring.security.jwt.secret=your-secret-key
- Run the application:
# Using Maven
mvn spring-boot:run
# Using Gradle
./gradlew bootRundiy-authentication-project/
├── src/
│ ├── controllers/
│ ├── middleware/
│ ├── models/
│ ├── routes/
│ └── utils/
├── public/
├── config/
└── tests/
- Password hashing using bcrypt (Done)
- JWT token validation //@Todo
- CSRF protection //@Todo
- Input validation //@Todo
- Rate limiting //@Todo
- Secure session management //@Todo
- POST
/auth/register- User registration - POST
/auth/login- User login - GET
/auth/profile- Get user profile (protected) - POST
/auth/logout- User logout
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazonFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is open source.
- Inspired by modern authentication best practices
- Thanks to the open-source community for their contributions