{"id":17350331,"url":"https://github.com/boilerlabs/java-spring-auth-jwt-jpa","last_synced_at":"2026-01-20T07:32:54.407Z","repository":{"id":257487515,"uuid":"858394651","full_name":"boilerlabs/java-spring-auth-jwt-jpa","owner":"boilerlabs","description":"A boilerplate starter project for building a Java Spring Boot application with JWT and JPA authentication.","archived":false,"fork":false,"pushed_at":"2024-10-02T16:24:43.000Z","size":44,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-01T23:49:10.845Z","etag":null,"topics":["java","jwt","spring-boot","spring-security"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/boilerlabs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-09-16T20:20:46.000Z","updated_at":"2025-04-01T17:31:06.000Z","dependencies_parsed_at":null,"dependency_job_id":"6dae1491-bc94-4d8f-a195-4c3615743f2d","html_url":"https://github.com/boilerlabs/java-spring-auth-jwt-jpa","commit_stats":null,"previous_names":["boilerlabs/auth-jwt-java-spring","boilerlabs/java-spring-auth-jwt-jpa"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/boilerlabs/java-spring-auth-jwt-jpa","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boilerlabs%2Fjava-spring-auth-jwt-jpa","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boilerlabs%2Fjava-spring-auth-jwt-jpa/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boilerlabs%2Fjava-spring-auth-jwt-jpa/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boilerlabs%2Fjava-spring-auth-jwt-jpa/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/boilerlabs","download_url":"https://codeload.github.com/boilerlabs/java-spring-auth-jwt-jpa/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boilerlabs%2Fjava-spring-auth-jwt-jpa/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28598158,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-20T02:08:49.799Z","status":"ssl_error","status_checked_at":"2026-01-20T02:08:44.148Z","response_time":117,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["java","jwt","spring-boot","spring-security"],"created_at":"2024-10-15T17:06:34.289Z","updated_at":"2026-01-20T07:32:54.393Z","avatar_url":"https://github.com/boilerlabs.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🚀 Java Spring Boot JPA JWT Auth\n\n![License](https://img.shields.io/github/license/boilerlabs/java-spring-auth-jwt-jpa)\n![Issues](https://img.shields.io/github/issues/boilerlabs/java-spring-auth-jwt-jpa)\n![Stars](https://img.shields.io/github/stars/boilerlabs/java-spring-auth-jwt-jpa)\n\nA boilerplate starter project for building a Java Spring Boot application with JWT authentication and JPA. This template includes essential features for implementing secure and scalable authentication systems in your Spring Boot applications.\n\n## Table of Contents\n1. [Features](#features)\n2. [Getting Started](#getting-started)\n3. [Usage](#usage)\n4. [Contributing](#contributing)\n5. [License](#license)\n\n## Features\n- JWT authentication for secure token-based access\n- RSA keys for signing and verifying JWTs\n- Role-based access control\n- Configured SecurityFilterChain for managing security\n- Password hashing for secure storage\n- User Sign Up and Sign In endpoints\n- Profile endpoint for accessing user details\n- Jakarta Bean Validation for input validation\n- Docker Compose for running PostgreSQL and Adminer\n\n## Getting Started\n\n### Prerequisites\n- Java 17+\n- Maven\n\n### Installation\n1. Clone the repository:\n\n```bash\ngit clone https://github.com/boboilerlabs/java-spring-auth-jwt-jpa\ncd java-spring-auth-jwt-jpa\n```\n\n2. Generating `app.key` and `app.pub`:\n```bash\nopenssl genrsa -out src/main/resources/app.key 2048 \nopenssl rsa -in src/main/resources/app.key -pubout -out src/main/resources/app.pub\n```\n\n3. Running with Maven\n```bash\nmvn spring-boot:run\n```\n\n## Usage\n\n### Sign Up\nTo sign up, send a POST request to `/api/auth/signup` with the following JSON payload:\n\n```json\n{\n    \"username\": \"example_username\",\n    \"password\": \"example_password\"\n}\n```\n\n### Sign In\n\nTo sign in, send a POST request to `/api/auth/signin` with the following JSON payload\n\n```json\n{\n    \"username\": \"example_username\",\n    \"password\": \"example_password\"\n}\n```\n\nThe response will contain the JWT token\n\n```json\n{\n    \"token\": \"example_token\",\n    \"expiration\": \"2024-09-19T10:00:00Z\"\n}\n```\n\n### Accessing Protected Routes\n\nTo access a protected route, include the JWT token in the Authorization header\n\n```bash\ncurl -X GET http://localhost:8080/api/profile \\\n     -H \"Authorization: Bearer example_token\"\n```\n\nThe response will return the user details:\n\n```bash\n{\n    \"id\": \"user-uuid\",\n    \"username\": \"user\",\n    \"roles\": [\"ROLE_USER\"]\n}\n```\n\n## Contributing\nWe welcome contributions! Please see the [CONTRIBUTING.md](./CONTRIBUTING.md) for more details.\n\n## License\nThis project is licensed under the MIT License - see the [LICENSE](./LICENSE) file for details.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fboilerlabs%2Fjava-spring-auth-jwt-jpa","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fboilerlabs%2Fjava-spring-auth-jwt-jpa","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fboilerlabs%2Fjava-spring-auth-jwt-jpa/lists"}