{"id":22144878,"url":"https://github.com/hndrs/jwt-auth-spring-boot-starter","last_synced_at":"2026-04-30T17:31:59.058Z","repository":{"id":38835002,"uuid":"345793453","full_name":"hndrs/jwt-auth-spring-boot-starter","owner":"hndrs","description":"Spring-Boot-Starter that helps consuming JWT Identities in spring restcontrollers","archived":false,"fork":false,"pushed_at":"2023-03-06T18:06:37.000Z","size":111,"stargazers_count":0,"open_issues_count":4,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-24T12:19:31.987Z","etag":null,"topics":["authentication","jwk","jwt","jwt-authentication","kotlin-spring-boot","spring-boot","spring-boot-starter"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","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/hndrs.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2021-03-08T21:00:07.000Z","updated_at":"2023-10-22T10:49:32.000Z","dependencies_parsed_at":"2024-12-02T02:33:23.921Z","dependency_job_id":null,"html_url":"https://github.com/hndrs/jwt-auth-spring-boot-starter","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/hndrs/jwt-auth-spring-boot-starter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hndrs%2Fjwt-auth-spring-boot-starter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hndrs%2Fjwt-auth-spring-boot-starter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hndrs%2Fjwt-auth-spring-boot-starter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hndrs%2Fjwt-auth-spring-boot-starter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hndrs","download_url":"https://codeload.github.com/hndrs/jwt-auth-spring-boot-starter/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hndrs%2Fjwt-auth-spring-boot-starter/sbom","scorecard":{"id":466932,"data":{"date":"2025-08-11","repo":{"name":"github.com/hndrs/jwt-auth-spring-boot-starter","commit":"783707cc874283d26c9305e6815c062653a49498"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.7,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/28 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":9,"reason":"binaries present in source code","details":["Warn: binary detected: gradle/wrapper/gradle-wrapper.jar:1"],"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/hndrs-gradle-check.yml:1","Warn: no topLevel permission defined: .github/workflows/hndrs-gradle-publish-snapshot.yml:1","Warn: no topLevel permission defined: .github/workflows/hndrs-gradle-publish.yml:1","Warn: no topLevel permission defined: .github/workflows/hndrs-gradle-sonar.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/hndrs-gradle-check.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/hndrs/jwt-auth-spring-boot-starter/hndrs-gradle-check.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/hndrs-gradle-check.yml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/hndrs/jwt-auth-spring-boot-starter/hndrs-gradle-check.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/hndrs-gradle-check.yml:27: update your workflow using https://app.stepsecurity.io/secureworkflow/hndrs/jwt-auth-spring-boot-starter/hndrs-gradle-check.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/hndrs-gradle-publish-snapshot.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/hndrs/jwt-auth-spring-boot-starter/hndrs-gradle-publish-snapshot.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/hndrs-gradle-publish-snapshot.yml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/hndrs/jwt-auth-spring-boot-starter/hndrs-gradle-publish-snapshot.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/hndrs-gradle-publish-snapshot.yml:28: update your workflow using https://app.stepsecurity.io/secureworkflow/hndrs/jwt-auth-spring-boot-starter/hndrs-gradle-publish-snapshot.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/hndrs-gradle-publish.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/hndrs/jwt-auth-spring-boot-starter/hndrs-gradle-publish.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/hndrs-gradle-publish.yml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/hndrs/jwt-auth-spring-boot-starter/hndrs-gradle-publish.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/hndrs-gradle-publish.yml:28: update your workflow using https://app.stepsecurity.io/secureworkflow/hndrs/jwt-auth-spring-boot-starter/hndrs-gradle-publish.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/hndrs-gradle-sonar.yml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/hndrs/jwt-auth-spring-boot-starter/hndrs-gradle-sonar.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/hndrs-gradle-sonar.yml:26: update your workflow using https://app.stepsecurity.io/secureworkflow/hndrs/jwt-auth-spring-boot-starter/hndrs-gradle-sonar.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/hndrs-gradle-sonar.yml:31: update your workflow using https://app.stepsecurity.io/secureworkflow/hndrs/jwt-auth-spring-boot-starter/hndrs-gradle-sonar.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/hndrs-gradle-sonar.yml:41: update your workflow using https://app.stepsecurity.io/secureworkflow/hndrs/jwt-auth-spring-boot-starter/hndrs-gradle-sonar.yml/main?enable=pin","Info:   0 out of  13 GitHub-owned GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 4 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-19T12:46:50.949Z","repository_id":38835002,"created_at":"2025-08-19T12:46:50.949Z","updated_at":"2025-08-19T12:46:50.949Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32472396,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-30T13:12:12.517Z","status":"ssl_error","status_checked_at":"2026-04-30T13:12:06.837Z","response_time":57,"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","jwk","jwt","jwt-authentication","kotlin-spring-boot","spring-boot","spring-boot-starter"],"created_at":"2024-12-01T22:34:41.040Z","updated_at":"2026-04-30T17:31:59.043Z","avatar_url":"https://github.com/hndrs.png","language":"Kotlin","funding_links":["https://github.com/sponsors/marvinschramm"],"categories":[],"sub_categories":[],"readme":"[![Maven Central](https://img.shields.io/maven-central/v/io.hndrs/jwt-auth-spring-boot-starter?style=for-the-badge)](https://search.maven.org/artifact/io.hndrs/jwt-auth-spring-boot-starter)\n[![Coverage](https://img.shields.io/sonar/coverage/hndrs_jwt-auth-spring-boot-starter?server=https%3A%2F%2Fsonarcloud.io\u0026style=for-the-badge)](https://sonarcloud.io/dashboard?id=hndrs_jwt-auth-spring-boot-starter)\n[![Supported Java Version](https://img.shields.io/badge/Supported%20Java%20Version-11%2B-informational?style=for-the-badge)]()\n[![Sponsor](https://img.shields.io/static/v1?logo=GitHub\u0026label=Sponsor\u0026message=%E2%9D%A4\u0026color=ff69b4\u0026style=for-the-badge)](https://github.com/sponsors/marvinschramm)\n\n# Getting Started\n\nAdd the following dependency to the build file\n\n```kotlin\ndependencies {\n    ...\n    implementation(\"io.hndrs:jwt-auth-spring-boot-starter:1.0.0\")\n    ...\n}\n```\n\n#### Configuration\n\nAdding the issuer and the jwks path for the verification to the ```application.properties```\n\n```properties\nhndrs.jwt.key-store-path=https://domain.auth0.com/.well-known/jwks.json\n```\n\n#### Controller\n\nTo inject the claimSet into a ```RestController``` method just use the ```@Identity``` annotation on the parameter\n\n```kotlin\n\n@GetMapping(\"/user\")\nfun getUser(@Identity claimSet: Map\u003cString, Any\u003e): Map\u003cString, Any\u003e {\n    // do something with the user claimSet\n    return claimSet\n}\n\n```\n\n#### RequestTokenResolver\n\nBy default the jwt token will be resolved from the ```Authorization``` Header in the following\nformat ```Bearer \u003cjwt_token\u003e```. To resolve the token from another header or in a different format a bean implementing\nthe [RequestTokenResolver](src/main/kotlin/io/hndrs/jwt/RequestTokenResolver.kt)\ninterface can be used.\n\nResolving token from Header ```x-custom-header: Token \u003cjwt_token\u003e```\n\n```kotlin\n@Bean\nfun requestTokenResolver(): RequestTokenResolver {\n    return object : RequestTokenResolver {\n\n        override fun tokenHeaderName(): String {\n            return \"x-custom-header\"\n        }\n\n        override fun tokenResolver(headerValue: String?): String {\n            if (headerValue == null) {\n                throw UnauthorizedIdentityException(\"${tokenHeaderName()} Header not present\")\n            }\n            if (!headerValue.startsWith(\"Token \")) {\n                throw UnauthorizedIdentityException(\"Token is not present\")\n            }\n\n            return headerValue.replace(\"Token \", \"\")\n        }\n    }\n}\n\n```\n\n#### ClaimSetTransformer\n\nBy default the claimSet is represented as a ```Map\u003cString, Any\u003e``` to enrich or transform the map into a typed object a\nbean implementing the [ClaimSetTransformer](src/main/kotlin/io/hndrs/jwt/ClaimSetTransformer.kt)\ninterface can be used.\n\n\n\u003e Transforming claimSet to a CustomUser object\n\n```kotlin\ndata class CustomUser(val id: String, val name: String, val email: String)\n\n@Bean\nfun claimSetTransformer(): ClaimSetTransformer {\n    return object : ClaimSetTransformer {\n        override fun transform(claimSet: Map\u003cString, Any\u003e): Any {\n            return CustomUser(\n                claimSet[\"sub\"] as String,\n                claimSet[\"name\"] as String,\n                claimSet[\"email\"] as String,\n            )\n        }\n    }\n}\n\n// transformed object\n@GetMapping(\"/user\")\nfun getUser(@Identity user: CustomUser): CustomUser {\n    // do something with the user claimSet\n    return user\n}\n```\n\n\u003e Loading a user object\n\n```kotlin\n\ninterface UserRepository : MongoRepository\u003cString, DatabaseUser\u003e\n\n@Component\nclass UserLoadingClaimSetTransformer(\n    private val userRepository: UserRepository\n) : ClaimSetTransformer {\n    override fun transform(claimSet: Map\u003cString, Any\u003e): Any {\n        return userRepository.findById(claimSet[\"sub\"] as String)\n    }\n}\n\n// transformed object\n@GetMapping(\"/user\")\nfun getUser(@Identity user: DatabaseUser): CustomUser {\n    // do something with the user claimSet\n    return user\n}\n```\n\n \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhndrs%2Fjwt-auth-spring-boot-starter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhndrs%2Fjwt-auth-spring-boot-starter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhndrs%2Fjwt-auth-spring-boot-starter/lists"}