{"id":32141185,"url":"https://github.com/scitokens/scitokens-cpp","last_synced_at":"2026-03-08T21:06:14.361Z","repository":{"id":37951650,"uuid":"163779056","full_name":"scitokens/scitokens-cpp","owner":"scitokens","description":"A C++ implementation of the SciTokens library with a C library interface","archived":false,"fork":false,"pushed_at":"2026-03-07T16:57:51.000Z","size":14345,"stargazers_count":5,"open_issues_count":35,"forks_count":22,"subscribers_count":9,"default_branch":"master","last_synced_at":"2026-03-07T22:36:47.587Z","etag":null,"topics":["jwt","oauth2","scitokens"],"latest_commit_sha":null,"homepage":"http://scitokens.org/scitokens-cpp/","language":"C++","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/scitokens.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":"2019-01-02T01:11:43.000Z","updated_at":"2026-02-26T21:26:18.000Z","dependencies_parsed_at":"2026-01-15T00:04:36.793Z","dependency_job_id":null,"html_url":"https://github.com/scitokens/scitokens-cpp","commit_stats":{"total_commits":181,"total_committers":21,"mean_commits":8.619047619047619,"dds":0.6187845303867403,"last_synced_commit":"888956ae8c2c6c6bf1f34c92442ea1c7db3c8b1c"},"previous_names":[],"tags_count":31,"template":false,"template_full_name":null,"purl":"pkg:github/scitokens/scitokens-cpp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scitokens%2Fscitokens-cpp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scitokens%2Fscitokens-cpp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scitokens%2Fscitokens-cpp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scitokens%2Fscitokens-cpp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/scitokens","download_url":"https://codeload.github.com/scitokens/scitokens-cpp/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scitokens%2Fscitokens-cpp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30273329,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-08T20:45:49.896Z","status":"ssl_error","status_checked_at":"2026-03-08T20:45:49.525Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":["jwt","oauth2","scitokens"],"created_at":"2025-10-21T06:12:49.566Z","updated_at":"2026-03-08T21:06:14.356Z","avatar_url":"https://github.com/scitokens.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"\nSciTokens C++ Library\n=====================\n\nThis repository implements a minimal library for creating and using SciTokens from C or C++.\n\n[SciTokens](https://scitokens.org) provide a token format for distributed authorization.  The\ntokens are self-describing, can be verified in a distributed fashion (no need to contact the\nissuer to determine if the token is valid).  This is convenient for a federated environment where\nseveral otherwise-independent storage endpoints want to delegate trust for an issuer for\nmanaging a storage allocation.\n\nBuilding\n--------\n\nTo build the `scitokens-cpp` library, the following dependencies are needed:\n\n   - [jwt-cpp] v0.5.0 or later (https://github.com/Thalhammer/jwt-cpp): A header-only C++ library for manipulating\n     JWTs.\n   - OpenSSL 1.0 or later.\n   - `sqlite3`\n\nCMake is used for the build system.  To build, from the source directory:\n\n```\nmkdir build\ncd build\nJWT_CPP_DIR=~/path/to/jwt-cpp cmake ..\nmake\n```\n\nTesting\n-------\n\nThe easiest way to test `scitokens-cpp` is to head to the [SciTokens Demo app](https://demo.scitokens.org)\nand copy the generated token.  Then, from the build directory:\n\n```\necho \"\u003cyour_token_here\u003e\" | ./scitokens-verify\n```\n\nReplace the given token above with the fresh one you just generated; using the above token should give an expired\ntoken error. The token must be provided via standard input (stdin).\n\nGenerating Keys for Testing\n----------------------------\n\nFor testing and development purposes, you can generate EC (ES256) key pairs using the `scitokens-generate-jwks` tool:\n\n```\n./scitokens-generate-jwks --kid my-key-id --jwks jwks.json --private private.pem --public public.pem\n```\n\nThis generates:\n- `jwks.json`: A JWKS (JSON Web Key Set) file containing the public key\n- `public.pem`: The public key in PEM format\n- `private.pem`: The private key in PEM format\n\nYou can then create and verify tokens using these keys:\n\n```\n# Create a token\n./scitokens-create --cred public.pem --key private.pem --keyid my-key-id --issuer https://my-issuer.example.com --claim \"sub=testuser\"\n\n# Verify the token\necho \"\u003ctoken\u003e\" | ./scitokens-verify --cred public.pem --issuer https://my-issuer.example.com --keyid my-key-id\n```\n\nInstructions for Generating a Release\n-------------------------------------\n\nSciTokens-cpp includes a submodule, jwt-cpp.  Therefore, to create a release, you have to include the submodule into the release.\n\n    VER=0.3.3 # for example\n    git archive --prefix \"scitokens-cpp-$VER/\" -o \"scitokens-cpp-$VER.tar\" v$VER\n    git submodule update --init\n    git submodule foreach --recursive \"git archive --prefix=scitokens-cpp-$VER/\\$path/ --output=\\$sha1.tar HEAD \u0026\u0026 tar --concatenate --file=$(pwd)/scitokens-cpp-$VER.tar \\$sha1.tar \u0026\u0026 rm \\$sha1.tar\"\n    gzip \"scitokens-cpp-$VER.tar\"\n\nBefore tagging a new release, make sure that the RPM spec file has an updated\nversion number and an associated changelog entry.\nAlso, make sure that the ``debian/changelog`` has an entry that matches the\nRPM changelog entry.\n\nThis package is built on the\n[cvmfs-config OpenSUSE Build Service](https://build.opensuse.org/project/show/home:cvmfs:contrib).\nIn order to support that run `debian/obsupdate.sh` whenever the version\nor release number is changed in `rpm/scitokens-cpp.spec`, and commit the\ngenerated `debian/scitokens-cpp.dsc` before tagging the release.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscitokens%2Fscitokens-cpp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fscitokens%2Fscitokens-cpp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscitokens%2Fscitokens-cpp/lists"}