{"id":21654431,"url":"https://github.com/hvalfangst/spring-security","last_synced_at":"2026-04-11T10:37:40.851Z","repository":{"id":183800374,"uuid":"670743666","full_name":"hvalfangst/spring-security","owner":"hvalfangst","description":"Spring Boot 3 application developed in Kotlin with Spring Security 6 demonstrating JWT auth","archived":false,"fork":false,"pushed_at":"2023-07-28T20:58:51.000Z","size":25,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-08T19:32:57.625Z","etag":null,"topics":["exposed-orm","kotlin","postgresql","spring-boot","spring-boot-3","spring-security","spring-security-6","spring-security-jwt"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","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/hvalfangst.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-07-25T18:25:26.000Z","updated_at":"2024-10-23T09:08:17.000Z","dependencies_parsed_at":null,"dependency_job_id":"c2bcce68-d4d6-4ec4-8066-507ec4eb4eb2","html_url":"https://github.com/hvalfangst/spring-security","commit_stats":null,"previous_names":["hvalfangst/kotlin-springboot3-springsecurity6-jwt","hvalfangst/spring-security"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/hvalfangst/spring-security","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hvalfangst%2Fspring-security","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hvalfangst%2Fspring-security/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hvalfangst%2Fspring-security/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hvalfangst%2Fspring-security/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hvalfangst","download_url":"https://codeload.github.com/hvalfangst/spring-security/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hvalfangst%2Fspring-security/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274231436,"owners_count":25245585,"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","status":"online","status_checked_at":"2025-09-08T02:00:09.813Z","response_time":121,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["exposed-orm","kotlin","postgresql","spring-boot","spring-boot-3","spring-security","spring-security-6","spring-security-jwt"],"created_at":"2024-11-25T08:27:51.478Z","updated_at":"2025-12-30T21:27:33.576Z","avatar_url":"https://github.com/hvalfangst.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# JWT using Kotlin with Spring Boot \n\n\n## Requirements\n\n* x86-64\n* JDK 17\n* Keytool\n* Linux\n* Docker\n* Kubernetes\n\n\n## Startup\n\nThe script \"up\" starts the application by executing the following:\n```\n1. docker-compose -f db/docker-compose.yml up -d\n2. mvn clean install\n3. mvn spring-boot:run\n```\n\n\n## Shutdown\n\nThe script \"down\" wipes the database executing the following:\n```\n1. docker-compose -f db/docker-compose.yml down\n```\n\n\n## HTTP Endpoints\n\nThe endpoints under mapping \"api/users\" does not require any authentication\n\nThe endpoint \"api/heroes/create\" requires the role \"HEROES_WRITE\" \n\nThe endpoint \"api/heroes/list/{USER_ID}\" requires the role \"HEROES_READ\"\n\n            it.requestMatchers(\"/api/users/**\").permitAll()\n            it.requestMatchers(\"/api/heroes/create\").hasAnyAuthority(\"HEROES_WRITE\")\n            it.requestMatchers(\"/api/heroes/list/**\").hasAnyAuthority(\"HEROES_READ\")\n\n### Users\n\nPOST http://localhost:8080/api/users/create \n\n```json\n{\n  \"fullname\": \"Glossy\",\n  \"email\": \"glossy@glosstradamus.com\",\n  \"password\": \"yellau\"\n}\n```\n\n\nPOST http://localhost:8080/api/users/{USER_ID}/roles\n\nGET  http://localhost:8080/api/users/{USER_ID}/roles \n\nPOST http://localhost:8080/api/users/login \n\n```json\n{\n  \"email\": \"glossy@glosstradamus.com\",\n  \"password\": \"yellau\"\n}\n```\n\n\n### Heroes\nPOST http://localhost:8080/api/heroes/create \n\n```json\n{\n  \"userId\": 1,\n  \"class\": \"Wizard\",\n  \"level\": 10,\n  \"hitPoints\": 200,\n  \"attack\": 10,\n  \"damage\": 5,\n  \"ac\": 12,\n  \"name\": \"Ernst the Wizard\"\n}\n```\n\n\nGET http://localhost:8080/api/heroes/list/{USER_ID} \n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhvalfangst%2Fspring-security","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhvalfangst%2Fspring-security","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhvalfangst%2Fspring-security/lists"}