{"id":13562535,"url":"https://github.com/imduffy15/token-cli","last_synced_at":"2026-01-28T19:11:45.739Z","repository":{"id":46788192,"uuid":"129807350","full_name":"imduffy15/token-cli","owner":"imduffy15","description":"Command line utility for interacting with OAuth2 infrastructure to generate tokens","archived":false,"fork":false,"pushed_at":"2022-10-26T15:46:45.000Z","size":2652,"stargazers_count":19,"open_issues_count":1,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-03T18:42:03.429Z","etag":null,"topics":["authentication","authn","authorization","authz","cli","iap","identity","jwt","oauth2","oidc","sso","token"],"latest_commit_sha":null,"homepage":"","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/imduffy15.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}},"created_at":"2018-04-16T21:22:09.000Z","updated_at":"2022-10-26T15:46:49.000Z","dependencies_parsed_at":"2022-09-11T02:23:48.137Z","dependency_job_id":null,"html_url":"https://github.com/imduffy15/token-cli","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/imduffy15/token-cli","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imduffy15%2Ftoken-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imduffy15%2Ftoken-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imduffy15%2Ftoken-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imduffy15%2Ftoken-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/imduffy15","download_url":"https://codeload.github.com/imduffy15/token-cli/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/imduffy15%2Ftoken-cli/sbom","scorecard":{"id":485359,"data":{"date":"2025-08-11","repo":{"name":"github.com/imduffy15/token-cli","commit":"e26b2968f6cf3a6e455593bdd3e9c39823ef81b3"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.7,"checks":[{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","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":"Code-Review","score":0,"reason":"Found 0/12 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":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"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":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"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":"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":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"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":-1,"reason":"no dependencies found","details":null,"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":"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":"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":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: 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":0,"reason":"Project has not signed or included provenance with any releases.","details":["Warn: release artifact v1.0.0 not signed: https://api.github.com/repos/imduffy15/token-cli/releases/49009518","Warn: release artifact v0.0.7 not signed: https://api.github.com/repos/imduffy15/token-cli/releases/21347315","Warn: release artifact v0.0.6 not signed: https://api.github.com/repos/imduffy15/token-cli/releases/21169406","Warn: release artifact v0.0.5 not signed: https://api.github.com/repos/imduffy15/token-cli/releases/15002897","Warn: release artifact v0.0.4 not signed: https://api.github.com/repos/imduffy15/token-cli/releases/14560160","Warn: release artifact v1.0.0 does not have provenance: https://api.github.com/repos/imduffy15/token-cli/releases/49009518","Warn: release artifact v0.0.7 does not have provenance: https://api.github.com/repos/imduffy15/token-cli/releases/21347315","Warn: release artifact v0.0.6 does not have provenance: https://api.github.com/repos/imduffy15/token-cli/releases/21169406","Warn: release artifact v0.0.5 does not have provenance: https://api.github.com/repos/imduffy15/token-cli/releases/15002897","Warn: release artifact v0.0.4 does not have provenance: https://api.github.com/repos/imduffy15/token-cli/releases/14560160"],"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"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":"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"}}]},"last_synced_at":"2025-08-19T17:37:19.326Z","repository_id":46788192,"created_at":"2025-08-19T17:37:19.326Z","updated_at":"2025-08-19T17:37:19.326Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28849544,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-28T15:15:36.453Z","status":"ssl_error","status_checked_at":"2026-01-28T15:15:13.020Z","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","authn","authorization","authz","cli","iap","identity","jwt","oauth2","oidc","sso","token"],"created_at":"2024-08-01T13:01:09.664Z","updated_at":"2026-01-28T19:11:45.702Z","avatar_url":"https://github.com/imduffy15.png","language":"Go","readme":"[![GitHub license](https://img.shields.io/github/license/imduffy15/token-cli.svg)](https://github.com/imduffy15/token-cli/blob/master/LICENSE)\n![GitHub release](https://img.shields.io/github/release/imduffy15/token-cli.svg)\n\n# TokenCLI\n\n_tokenCLI_ is a command line utility for generating tokens from a OpenID identity provider, such as [Keycloak](https://www.keycloak.org/).\n\n_tokenCLI_ uses the [Authorization Code Grant Flow](https://developer.okta.com/authentication-guide/implementing-authentication/auth-code), as such a refresh token is generated and used to automatically renew the access token without browser interaction.\n\n![token-cli - The OpenID token generator](images/walkthrough.gif)\n\n## Installation\n\n### OSX\n\nInstall:\n\n```\nbrew install imduffy15/tap/token-cli\n```\n\nUpgrade:\n\n```\nbrew upgrade token-cli\n```\n\n\n## Alternative Installs (tar.gz, RPM, deb, snap)\nCheck out the [releases](https://github.com/imduffy15/token-cli/releases) section on Github for alternative binaries.\n\n## Contribute\n[Fork token-cli](https://github.com/imduffy15/token-cli) and build a custom version. We welcome any useful pull requests.\n\n## Usage\n\nCreate a new target called example-realm:\n\n```\n$ token-cli target create example-realm -t http://localhost:8080/auth/realms/example-realm/.well-known/openid-configuration\n```\n\nSet example-realm as the active target:\n\n```\n$ token-cli target set example-realm\n```\n\nGet a token for the client \"service-template\" with redirection port 9090\n\n```\n$ token-cli token get service-template -p 9090\n```\n\n## Examples\n\n### Google\n\nAdd Google as a target and set it as the active target\n\n```\n$ token-cli target create google --openid-configuration-url https://accounts.google.com/.well-known/openid-configuration\n$ token-cli target set google\n```\n\nGenerate a token for client-id `571394967398-j6vs98u325la013f0ho6hehosdi2h2eb.apps.googleusercontent.com` with scope openid\n\n```\n$ token-cli token get 571394967398-j6vs98u325la013f0ho6hehosdi2h2eb.apps.googleusercontent.com --scope openid\n```\n\nYou can register Google clients at https://console.cloud.google.com/apis/credentials\n\n### Microsoft\n\nAdd Microsoft as a target and set it as the active target\n\n```\n$ token-cli target create microsoft --openid-configuration-url https://login.microsoftonline.com/common/v2.0/.well-known/openid-configuration\n$ token-cli target set microsoft\n```\n\nGenerate a token for client-id `b9951982-9e22-4bb8-8632-436f47b030f4`\n\n```\n$ token-cli token get b9951982-9e22-4bb8-8632-436f47b030f4 --client_secret 'uNmN9EdyV0HpcT@Sel.v[4LH2mRs@/bH'\n```\n\nYou can register Microsoft clients at https://portal.azure.com/#blade/Microsoft_AAD_IAM/ActiveDirectoryMenuBlade/RegisteredApps , this target is for `(Any Azure AD directory - Multitenant) and personal Microsoft accounts (e.g. Skype, Xbox)` authorization only.\n\n\n### Azure AD\n\nAdd Azure AD as a target, where `960a630a-dab4-4fd9-a048-88eddede726d` is my tenant id and set it as the active target\n\n```\n$ token-cli target create azure --openid-configuration-url https://login.microsoftonline.com/960a630a-dab4-4fd9-a048-88eddede726d/v2.0/.well-known/openid-configuration\n$ token-cli target set azure\n```\n\nGenerate a token for client-id `90a49166-df3b-46a9-bb20-155f4055ef83`\n\n```\n$ token-cli token get 90a49166-df3b-46a9-bb20-155f4055ef83 --client_secret 'pGw]yxRb:fww-fk?X2uskpfSPlHXV559'\n```\n\nYou can register Azure AD clients at https://portal.azure.com/#blade/Microsoft_AAD_IAM/ActiveDirectoryMenuBlade/RegisteredApps , this target is for `(Default Directory only - Single tenant)` authorization only.\n\n### Okta\n\nAdd Okta as a target and set it as the active target\n\n```\n$ token-cli target create okta --openid-configuration-url https://dev-351390-admin.oktapreview.com/.well-known/openid-configuration\n$ token-cli target set okta\n```\n\nGenerate a token for client-id `0oaodg6in82hvS2uV0h7`\n\n```\n$ token-cli token get 0oaodg6in82hvS2uV0h7 --client_secret '8XojWRVjegSMh8hzmZZ-NIq-9ur6fauRDPk-Rv-k'\n```\n\nYou can register OKTA clients in your personal dashboard at https://TENANT-ID-admin.oktapreview.com/admin/apps/active , where tenant-id is your tenant id.\n\n### Instagram\n\nAdd Instagram as as target and set it as the active target\n\n```\n$ token-cli target create instagram --token-url https://api.instagram.com/oauth/access_token --authorization-url https://api.instagram.com/oauth/authorize\n$ token-cli target set instagram\n```\n\nGenerate a token for client-id `c3b3514c9a614b53b6f393b7dc3f7459`\n\n```\n$ token-cli token get c3b3514c9a614b53b6f393b7dc3f7459 --client_secret 4dfdef8221284c2480c8d71cea00d0b2  --scope basic\n```\n\nYou can register Instagram clients at https://www.instagram.com/developer/clients/manage/\n\n### Strava\n\n```\n$ token-cli target create strava --token-url https://www.strava.com/oauth/token --authorizaion-url http://www.strava.com/oauth/authorize\n$ token-cli target set strava\n```\n\nGenerate a token for client-id `40638`\n\n```\ntoken-cli token get 40638 --client_secret e36b1089bfe26c8010cd10eabe419c96493c412b --scope read\n```\n\nYou can register Strava clients at https://www.strava.com/settings/api\n\n## Help\n\n```bash\n$ token-cli --help\nToken Command Line Interface, version\n\nUsage:\n  token-cli [command]\n\nAvailable Commands:\n  help        Help about any command\n  target      Configure and view OIDC targets\n  token       Configure and view tokens\n\nFlags:\n  -h, --help      help for token-cli\n  -v, --verbose   See additional info on HTTP requests\n\nUse \"token-cli [command] --help\" for more information about a command.\n```\n\n```bash\n$ token-cli target --help\nConfigure and view OIDC targets\n\nUsage:\n  token-cli target [flags]\n  token-cli target [command]\n\nAvailable Commands:\n  create      Creates a new target\n  delete      Delete the target named TARGET_NAME\n  get         View the target named TARGET_NAME\n  list        List all targets\n  set         sets TARGET_NAME as active\n\nFlags:\n  -h, --help                  help for target\n  -k, --skip-ssl-validation   Disable security validation on requests to this target\n\nGlobal Flags:\n  -v, --verbose   See additional info on HTTP requests\n\nUse \"token-cli target [command] --help\" for more information about a command.\n```\n\n```bash\n$ token-cli token --help\nConfigure and view tokens\n\nUsage:\n  token-cli token [command]\n\nAvailable Commands:\n  get         Obtain a token for the specified CLIENT_ID\n\nFlags:\n  -h, --help   help for token\n\nGlobal Flags:\n  -v, --verbose   See additional info on HTTP requests\n\nUse \"token-cli token [command] --help\" for more information about a command.\n```\n\n## License \n\nApache License 2.0  \n","funding_links":[],"categories":["Go"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimduffy15%2Ftoken-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fimduffy15%2Ftoken-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimduffy15%2Ftoken-cli/lists"}