{"id":47997490,"url":"https://github.com/rrohitramsen/spring-boot-oauth2-jwt-swagger-ui","last_synced_at":"2026-04-04T12:02:23.187Z","repository":{"id":37502619,"uuid":"117319763","full_name":"rrohitramsen/spring-boot-oauth2-jwt-swagger-ui","owner":"rrohitramsen","description":"Spring Boot , OAuth 2 , JWT (Json Web Token) and Swagger UI","archived":false,"fork":false,"pushed_at":"2024-08-26T16:46:38.000Z","size":726,"stargazers_count":105,"open_issues_count":5,"forks_count":64,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-12-06T21:23:08.206Z","etag":null,"topics":["authentication","authorization","junit","jwt-authentication","mockito","oauth2","spring-boot","spring-security-oauth2","swagger-docs","swagger-documentation","swagger-ui","swagger2","tdd-java"],"latest_commit_sha":null,"homepage":null,"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/rrohitramsen.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}},"created_at":"2018-01-13T06:20:55.000Z","updated_at":"2024-09-24T01:04:38.000Z","dependencies_parsed_at":"2022-07-26T04:32:12.816Z","dependency_job_id":null,"html_url":"https://github.com/rrohitramsen/spring-boot-oauth2-jwt-swagger-ui","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/rrohitramsen/spring-boot-oauth2-jwt-swagger-ui","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rrohitramsen%2Fspring-boot-oauth2-jwt-swagger-ui","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rrohitramsen%2Fspring-boot-oauth2-jwt-swagger-ui/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rrohitramsen%2Fspring-boot-oauth2-jwt-swagger-ui/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rrohitramsen%2Fspring-boot-oauth2-jwt-swagger-ui/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rrohitramsen","download_url":"https://codeload.github.com/rrohitramsen/spring-boot-oauth2-jwt-swagger-ui/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rrohitramsen%2Fspring-boot-oauth2-jwt-swagger-ui/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31398770,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-04T10:20:44.708Z","status":"ssl_error","status_checked_at":"2026-04-04T10:20:06.846Z","response_time":60,"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":["authentication","authorization","junit","jwt-authentication","mockito","oauth2","spring-boot","spring-security-oauth2","swagger-docs","swagger-documentation","swagger-ui","swagger2","tdd-java"],"created_at":"2026-04-04T12:02:22.473Z","updated_at":"2026-04-04T12:02:23.167Z","avatar_url":"https://github.com/rrohitramsen.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# spring-boot-oauth2-jwt-swagger-ui\nSpring Boot , OAuth 2 , JWT (Json Web Token) and Swagger UI\n\n# Spring Boot + OAuth 2.0 + JWT + Swagger-UI 2?\n\n## How to start ?\n\n```\n$ mvn spring-boot:run\n```\n\n## Swagger-UI\n* After starting the application Click on [Swagger-home](http://localhost:8080/api/swagger-ui.html)\n\n![Swagger-Home](/authentication/src/main/resources/images/Swagger-UI-Home.png \"Swagger UI Home\")\n\n\n## User Data\n\n```\n   user-name         | password\n   user1@example.com | password\n   user2@example.com | password\n   user3@example.com | password\n```\n\n\n## Authorize\n* Use above given user details to login and generate the authorization token.\n![Swagger-Home](/authentication/src/main/resources/images/Swagger-ui-auth.png \"Swagger UI Home\")\n\n![Swagger-Home](/authentication/src/main/resources/images/swagger-ui-login.png \"Swagger UI Home\")\n\n* Login using the generated token\n![Swagger-Home](/authentication/src/main/resources/images/swagger-ui-login-token.png \"Swagger UI Home\")\n\n\n\n## Change OAuth configuration\n* Edit the configuration in the file [application.properties](/authentication/src/main/resources/application.properties)\n\n```\nserver.port=8080\nserver.contextPath=/api\n\nlogging.level.com.alfred=DEBUG\n\n# Data source properties\nspring.jpa.hibernate.ddl-auto=validate\nspring.jpa.show-sql=true\n\n# openssl genrsa -out jwt.pem 2048\n# openssl rsa -in jwt.pem\nconfig.oauth2.privateKey=MIICXQIBAAKBgQDNQZKqTlO/+2b4ZdhqGJzGBDltb5PZmBz1ALN2YLvt341pH6i5mO1V9cX5Ty1LM70fKfnIoYUP4KCE33dPnC7LkUwE/myh1zM6m8cbL5cYFPyP099thbVxzJkjHWqywvQih/qOOjliomKbM9pxG8Z1dB26hL9dSAZuA8xExjlPmQIDAQABAoGAImnYGU3ApPOVtBf/TOqLfne+2SZX96eVU06myDY3zA4rO3DfbR7CzCLE6qPnyDAIiW0UQBs0oBDdWOnOqz5YaePZu/yrLyj6KM6Q2e9ywRDtDh3ywrSfGpjdSvvoaeL1WesBWsgWv1vFKKvES7ILFLUxKwyCRC2Lgh7aI9GGZfECQQD84m98Yrehhin3fZuRaBNIu348Ci7ZFZmrvyxAIxrV4jBjpACW0RM2BvF5oYM2gOJqIfBOVjmPwUrobYEFcHRvAkEAz8jsfmxsZVwh3Y/Y47BzhKIC5FLaads541jNjVWfrPirljyCy1n4sg3WQH2IEyap3WTP84+csCtsfNfyK7fQdwJBAJNRyobY74cupJYkW5OK4OkXKQQLHp2iosJV/Y5jpQeC3JO/gARcSmfIBbbI66q9zKjtmpPYUXI4tc3PtUEY8QsCQQCcxySyC0sKe6bNzyC+Q8AVvkxiTKWiI5idEr8duhJd589H72Zc2wkMB+a2CEGo+Y5Hjy5cvuph/pG/7Qw7sljnAkAy/feClt1mUEiAcWrHRwcQ71AoA0+21yC9VkqPNrn3w7OEg8gBqPjRlXBNb00QieNeGGSkXOoU6gFschR22Dzy\n\n# openssl rsa -in jwt.pem -pubout\nconfig.oauth2.publicKey=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDNQZKqTlO/+2b4ZdhqGJzGBDltb5PZmBz1ALN2YLvt341pH6i5mO1V9cX5Ty1LM70fKfnIoYUP4KCE33dPnC7LkUwE/myh1zM6m8cbL5cYFPyP099thbVxzJkjHWqywvQih/qOOjliomKbM9pxG8Z1dB26hL9dSAZuA8xExjlPmQIDAQAB\n\n\n#oauth configurations\nconfig.oauth2.tokenTimeout=3600\nconfig.oauth2.resource.id=oauth2-resource\nconfig.oauth2.clientID=client\nconfig.oauth2.clientSecret=secret\nsecurity.oauth2.client.grantType=client_credentials\nconfig.oauth2.accessTokenUri=http://localhost:8080/api/oauth/token\nconfig.oauth2.userAuthorizationUri=http://localhost:8080/api/oauth/authorize\nconfig.oauth2.resourceURI= http://localhost:8080/api/oauth/authorize\n```\n\n\n\n\n\n\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frrohitramsen%2Fspring-boot-oauth2-jwt-swagger-ui","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frrohitramsen%2Fspring-boot-oauth2-jwt-swagger-ui","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frrohitramsen%2Fspring-boot-oauth2-jwt-swagger-ui/lists"}