{"id":23420857,"url":"https://github.com/vdbulcke/oauthx","last_synced_at":"2025-09-11T09:39:54.017Z","repository":{"id":269176699,"uuid":"900757793","full_name":"vdbulcke/oauthx","owner":"vdbulcke","description":"a fully-featured oauth2 client library","archived":false,"fork":false,"pushed_at":"2025-06-04T16:37:23.000Z","size":277,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-05T21:45:26.353Z","etag":null,"topics":["go","golang","oauth2","oauth2-client","oidc","openid-connect"],"latest_commit_sha":null,"homepage":"https://pkg.go.dev/github.com/vdbulcke/oauthx","language":"Go","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/vdbulcke.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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}},"created_at":"2024-12-09T12:20:37.000Z","updated_at":"2025-06-04T16:37:24.000Z","dependencies_parsed_at":"2024-12-21T14:35:23.078Z","dependency_job_id":"2a7ee910-1fed-49b3-867a-a907b46798e8","html_url":"https://github.com/vdbulcke/oauthx","commit_stats":null,"previous_names":["vdbulcke/oauthx"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/vdbulcke/oauthx","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vdbulcke%2Foauthx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vdbulcke%2Foauthx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vdbulcke%2Foauthx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vdbulcke%2Foauthx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vdbulcke","download_url":"https://codeload.github.com/vdbulcke/oauthx/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vdbulcke%2Foauthx/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266087789,"owners_count":23874518,"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":["go","golang","oauth2","oauth2-client","oidc","openid-connect"],"created_at":"2024-12-23T02:12:43.939Z","updated_at":"2025-07-20T08:04:53.007Z","avatar_url":"https://github.com/vdbulcke.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# `oauthx` a complete oauth2/oidc client library\n\n\u003e WARNING: 🚧 still under construction 🚧 \n\nimplements the following standards:\n\n- rfc6749/openid-connect-core: OAuth2/OIDC Authorization code flow \n- rfc7636: PKCE and `none` auth method\n- rfc6772: OAuth2 Token Introspection\n- draft-ietf-oauth-jwt-introspection-response-03: JWT Response for OAuth Token Introspection\n- rfc7009: OAuth2 Token Revocation\n- rfc8414: OAuth 2.0 Authorization Server Metadata \n- rfc6749: OAuth2 RefreshToken\n- rfc6749: `client_secret_basic`, `client_secret_post` auth method\n- rfc7523: OAuth2 `private_key_jwt` \n- rfc9101: JAR (`request=` jwt parameter)\n- rfc9126: Pushed Authorization Request (`request_uri` parameter)\n- rfc9396: RAR (`authorization_details`)\n- rfc9068: JSON Web Token (JWT) Profile for OAuth 2.0 Access Tokens (JWT AccessToken)\n- openid-connect-core: 3.1.3.7.  ID Token Validation\n- openid-connect-core: 3.1.3.8.  Access Token Validation\n- openid-connect-core: 5.5.   Requesting Claims using the \"claims\" Request Parameter`claims=`\n- openid-connect-core: 5.3.   UserInfo Endpoint\n- openid-connect-core: 5.1.   Standard Claims\n- openid-connect-discovery: `/.well-known/openid-configuration`\n- openid-connect-rpinitiated: RP initiated logout (endSession)\n\n## Documentation\n\nSee [godoc](https://pkg.go.dev/github.com/vdbulcke/oauthx) or [doc](doc/) dir.\n\n### Feature Examples\n\n#### Creating a OAuthClient with builtin AuthMethod\n\nBuiltin AuthMethod:\n\n- `none` (**default**)\n- `client_secret_basic`\n- `client_secret_post`\n- `private_key_jwt`\n\nSee [Getting Started](doc/README.md) example for more info\n\nYou can also create your own auth method by implementing a simple interface, see [Custom Auth Method](doc/custom_auth_method.md) for\nan example implementation of Bearer Token Auth Method for token introspection. \n\n#### Openid Connect Authorization Code Flow example\n\nSee [Authorization Code Flow](doc/authorization_code_flow.md) example for a sample\nimplementation of the authorization code flow using with go standard http handler, id_token validation, userinfo call.\n\n#### Other flows\n\n- [Client Credentials Grant Flow](doc/client_credentials.md)\n- [Refresh Token Grant Flow](doc/refresh_token.md)\n- [Token Introspection](doc/introspection.md)\n\n#### PAR (rfc9126)/JAR (rfc9101)/RAR (rfc9396) example\n\nThis library provides ergonomic api for adding support for Pushed Authorization Request, Jwt-secured Authorization Request (`request=` jwt),\nRich Authotization Request (`authorization_details`) in your authorization request by adding extra options to your `oauthx.AuthZRequest`.  \n\nSee [PAR RAR JAR](doc/par_rar_jar.md) example for more info.\n\n#### Http: client, tracing, custom header, custom error, response limit\n\nThis library has first class support for adding tracing header (and arbitrary headers) to http requests via `context.Context`.\n\nIt is encouraged to provide your own instance `*http.Client` with options.\n\nHttp and unmarshalling errors are returned using a custom `error` (`*oauthx.HttpErr`) that includes http response code, http response header, and\nhttp response body. It also as a builtin support for OAuth2 rfc6749 standard error. \n\nInspired by [tigerbeetle's Tiger Style](https://github.com/tigerbeetle/tigerbeetle/blob/main/docs/TIGER_STYLE.md) this library has http response size\nlimits (default `oauthx.LIMIT_HTTP_RESP_BODY_MAX_SIZE_BYTES`) that you can override by using `oauthx.WellKnownWithHttpClient()` and `oauthx.WithHttpClientWithLimit`\noptions for fetching the wellknown metadata, and the oauth client respectively.\n\n\nSee [http tunning](doc/http.md) for more info.\n\n### Tiger Style\n\nThis library is inspired by [tigerbeetle's Tiger Style](https://github.com/tigerbeetle/tigerbeetle/blob/main/docs/TIGER_STYLE.md) and implements some\nof the features, such as assertions and limits (on http responses).\n\nThe library has several assertion on input parameters, and will print as stacktrace on `stderr` then panic if one assertion fails (for example\npassing `nil` pointer as input).\n\n### Plumbing and Porcelain\n\nInspired by [git](https://git-scm.com/book/en/v2/Git-Internals-Plumbing-and-Porcelain), this library provides ergonomic \"porcelain\" api (it is\nrecommended to only use the \"procelain\" function), but it also exposes its internal \"plumbing\" functions.\n\nAll the \"plumbing\" function are prefixed with `Plumbing` (for example [PlumbingDoHttpPARRequest](https://pkg.go.dev/github.com/vdbulcke/oauthx#OAuthClient.PlumbingDoHttpPARRequest)).\nPlumbing functions can be used if you want to make your own http request, and parsing the http response.\n\n### other features\n\n- Supports ID Token encryption (Nested JWT), and/or signed\n- Builtin support for Remote Jwks Uri (with caching)\n- Support Userinfo encryption and/or signed (jwt) or JSON\n- Support Introspection encryption and/or signed (jwt) or JSON\n\n## Inspired by \n\n- https://github.com/ory/fosite\n- https://github.com/coreos/go-oidc\n- https://godoc.org/golang.org/x/oauth2\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvdbulcke%2Foauthx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvdbulcke%2Foauthx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvdbulcke%2Foauthx/lists"}