{"id":25002577,"url":"https://github.com/siberaindustries/odata.client.manager","last_synced_at":"2025-10-18T18:41:12.296Z","repository":{"id":65591174,"uuid":"216671690","full_name":"SiberaIndustries/OData.Client.Manager","owner":"SiberaIndustries","description":"OData client manager library which uses the IODataClient implementation of Simple.OData.Client to communicate with OData APIs and handles OIDC authentication as well as request versioning requirements on top.","archived":false,"fork":false,"pushed_at":"2023-01-30T21:18:01.000Z","size":106,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-26T06:23:41.094Z","etag":null,"topics":["api","authentication","csharp","netstandard","odata","rest","versioning"],"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/SiberaIndustries.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":"2019-10-21T21:50:13.000Z","updated_at":"2023-01-31T08:18:08.000Z","dependencies_parsed_at":"2023-02-16T11:45:48.534Z","dependency_job_id":null,"html_url":"https://github.com/SiberaIndustries/OData.Client.Manager","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SiberaIndustries%2FOData.Client.Manager","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SiberaIndustries%2FOData.Client.Manager/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SiberaIndustries%2FOData.Client.Manager/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SiberaIndustries%2FOData.Client.Manager/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SiberaIndustries","download_url":"https://codeload.github.com/SiberaIndustries/OData.Client.Manager/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248563186,"owners_count":21125224,"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","csharp","netstandard","odata","rest","versioning"],"created_at":"2025-02-04T21:53:02.894Z","updated_at":"2025-10-18T18:41:07.242Z","avatar_url":"https://github.com/SiberaIndustries.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ODataClientManager\n\n[![NuGet](https://img.shields.io/nuget/v/OData.Client.Manager.svg)](https://www.nuget.org/packages/OData.Client.Manager)\n[![.NET Core](https://github.com/SiberaIndustries/OData.Client.Manager/workflows/.NET%20Core/badge.svg)](https://github.com/SiberaIndustries/OData.Client.Manager/actions?query=workflow%3A%22.NET+Core%22)\n[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=SiberaIndustries_OData.Client.Manager\u0026metric=alert_status)](https://sonarcloud.io/dashboard?id=SiberaIndustries_OData.Client.Manager)\n[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=SiberaIndustries_OData.Client.Manager\u0026metric=coverage)](https://sonarcloud.io/dashboard?id=SiberaIndustries_OData.Client.Manager)\n\n## Purpose\n\nThis repository provides a C# based OData client manager library.\nThe Manager uses the `IODataClient` implementation of `Simple.OData.Client` to communicate with OData APIs and is able to handle authorization and versioning requirements.\n\n## Getting started\n\nThe easiest way to start using the `ODataManager` is to install the Nuget package:\n\n```sh\nInstall-Package OData.Client.Manager\n```\n\nIn the source file where you will be using `ODataManager` import the namespace:\n\n```cs\nusing OData.Client.Manager;\n```\n\n### Quickstart\n\nThe following code snipped shows an example of how to use the `IODataManger` implementation.\n\n```cs\n// Create the manager\nvar odataEndpoint = new Uri(\"http://localhost:12345/api\");\nvar manager = new ODataManager(odataEndpoint);\n\n// Use the client of the manager (example of the typed fluent API syntax)\nIEnumerable\u003cProduct\u003e entities = await manager.Client\n    .For\u003cProduct\u003e()\n    .FindEntriesAsync();\n\n// Use the client of the manager (example of the dynamic fluent API syntax)\nvar dx = ODataDynamic.Expression;\nIEnumerable\u003cdynamic\u003e entities = await manager.Client\n    .For(dx.Products)\n    .FindEntriesAsync();\n```\n\nFor more information about how to use the Odata client, please read the [Simple.OData.Client documentation](https://github.com/simple-odata-client/Simple.OData.Client/wiki).\n\n### Make use of autenticated and versioned requests\n\n* To make use of authentication use one of the existing authenticators in the `OData.Client.Manager.Authenticators` namespace, or create your own by implementing the `IAuthenticator` interface.\n* To make use of authentication, just use one of the existing managers in the `OData.Client.Manager.Versioning` namespace or create your own by implementing the `IVersioningManager` interface.\n\n```cs\n// Setup the configuration\nvar config = new ODataManagerConfiguration(new Uri(\"http://localhost:12345/api\"))\n{\n    // Authenticated requests\n    Authenticator = new OidcAuthenticator(new OidcSettings\n    {\n        AuthUri = new Uri(\"http://localhost:5000\"),\n        ClientId = \"ClientAppX\",\n        ClientSecret = \"Secret\",\n        Username = \"User\",\n        Password = \"Password\",\n        Scope = \"api1\",\n\n        GrantType = \"Password\", // Default\n        DiscoveryPolicy = new DiscoveryPolicy { RequireHttps = false },\n    }),\n\n    // Versioned requests\n    VersioningManager = new QueryParamVersioningManager(\"1.2\", \"api-version\")\n};\n\n// Use the configuration in the ctor of the manager\nvar manager = new ODataManager(config);\n```\n\n## FAQ\n\n1. Why do I get the error `Https required`?\n    * OIDC endpoints must provide an encrypted connection (https) by default (except URIs of localhost). To disable this requirement, make use of the `OidcSettings` and set `RequireHttps` of the `DiscoveryPolicy` property to `false`: `settings.DiscoveryPolicy = new DiscoveryPolicy { RequireHttps = requireHttps };`.\n\n## Links\n\n* OData: \u003chttp://www.odata.org/getting-started\u003e or \u003chttps://docs.microsoft.com/odata\u003e\n* Simple.OData.Client: \u003chttps://github.com/simple-odata-client/Simple.OData.Client/wiki\u003e\n* IdentityModel: \u003chttps://identitymodel.readthedocs.io\u003e\n* OIDC: \u003chttps://openid.net/connect\u003e\n\n## Open Source License Acknowledgements and Third-Party Copyrights\n\n* Icon made by [Freepik](https://www.flaticon.com/authors/freepik)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsiberaindustries%2Fodata.client.manager","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsiberaindustries%2Fodata.client.manager","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsiberaindustries%2Fodata.client.manager/lists"}