{"id":19099747,"url":"https://github.com/huysentruitw/oauth2-client-handler","last_synced_at":"2025-04-09T20:08:58.024Z","repository":{"id":38008689,"uuid":"51784528","full_name":"huysentruitw/oauth2-client-handler","owner":"huysentruitw","description":"Managed .NET (C#) library for use with HttpClient to transparantly call authorized WebAPI","archived":false,"fork":false,"pushed_at":"2024-08-24T15:40:19.000Z","size":52,"stargazers_count":33,"open_issues_count":2,"forks_count":26,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-09T20:08:52.844Z","etag":null,"topics":["api","authentication","dotnet","httpclient","oauth2","oauth2-client","openid-connect"],"latest_commit_sha":null,"homepage":"","language":"C#","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/huysentruitw.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}},"created_at":"2016-02-15T20:47:16.000Z","updated_at":"2025-01-11T23:20:32.000Z","dependencies_parsed_at":"2024-08-24T17:08:57.876Z","dependency_job_id":null,"html_url":"https://github.com/huysentruitw/oauth2-client-handler","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/huysentruitw%2Foauth2-client-handler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/huysentruitw%2Foauth2-client-handler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/huysentruitw%2Foauth2-client-handler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/huysentruitw%2Foauth2-client-handler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/huysentruitw","download_url":"https://codeload.github.com/huysentruitw/oauth2-client-handler/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248103872,"owners_count":21048245,"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":["api","authentication","dotnet","httpclient","oauth2","oauth2-client","openid-connect"],"created_at":"2024-11-09T03:52:14.730Z","updated_at":"2025-04-09T20:08:57.993Z","avatar_url":"https://github.com/huysentruitw.png","language":"C#","funding_links":[],"categories":["api","dotnet"],"sub_categories":[],"readme":"# OAuth2 Client Handler\n\n[![Build status](https://ci.appveyor.com/api/projects/status/9fepyg7kuhgmulh1/branch/master?svg=true)](https://ci.appveyor.com/project/huysentruitw/oauth2-client-handler/branch/master)\n\nManaged .NET library for use with HttpClient to transparantly call authorized remote API protected with OAuth2 or OpenID Connect.\n\nSupports .NET Framework 4.5+ and .NET Standard / .NET Core.\n\n## Get it on NuGet\n\n    PM\u003e Install-Package OAuth2ClientHandler\n\n## Usage\n\n```C#\nvar options = new OAuthHttpHandlerOptions\n{\n    AuthorizerOptions = new AuthorizerOptions\n    {\n        AuthorizeEndpointUrl = new Uri(\"http://localhost/authorizer\"),\n        TokenEndpointUrl = new Uri(\"http://localhost/token\"),\n        ClientId = \"MyId\",\n        ClientSecret = \"MySecret\",\n        GrantType = GrantType.ClientCredentials\n    }\n};\n\nusing (var client = new HttpClient(new OAuthHttpHandler(options)))\n{\n    client.BaseAddress = new Uri(\"http://localhost\");\n    var response = await client.GetAsync(\"/api/protected_api_call\");\n    // ...\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhuysentruitw%2Foauth2-client-handler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhuysentruitw%2Foauth2-client-handler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhuysentruitw%2Foauth2-client-handler/lists"}