{"id":28479938,"url":"https://github.com/hrz8/simpath","last_synced_at":"2025-10-10T18:06:17.188Z","repository":{"id":289851830,"uuid":"859741661","full_name":"hrz8/simpath","owner":"hrz8","description":"It's a simple auth identity provider built using Golang","archived":false,"fork":false,"pushed_at":"2024-09-29T13:49:11.000Z","size":125,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-30T16:51:16.694Z","etag":null,"topics":["golang","identityserver","oauth2","oauth2-server"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hrz8.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2024-09-19T07:47:26.000Z","updated_at":"2024-09-29T13:49:14.000Z","dependencies_parsed_at":"2025-04-25T11:52:03.739Z","dependency_job_id":"94678483-4cc4-40a6-8100-44e094262adb","html_url":"https://github.com/hrz8/simpath","commit_stats":null,"previous_names":["hrz8/simpath"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/hrz8/simpath","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hrz8%2Fsimpath","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hrz8%2Fsimpath/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hrz8%2Fsimpath/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hrz8%2Fsimpath/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hrz8","download_url":"https://codeload.github.com/hrz8/simpath/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hrz8%2Fsimpath/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279004906,"owners_count":26083802,"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","status":"online","status_checked_at":"2025-10-10T02:00:06.843Z","response_time":62,"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","identityserver","oauth2","oauth2-server"],"created_at":"2025-06-07T18:33:50.858Z","updated_at":"2025-10-10T18:06:17.172Z","avatar_url":"https://github.com/hrz8.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# simpath\n\nIt's a simple OAuth2 server and OIDC server implementation using Golang.\n\nInspired by [go-oauth2-server](https://github.com/RichardKnop/go-oauth2-server)\n\n## Setup\n```sh\n./gen_jwt.sh # this will print env var jwt related into your stdout\n# then set env var\n```\n\n## Run\n```bash\n# start mock client (this client is plain)\ngo run ./cmd/client # start at 8088\n# start oauth client (this client using golang oauth2 library)\ngo run ./cmd/oauthclient # start at 8089\n# start oauth server\ngo run ./cmd/server\n```\n\n## Web\nOpen your favorite browser\n```md\nhttp://localhost:8089 or http://localhost:8088/signin\n# this will redirect you to\nhttp://localhost:5001/v1/oauth2/authorize?client_id=600ef080-d02c-426d-bf79-64247ba0fc90\u0026login_redirect_uri=%2Fv1%2Fauthorize\u0026redirect_uri=http%3A%2F%2Flocalhost%3A8088%2Fsignin\u0026scope=read_write\u0026state=somestate\n```\n\nLogin with\n```\nEmail: test@root\nPassword: test_password\n```\n\n## How to exchange access token\n\n### Using authorization code\nForm Url-Encoded (Standard)\n```sh\ncurl -X POST \"localhost:5001/v1/oauth2/token\" \\\n     -u \"600ef080-d02c-426d-bf79-64247ba0fc90:test_secret\" \\\n     -d \"grant_type=authorization_code\" \\\n     -d \"code=66a97c2b-c3e7-4ab8-bd0b-2dbffb5e70b9\" \\\n     -d \"redirect_uri=http://localhost:8088/signin\"\n```\n\nJSON (Non Standard)\n```sh\ncurl -X POST \"localhost:5001/v1/oauth2/external/token\" \\\n     -u \"600ef080-d02c-426d-bf79-64247ba0fc90:test_secret\" \\\n     -H \"Content-Type: application/json\" \\\n     -d '{\n           \"grant_type\": \"authorization_code\",\n           \"code\": \"66a97c2b-c3e7-4ab8-bd0b-2dbffb5e70b9\",\n           \"redirect_uri\": \"http://localhost:8088/signin\"\n         }'\n```\n\n### Using refresh token\n```sh\ncurl -X POST \"localhost:5001/v1/oauth2/token\" \\\n     -u \"600ef080-d02c-426d-bf79-64247ba0fc90:test_secret\" \\\n     -H \"Content-Type: application/json\" \\\n     -d '{\n           \"grant_type\": \"refresh_token\",\n           \"refresh_token\": \"0070bcd5-278b-4c58-9d85-1b9b0afdc3c9\"\n         }'\n```\n\n### Using user's credentials\n```sh\ncurl -X POST \"localhost:5001/v1/oauth2/token\" \\\n     -u \"600ef080-d02c-426d-bf79-64247ba0fc90:test_secret\" \\\n     -H \"Content-Type: application/json\" \\\n     -d '{\n           \"grant_type\": \"refresh_token\",\n           \"email\": \"test@root\",\n           \"password\": \"test_password\",\n           \"scope\": \"read_write\"\n         }'\n```\n\n## Introspect Token\n\n## Using Access Token\n```sh\ncurl -X POST \"localhost:5001/v1/oauth2/introspect\" \\\n     -u \"600ef080-d02c-426d-bf79-64247ba0fc90:test_secret\" \\\n     -H \"Content-Type: application/json\" \\\n     -d '{\n           \"token\": \"b59f9c78-57be-44f2-8cf2-5e2506d2d3bb\",\n           \"token_type_hint\": \"access_token\"\n         }'\n```\n\n## Using Refresh Token\n```sh\ncurl -X POST \"localhost:5001/v1/oauth2/introspect\" \\\n     -u \"600ef080-d02c-426d-bf79-64247ba0fc90:test_secret\" \\\n     -H \"Content-Type: application/json\" \\\n     -d '{\n           \"token\": \"ced70797-3566-464f-ba36-344ace1811f6\",\n           \"token_type_hint\": \"refresh_token\"\n         }'\n```\n\n## OIDC\n\n### Fetch User Info\n```sh\ncurl http://localhost:5001/v1/oauth2/userinfo \\\n     -H \"Authorization: Bearer \u003caccess_token\u003e\"\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhrz8%2Fsimpath","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhrz8%2Fsimpath","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhrz8%2Fsimpath/lists"}