{"id":17532870,"url":"https://github.com/j5ik2o/sw4jj","last_synced_at":"2025-04-23T20:48:16.566Z","repository":{"id":16588880,"uuid":"80307029","full_name":"j5ik2o/sw4jj","owner":"j5ik2o","description":"Simple scala Wrapper For Java-Jwt is sw4jj","archived":false,"fork":false,"pushed_at":"2023-02-20T03:57:07.000Z","size":160,"stargazers_count":5,"open_issues_count":4,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-18T05:53:42.484Z","etag":null,"topics":["java-jwt","jwt","oauth2","scala","scala-wrapper"],"latest_commit_sha":null,"homepage":null,"language":"Scala","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/j5ik2o.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":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2017-01-28T19:56:30.000Z","updated_at":"2023-09-26T11:14:08.000Z","dependencies_parsed_at":"2025-04-17T17:13:24.155Z","dependency_job_id":"114de2b6-362a-4b6f-9dd0-57e81d8ef050","html_url":"https://github.com/j5ik2o/sw4jj","commit_stats":null,"previous_names":[],"tags_count":90,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/j5ik2o%2Fsw4jj","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/j5ik2o%2Fsw4jj/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/j5ik2o%2Fsw4jj/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/j5ik2o%2Fsw4jj/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/j5ik2o","download_url":"https://codeload.github.com/j5ik2o/sw4jj/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250513678,"owners_count":21443204,"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":["java-jwt","jwt","oauth2","scala","scala-wrapper"],"created_at":"2024-10-20T18:06:18.156Z","updated_at":"2025-04-23T20:48:16.547Z","avatar_url":"https://github.com/j5ik2o.png","language":"Scala","funding_links":[],"categories":[],"sub_categories":[],"readme":"# sw4jj\n\n[![Actions Status: CI](https://github.com/j5ik2o/sw4jj/workflows/CI/badge.svg)](https://github.com/j5ik2o/sw4jj/actions?query=workflow%3A\"CI\")\n[![Scala Steward badge](https://img.shields.io/badge/Scala_Steward-helping-blue.svg?style=flat\u0026logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAQCAMAAAARSr4IAAAAVFBMVEUAAACHjojlOy5NWlrKzcYRKjGFjIbp293YycuLa3pYY2LSqql4f3pCUFTgSjNodYRmcXUsPD/NTTbjRS+2jomhgnzNc223cGvZS0HaSD0XLjbaSjElhIr+AAAAAXRSTlMAQObYZgAAAHlJREFUCNdNyosOwyAIhWHAQS1Vt7a77/3fcxxdmv0xwmckutAR1nkm4ggbyEcg/wWmlGLDAA3oL50xi6fk5ffZ3E2E3QfZDCcCN2YtbEWZt+Drc6u6rlqv7Uk0LdKqqr5rk2UCRXOk0vmQKGfc94nOJyQjouF9H/wCc9gECEYfONoAAAAASUVORK5CYII=)](https://scala-steward.org)\n[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.github.j5ik2o/sw4jj_2.13/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.github.j5ik2o/sw4jj_2.13)\n[![License](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)\n[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fj5ik2o%2Fsw4jj.svg?type=shield)](https://app.fossa.com/projects/git%2Bgithub.com%2Fj5ik2o%2Fsw4jj?ref=badge_shield)\n\nSimple scala Wrapper For [Java-Jwt](https://github.com/auth0/java-jwt) is sw4jj.\n\n## Installation\n\nAdd the following to your sbt build (Scala 2.11.x, 2.12.x, 2.13.x):\n\n### Release Version\n\n```scala\nlibraryDependencies += \"com.github.j5ik2o\" %% \"sw4jj\" % \"(version)\"\n```\n\n### Snapshot Version\n\n```scala\nresolvers += \"Sonatype OSS Snapshot Repository\" at \"https://oss.sonatype.org/content/repositories/snapshots/\"\n\nlibraryDependencies += \"com.github.j5ik2o\" %% \"sw4jj\" % \"(version)\"\n```\n\n## Usage\n\nPlease import `com.github.j5ik2o.sw4jj.Implicits._`.\nYou can Scala methods added to java-jwt (Header, Playload, Claim).\n\n```scala\nimport com.auth0.jwt.JWT\nimport com.github.j5ik2o.sw4jj.Implicits._\n\nval verifier = JWT.require(Algorithm.HMAC256(\"secret\"))\n  .withIssuer(\"auth0\")\n  .withArrayClaim(\"test\", \"test-1\")\n  .build()\n\nval jwt = verifier.verify(token)\n\n// for RichHeader\njwt.getAlgorithmAsScala should contain(\"HS256\")\njwt.getTypeAsScala shouldBe None\njwt.getContentTypeAsScala shouldBe None\njwt.getKeyIdAsScala shouldBe None\n\n// for RichPayload\njwt.getSubjectAsScala shouldBe None\njwt.getAudienceAsScala shouldBe Seq.empty\njwt.getExpiresAtAsScala shouldBe None\njwt.getNotBeforeAsScala shouldBe None\njwt.getIssuedAtAsScala shouldBe None\njwt.getIdAsScala shouldBe None\n\n// for RichClaim\njwt.getClaim(\"iss\").asScala[Option[String]] should contain(\"auth0\")\njwt.getClaimsAsScala.get(\"test\").map(_.asScala[Array[String]]) should contain(Array(\"test-1\"))\n\n```\n\n\n## License\n[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgithub.com%2Fj5ik2o%2Fsw4jj.svg?type=large)](https://app.fossa.com/projects/git%2Bgithub.com%2Fj5ik2o%2Fsw4jj?ref=badge_large)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fj5ik2o%2Fsw4jj","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fj5ik2o%2Fsw4jj","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fj5ik2o%2Fsw4jj/lists"}