{"id":20180856,"url":"https://github.com/scalecube/scalecube-security","last_synced_at":"2026-01-07T20:19:02.024Z","repository":{"id":31434228,"uuid":"127270297","full_name":"scalecube/scalecube-security","owner":"scalecube","description":"Authentication and Authorization library for scalecube services.","archived":false,"fork":false,"pushed_at":"2025-04-09T05:55:10.000Z","size":392,"stargazers_count":7,"open_issues_count":1,"forks_count":2,"subscribers_count":14,"default_branch":"master","last_synced_at":"2025-04-10T05:09:10.415Z","etag":null,"topics":["access-control","authentication","authorization","jwt","role-based-access-control","role-based-authorization"],"latest_commit_sha":null,"homepage":"http://scalecube.io","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/scalecube.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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":"2018-03-29T09:38:44.000Z","updated_at":"2025-02-06T16:12:04.000Z","dependencies_parsed_at":"2025-01-25T22:30:22.570Z","dependency_job_id":"775631ef-7299-4557-b0a8-d26f09c71d33","html_url":"https://github.com/scalecube/scalecube-security","commit_stats":null,"previous_names":[],"tags_count":69,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scalecube%2Fscalecube-security","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scalecube%2Fscalecube-security/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scalecube%2Fscalecube-security/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scalecube%2Fscalecube-security/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/scalecube","download_url":"https://codeload.github.com/scalecube/scalecube-security/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248161271,"owners_count":21057555,"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":["access-control","authentication","authorization","jwt","role-based-access-control","role-based-authorization"],"created_at":"2024-11-14T02:33:15.398Z","updated_at":"2026-01-07T20:19:01.982Z","avatar_url":"https://github.com/scalecube.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# scalecube-security \n\n[![Codacy Badge](https://api.codacy.com/project/badge/Grade/e110b177bb1b4f6aaf86a4e77fc795c5)](https://app.codacy.com/app/ScaleCube/scalecube-security?utm_source=github.com\u0026utm_medium=referral\u0026utm_content=scalecube/scalecube-security\u0026utm_campaign=badger)\n\n# JWT authentication basic usage\n\nGiven a JWT we would like to authenticate it and extract its claims:\n\nGenerating JWT for example:\n\n``` java\nString hmacSecret = \"secert\";\n\nString token = Jwts.builder().setAudience(\"anAudience\")\n                .setSubject(\"aSubject\")\n                .signWith(SignatureAlgorithm.HS256, hmacSecret.getBytes())\n                .compact();\n```\n\nAuthenticating the JWT:\n``` java\nJwtAuthenticator authenticator = new JwtAuthenticatorImpl\n                .Builder()\n                .keyResolver(map -\u003e Optional.of(new SecretKeySpec(hmacSecret.getBytes(), \"HMACSHA256\")))\n                .build();\n                \nProfile profile = authenticator.authenticate(token)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscalecube%2Fscalecube-security","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fscalecube%2Fscalecube-security","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscalecube%2Fscalecube-security/lists"}