{"id":26179373,"url":"https://github.com/bezkoder/spring-boot-security-jwt-auth-mongodb","last_synced_at":"2025-08-03T17:35:08.972Z","repository":{"id":41059634,"uuid":"241319759","full_name":"bezkoder/spring-boot-security-jwt-auth-mongodb","owner":"bezkoder","description":"Build Spring Boot MongoDB JWT Authentication \u0026 Authorization example with Spring Security, Spring Data","archived":false,"fork":false,"pushed_at":"2023-06-23T01:35:36.000Z","size":118,"stargazers_count":201,"open_issues_count":5,"forks_count":123,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-09T23:14:22.773Z","etag":null,"topics":["authentication","authorization","jwt-authentication","mongodb","rest-api","restful-api","spring-boot","spring-data","spring-data-mongodb","spring-jwt-authentication","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":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bezkoder.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-02-18T09:21:34.000Z","updated_at":"2025-04-03T07:49:00.000Z","dependencies_parsed_at":"2023-01-18T02:50:19.814Z","dependency_job_id":null,"html_url":"https://github.com/bezkoder/spring-boot-security-jwt-auth-mongodb","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bezkoder%2Fspring-boot-security-jwt-auth-mongodb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bezkoder%2Fspring-boot-security-jwt-auth-mongodb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bezkoder%2Fspring-boot-security-jwt-auth-mongodb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bezkoder%2Fspring-boot-security-jwt-auth-mongodb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bezkoder","download_url":"https://codeload.github.com/bezkoder/spring-boot-security-jwt-auth-mongodb/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248125589,"owners_count":21051770,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["authentication","authorization","jwt-authentication","mongodb","rest-api","restful-api","spring-boot","spring-data","spring-data-mongodb","spring-jwt-authentication","spring-security"],"created_at":"2025-03-11T21:49:43.223Z","updated_at":"2025-04-09T23:14:27.528Z","avatar_url":"https://github.com/bezkoder.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Spring Boot, Spring Security, MongoDB - JWT Authentication \u0026 Authorization example\n\n- Appropriate Flow for User Signup \u0026 User Login with JWT Authentication\n- Spring Boot Application Architecture with Spring Security\n- How to configure Spring Security to work with JWT\n- How to define Data Models and association for Authentication and Authorization\n- Way to use Spring Data MongoDB to interact with MongoDB Database\n\n## User Registration, Login and Authorization process.\n\n![spring-boot-mongodb-jwt-authentication-flow](spring-boot-mongodb-jwt-authentication-flow.png)\n\n## Spring Boot Rest API Architecture with Spring Security\nYou can have an overview of our Spring Boot Server with the diagram below:\n\n![spring-boot-mongodb-jwt-authentication-spring-security-architecture](spring-boot-mongodb-jwt-authentication-spring-security-architecture.png)\n\nFor more detail, please visit:\n\u003e [Spring Boot, MongoDB: JWT Authentication with Spring Security](https://bezkoder.com/spring-boot-jwt-auth-mongodb/)\n\n\u003e [Using HttpOnly Cookie](https://www.bezkoder.com/spring-boot-mongodb-login-example/)\n\nWorking with Front-end:\n\u003e [Vue](https://www.bezkoder.com/jwt-vue-vuex-authentication/)\n\n\u003e [Angular 8](https://www.bezkoder.com/angular-jwt-authentication/) / [Angular 10](https://www.bezkoder.com/angular-10-jwt-auth/) / [Angular 11](https://www.bezkoder.com/angular-11-jwt-auth/) / [Angular 12](https://www.bezkoder.com/angular-12-jwt-auth/) / [Angular 13](https://www.bezkoder.com/angular-13-jwt-auth/)\n\n\u003e [React](https://www.bezkoder.com/react-jwt-auth/) / [React Redux](https://www.bezkoder.com/react-redux-jwt-auth/)\n\nMore Practice:\n\u003e [Spring Boot with MongoDB CRUD example using Spring Data](https://www.bezkoder.com/spring-boot-mongodb-crud/)\n\n\u003e [Spring Boot MongoDB Pagination \u0026 Filter example](https://www.bezkoder.com/spring-boot-mongodb-pagination/)\n\n\u003e [Spring Boot + GraphQL + MongoDB example](https://www.bezkoder.com/spring-boot-graphql-mongodb-example-graphql-java/)\n\n\u003e [Spring Boot Repository Unit Test with @DataJpaTest](https://bezkoder.com/spring-boot-unit-test-jpa-repo-datajpatest/)\n\n\u003e [Spring Boot Rest Controller Unit Test with @WebMvcTest](https://www.bezkoder.com/spring-boot-webmvctest/)\n\n\u003e Validation: [Spring Boot Validate Request Body](https://www.bezkoder.com/spring-boot-validate-request-body/)\n\n\u003e Documentation: [Spring Boot and Swagger 3 example](https://www.bezkoder.com/spring-boot-swagger-3/)\n\n\u003e Caching: [Spring Boot Redis Cache example](https://www.bezkoder.com/spring-boot-redis-cache-example/)\n\nFullstack:\n\u003e [Vue.js + Spring Boot + MongoDB example](https://www.bezkoder.com/spring-boot-vue-mongodb/)\n\n\u003e [Angular 8 + Spring Boot + MongoDB example](https://www.bezkoder.com/angular-spring-boot-mongodb/)\n\n\u003e [Angular 10 + Spring Boot + MongoDB example](https://www.bezkoder.com/angular-10-spring-boot-mongodb/)\n\n\u003e [Angular 11 + Spring Boot + MongoDB example](https://www.bezkoder.com/angular-11-spring-boot-mongodb/)\n\n\u003e [Angular 12 + Spring Boot + MongoDB example](https://www.bezkoder.com/angular-12-spring-boot-mongodb/)\n\n\u003e [Angular 13 + Spring Boot + MongoDB example](https://www.bezkoder.com/angular-13-spring-boot-mongodb/)\n\n\u003e [Angular 14 + Spring Boot + MongoDB example](https://www.bezkoder.com/spring-boot-angular-14-mongodb/)\n\n\u003e [Angular 15 + Spring Boot + MongoDB example](https://www.bezkoder.com/spring-boot-angular-15-mongodb/)\n\n\u003e [Angular 16 + Spring Boot + MongoDB example](https://www.bezkoder.com/spring-boot-angular-16-mongodb/)\n\n\u003e [React + Spring Boot + MongoDB example](https://www.bezkoder.com/react-spring-boot-mongodb/)\n\n\nRun both Back-end \u0026 Front-end in one place:\n\u003e [Integrate Angular with Spring Boot Rest API](https://www.bezkoder.com/integrate-angular-spring-boot/)\n\n\u003e [Integrate React with Spring Boot Rest API](https://www.bezkoder.com/integrate-reactjs-spring-boot/)\n\n\u003e [Integrate Vue with Spring Boot Rest API](https://www.bezkoder.com/integrate-vue-spring-boot/)\n\n## Run Spring Boot application\n```\nmvn spring-boot:run\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbezkoder%2Fspring-boot-security-jwt-auth-mongodb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbezkoder%2Fspring-boot-security-jwt-auth-mongodb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbezkoder%2Fspring-boot-security-jwt-auth-mongodb/lists"}