{"id":26068294,"url":"https://github.com/ssoready/ssoready-csharp","last_synced_at":"2025-04-11T18:07:54.307Z","repository":{"id":268249099,"uuid":"870919619","full_name":"ssoready/ssoready-csharp","owner":"ssoready","description":"C# SDK for SSOReady. Add SAML + SCIM support to any C# application this afternoon.","archived":false,"fork":false,"pushed_at":"2024-11-14T17:36:14.000Z","size":74,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-03-25T14:03:45.603Z","etag":null,"topics":["saml","scim","sso"],"latest_commit_sha":null,"homepage":"https://ssoready.com","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/ssoready.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":"2024-10-10T23:05:37.000Z","updated_at":"2024-12-02T21:20:53.000Z","dependencies_parsed_at":null,"dependency_job_id":"a1135cd7-4156-47b1-82f0-f8938b5b8d5f","html_url":"https://github.com/ssoready/ssoready-csharp","commit_stats":null,"previous_names":["ssoready/ssoready-csharp"],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ssoready%2Fssoready-csharp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ssoready%2Fssoready-csharp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ssoready%2Fssoready-csharp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ssoready%2Fssoready-csharp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ssoready","download_url":"https://codeload.github.com/ssoready/ssoready-csharp/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248074976,"owners_count":21043490,"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":["saml","scim","sso"],"created_at":"2025-03-08T22:22:37.514Z","updated_at":"2025-04-11T18:07:54.287Z","avatar_url":"https://github.com/ssoready.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"![](https://i.imgur.com/OhtkhbJ.png)\n\n# SSOReady-CSharp: SAML \u0026 SCIM for C#\n\n[![nuget shield](https://img.shields.io/nuget/v/SSOReady.Client)](https://nuget.org/packages/SSOReady.Client)\n\n`SSOReady.Client` is a C# SDK for the [SSOReady](https://ssoready.com) API.\n\nSSOReady is a set of open-source dev tools for implementing Enterprise SSO. You\ncan use SSOReady to add SAML and SCIM support to your product this afternoon.\n\nFor example applications built using SSOReady C#, check out:\n\n- [SSOReady Example App: C# ASP.NET Core with SAML](https://github.com/ssoready/ssoready-example-app-csharp-aspnetcore-saml)\n\n## Installation\n\n```sh\nnuget install SSOReady.Client\n```\n\n## Usage\n\nThis section provides a high-level overview of how SSOReady works, and how it's possible to implement SAML and SCIM in\njust an afternoon. For a more thorough introduction, visit the [SAML\nquickstart](https://ssoready.com/docs/saml/saml-quickstart) or the [SCIM\nquickstart](https://ssoready.com/docs/scim/scim-quickstart).\n\nThe first thing you'll do is create a SSOReady client instance:\n\n```csharp\nusing SSOReady.Client;\n\n// this loads your SSOReady API key from SSOREADY_API_KEY\nvar ssoready = new SSOReady.Client.SSOReady();\n```\n\n### SAML in two lines of code\n\nSAML (aka \"Enterprise SSO\") consists of two steps: an _initiation_ step where\nyou redirect your users to their corporate identity provider, and a _handling_\nstep where you log them in once you know who they are.\n\nTo initiate logins, you'll use SSOReady's [Get SAML Redirect\nURL](https://ssoready.com/docs/api-reference/saml/get-saml-redirect-url)\nendpoint:\n\n```csharp\n// this is how you implement a \"Sign in with SSO\" button\nvar redirectResponse = await ssoready.Saml.GetSamlRedirectUrlAsync(new GetSamlRedirectUrlRequest\n{\n    // the ID of the organization/workspace/team (whatever you call it)\n    // you want to log the user into\n    OrganizationExternalId = email.Split(\"@\")[1]\n});\n\n// redirect the user to `redirectResponse.RedirectUrl`...\n```\n\nYou can use whatever your preferred ID is for organizations (you might call them\n\"workspaces\" or \"teams\") as your `OrganizationExternalId`. You configure those\nIDs inside SSOReady, and SSOReady handles keeping track of that organization's\nSAML and SCIM settings.\n\nTo handle logins, you'll use SSOReady's [Redeem SAML Access\nCode](https://ssoready.com/docs/api-reference/saml/redeem-saml-access-code) endpoint:\n\n```csharp\n// this goes in your handler for POST /ssoready-callback\nvar redeemResponse = await ssoready.Saml.RedeemSamlAccessCodeAsync(new RedeemSamlAccessCodeRequest\n{\n    SamlAccessCode = \"saml_access_code_...\"\n});\n\n// log the user in as `redeemResponse.Email` inside `redeemResponse.OrganizationExternalId`...\n```\n\nYou configure the URL for your `/ssoready-callback` endpoint in SSOReady.\n\n### SCIM in one line of code\n\nSCIM (aka \"Enterprise directory sync\") is basically a way for you to get a list\nof your customer's employees offline.\n\nTo get a customer's employees, you'll use SSOReady's [List SCIM\nUsers](https://ssoready.com/docs/api-reference/scim/list-scim-users) endpoint:\n\n```csharp\nvar listScimUsersResponse = await ssoready.Scim.ListScimUsersAsync(\n    new ScimListScimUsersRequest { OrganizationExternalId = \"my_custom_external_id\" }\n});\n\n// create users from each scimUser\nforeach (var scimUser in listScimUsersResponse.ScimUsers) {\n    // every scimUser has an Id, Email, Attributes, and Deleted\n    // ...\n}\n```\n\n## Contributing\n\nIssues and PRs are more than welcome. Be advised that this library is largely\nautogenerated from [`ssoready/docs`](https://github.com/ssoready/docs). Most\ncode changes ultimately need to be made there, not on this repo.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fssoready%2Fssoready-csharp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fssoready%2Fssoready-csharp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fssoready%2Fssoready-csharp/lists"}