{"id":24526026,"url":"https://github.com/halomakes/abenity.members","last_synced_at":"2025-03-15T15:41:15.326Z","repository":{"id":40885280,"uuid":"251750152","full_name":"halomakes/Abenity.Members","owner":"halomakes","description":".NET Standard Library for interacting with the Abenity Members API","archived":false,"fork":false,"pushed_at":"2022-12-07T20:32:33.000Z","size":57,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-22T05:31:49.628Z","etag":null,"topics":["abenity","api-client","netstandard20"],"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/halomakes.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-03-31T21:46:20.000Z","updated_at":"2021-02-12T20:22:22.000Z","dependencies_parsed_at":"2023-01-24T22:15:13.339Z","dependency_job_id":null,"html_url":"https://github.com/halomakes/Abenity.Members","commit_stats":null,"previous_names":["halomademeapc/abenity.members"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/halomakes%2FAbenity.Members","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/halomakes%2FAbenity.Members/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/halomakes%2FAbenity.Members/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/halomakes%2FAbenity.Members/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/halomakes","download_url":"https://codeload.github.com/halomakes/Abenity.Members/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243753989,"owners_count":20342537,"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":["abenity","api-client","netstandard20"],"created_at":"2025-01-22T05:29:32.480Z","updated_at":"2025-03-15T15:41:15.303Z","avatar_url":"https://github.com/halomakes.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Abenity.Members [![Version](https://img.shields.io/nuget/v/Abenity.Members)](https://www.nuget.org/packages/Abenity.Members/) [![Downloads](https://img.shields.io/nuget/dt/Abenity.Members)](https://www.nuget.org/packages/Abenity.Members/) [![Build Status](https://api.travis-ci.org/halomademeapc/Abenity.Members.svg?branch=master)](https://travis-ci.org/github/halomademeapc/Abenity.Members)\n.NET Standard API Client for interacting with the [Abenity Members API](https://abenity.com/developers/api/members)\nThis is offered as an alternative to the office [abenity-csharp](https://github.com/Abenity/abenity-csharp) library with some enhancements.\n\n## Configuration\nThe following information is required to authenticate SSO requests.  \n1. API credentials. Specifically: **username**, **password** and **key**. You get these values from Abenity.\n2. A public and private key. _You_ need to generate these, and send your public key to Abenity to associate with your account.\n\nProvided below is an example configuration section.  Note that the key entries are paths to files containing the key information, not the keys themselves.\n```json\n\"Abenity\": {\n    \"UseProduction\": false,\n    \"KeyPaths\": {\n        \"PrivateKeyFilePath\": \"./keys/private.pem\",\n        \"PublicKeyFilePath\": \"./keys/public.pem\"\n    },\n    \"Credentials\": {\n        \"Username\": \"abcd\",\n        \"Password\": \"abcde12345^\u0026*\",\n        \"Key\": \"abcdef\"\n    }\n}\n```\n*Note that the keys are required to be in the PKCS1 format*\n\n## Example Usage\nRegister the API Client in your application's service provider\n```csharp\nvar config = new AbenityConfiguration();\nConfiguration.Bind(\"Abenity\", config);\nservices.AddSingleton(config);\n\nservices.AddHttpClient();\nservices.AddScoped\u003cIAbenityMembersApiClient, AbenityMembersApiClient\u003e();\n```\n\nInject it into your service/controller and make a call\n```csharp\nprivate readonly IAbenityMembersApiClient membersClient;\n\npublic MyService(IAbenityMembersApiClient membersClient) {\n    this.membersClient = membersClient;\n}\n\npublic async Task\u003cIActionResult\u003e GoToAbenity() {\n    var userInfo = myUserInfoService.GetCurrentUserInfo().ToAbenityRequest();\n    var result = await membersClient.AuthenticateUserAsync(userInfo);\n    return Redirect(result.Url);\n}\n```\n\n## Comparison with [`abenity-csharp`](https://github.com/Abenity/abenity-csharp)\nThis libary is based on the official package provided by Abenity and shares most of its authentication code with that library, but offers several key improvements:\n* **Fuller Endpoint Support** - The official library only supports SSO authentication calls.  In this library, methods for calling the *deauthorize* and *reauthorize* user endpoints are also provided.\n* **Typed Responses** - The official library just spits out a string as a response to SSO authentication requests and it's up to you to parse them.  This library, by contrast, will provide a typed object for you to access.  If something goes wrong, you get a typed exception with the details populated based on the response from the API, removing some of the guesswork.  This is handled by Json.NET using stream deserialization after header transfer for optimal performance.  \n* **Out-of-the-box Dependency Injection Support** - Configuration is bundled into a single object for easy injection and the API client can accept an HttpClient from an IHttpClientFactory for optimal efficiency\n* **Better File Handling** - The official library opens the key files at construction and never explicitly closes them.  In this library, file reads are correctly scoped so they are only open for a minimal amount of time.\n* **Enhanced Documentation** - XML Comments are provided on public-facing models and methods to help guide usage.  \n\n## Dependencies\n* **BouncyCastle** 1.8.5+\n* **Newtonsoft.Json** 10.0.3+\n* **System.ComponentModel.Annotations** 4.7.0+\n\n## Changelog\n**1.0.0** Initial Release","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhalomakes%2Fabenity.members","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhalomakes%2Fabenity.members","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhalomakes%2Fabenity.members/lists"}