{"id":30032315,"url":"https://github.com/eclipse-xfsc/ssi-jwt","last_synced_at":"2026-06-09T03:07:38.019Z","repository":{"id":288801399,"uuid":"963959863","full_name":"eclipse-xfsc/ssi-jwt","owner":"eclipse-xfsc","description":"This library contains common JWT extensions for usage in SSI context.","archived":false,"fork":false,"pushed_at":"2026-01-19T17:27:04.000Z","size":78,"stargazers_count":0,"open_issues_count":3,"forks_count":0,"subscribers_count":7,"default_branch":"main","last_synced_at":"2026-05-12T08:53:23.207Z","etag":null,"topics":["golang","jwt","ssi"],"latest_commit_sha":null,"homepage":null,"language":"Go","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/eclipse-xfsc.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":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-04-10T13:28:02.000Z","updated_at":"2025-11-26T17:14:51.000Z","dependencies_parsed_at":"2025-04-24T00:45:28.017Z","dependency_job_id":null,"html_url":"https://github.com/eclipse-xfsc/ssi-jwt","commit_stats":null,"previous_names":["eclipse-xfsc/ssi-jwt"],"tags_count":9,"template":false,"template_full_name":null,"purl":"pkg:github/eclipse-xfsc/ssi-jwt","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eclipse-xfsc%2Fssi-jwt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eclipse-xfsc%2Fssi-jwt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eclipse-xfsc%2Fssi-jwt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eclipse-xfsc%2Fssi-jwt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eclipse-xfsc","download_url":"https://codeload.github.com/eclipse-xfsc/ssi-jwt/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eclipse-xfsc%2Fssi-jwt/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34089436,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-09T02:00:06.510Z","response_time":63,"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":["golang","jwt","ssi"],"created_at":"2025-08-06T21:17:26.011Z","updated_at":"2026-06-09T03:07:38.015Z","avatar_url":"https://github.com/eclipse-xfsc.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# JWT\n\n## Introduction\n\nThis library contains common JWT extensions for usage in SSI context. \n\n## Self Signed Token\n\nTo create a self signed token use the following: \n\n```\nheaders := jws.NewHeaders()\nheaders.Set(\"jwk\", pubkey)\nsigned, err := jwt.Sign(tok, jwt.WithKey(jwa.PS256, privkey, jws.WithProtectedHeaders(headers)))\n\n```\n\nTo verify the Self signed token use: \n\n```\ntoken, err := self.ParseSelfSigned(string(signed))\n```\n\nOptions can be appended by using: \n\n```\noptions = append(options, ljwt.WithAudience(\"http://test\"))\ntoken, err := self.ParseSelfSigned(string(signed),options)\n```\n\n## Use of multiple JWKS/DID Key Verifications\n\nThe library extends the standard JWKS fetching by adding support for multiple sources (multiple Authorization Servers). The sources can be DIDs or JWKS Urls.\n\nDID Usage: \n\n```\ndidFetcher := new(fetcher.DidFetcher)\nerr = didFetcher.Initialize([]string{\"did:web:12345\"}, time.Second)\n\nif err != nil {\n\t\tt.Error()\n}\n\njwt.RegisterFetcher(\"DID1\", didFetcher)\n```\n\nor \n\nJWKS Usage:\n\n```\njwksFetcher := new(fetcher.JwksFetcher)\njwksFetcher.Initialize([]string{jwks.URL}, time.Second)\n\njwt.RegisterFetcher(\"JWKS1\", jwksFetcher)\n```\n\nwithin the API:\n\n```\ntok, err := jwt.ParseRequest(r)\n```\n\nSources will be cached and updated automatically.\n\n## Use of External Crypto Provider\n\nTo sign tokens with external providers the signing interceptor can be enabled/disabled by using: \n\n```\nEnableCryptoProvider(\"yournamespace\", provider)\nDisableCryptoProvider()\n```\n\nAfter this, a normal signing and verify action can be used, with the only difference that the \"key\" in \"WithKey\" function must carry the keyID of the key in the cryptoprovider namespace. The cryptoprovider will intercept all signing/verify calls and redirect it to the external provider.\n\n```\nsigned, err := jwt.Sign(tok, jwt.WithKey(jwa.PS256, \"tenant_space:testK\"))\n```\n\nNote: the namespace is the first part of the key followed by \":\" and the key name. Means for namespace and group namespace/test:key1\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feclipse-xfsc%2Fssi-jwt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feclipse-xfsc%2Fssi-jwt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feclipse-xfsc%2Fssi-jwt/lists"}