{"id":21271187,"url":"https://github.com/rikeda71/springboot-restapi-with-jwt","last_synced_at":"2026-05-20T03:34:22.993Z","repository":{"id":83965510,"uuid":"264699454","full_name":"rikeda71/SpringBoot-RestAPI-with-JWT","owner":"rikeda71","description":"Example Codes of Rest API with SpringBoot + SpringSecurity + JWT","archived":false,"fork":false,"pushed_at":"2020-05-21T14:22:17.000Z","size":70,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-22T02:34:38.790Z","etag":null,"topics":["jwt","spring-boot"],"latest_commit_sha":null,"homepage":null,"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/rikeda71.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,"governance":null}},"created_at":"2020-05-17T15:35:18.000Z","updated_at":"2020-05-21T14:22:19.000Z","dependencies_parsed_at":null,"dependency_job_id":"db618971-e0f8-4ea8-b7f3-b6ce6eb6509d","html_url":"https://github.com/rikeda71/SpringBoot-RestAPI-with-JWT","commit_stats":null,"previous_names":["rikeda71/springboot-restapi-with-jwt"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rikeda71%2FSpringBoot-RestAPI-with-JWT","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rikeda71%2FSpringBoot-RestAPI-with-JWT/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rikeda71%2FSpringBoot-RestAPI-with-JWT/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rikeda71%2FSpringBoot-RestAPI-with-JWT/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rikeda71","download_url":"https://codeload.github.com/rikeda71/SpringBoot-RestAPI-with-JWT/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243725633,"owners_count":20337670,"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":["jwt","spring-boot"],"created_at":"2024-11-21T08:20:57.850Z","updated_at":"2026-05-20T03:34:17.970Z","avatar_url":"https://github.com/rikeda71.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SpringBoot-RestAPI-with-JWT\n\nThe Example of Rest API with SpringBoot + SpringSecurity + JWT(Json Web Token)\n\n## Usage\n\n  - start up web app\n\n  ```shell-script\n  $ docker-compose up -d\n  $ ./mvnw sprint-boot:run\n  ```\n\n  - authorize\n\n  ```shell-script\n  $ curl -v -X POST -d '{\"name\": \"user1\", \"password\": \"password\"}' \"http://localhost:8080/login\"\n  {\"userId\":null,\"name\":\"user1\", \"token\":\"ey...\"} \u003c- copy token\n  ```\n\n  - request with authorization\n\n  ```shell-script\n  $ curl -XPATCH -H \"Authorization: Bearer ...\"(... is encoded token copied the previous step) -H \"Content-type: application/json\" -d '{\"name\": \"user2\",\"password\": \"password2\"}' 'http://localhost:8080/services/v1/user/1'\n  ```\n\n  - request auth user information (Example of using @AuthenticationPrincipal)\n  \n  ```shell script\n  curl -XGET -H \"Authorization: Bearer ey...\" 'http://localhost:8080/auth'\n  {\"userId\":2,\"name\":\"user1\",\"createdAt\":\"2020-05-17T13:04:30.88\",\"updatedAt\":\"2020-05-17T13:04:30.88\",\"lockVersion\":0,\"deleteFlag\":false}\n  ```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frikeda71%2Fspringboot-restapi-with-jwt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frikeda71%2Fspringboot-restapi-with-jwt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frikeda71%2Fspringboot-restapi-with-jwt/lists"}