SSOReady.Client 1.1.0

dotnet add package SSOReady.Client --version 1.1.0
                    
NuGet\Install-Package SSOReady.Client -Version 1.1.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="SSOReady.Client" Version="1.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="SSOReady.Client" Version="1.1.0" />
                    
Directory.Packages.props
<PackageReference Include="SSOReady.Client" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add SSOReady.Client --version 1.1.0
                    
#r "nuget: SSOReady.Client, 1.1.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package SSOReady.Client@1.1.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=SSOReady.Client&version=1.1.0
                    
Install as a Cake Addin
#tool nuget:?package=SSOReady.Client&version=1.1.0
                    
Install as a Cake Tool

alternate text is missing from this package README image

SSOReady-CSharp: SAML & SCIM for C#

nuget shield

SSOReady.Client is a C# SDK for the SSOReady API.

SSOReady is a set of open-source dev tools for implementing Enterprise SSO. You can use SSOReady to add SAML and SCIM support to your product this afternoon.

For example applications built using SSOReady C#, check out:

Installation

nuget install SSOReady.Client

Usage

This section provides a high-level overview of how SSOReady works, and how it's possible to implement SAML and SCIM in just an afternoon. For a more thorough introduction, visit the SAML quickstart or the SCIM quickstart.

The first thing you'll do is create a SSOReady client instance:

using SSOReady.Client;

// this loads your SSOReady API key from SSOREADY_API_KEY
var ssoready = new SSOReady.Client.SSOReady();

SAML in two lines of code

SAML (aka "Enterprise SSO") consists of two steps: an initiation step where you redirect your users to their corporate identity provider, and a handling step where you log them in once you know who they are.

To initiate logins, you'll use SSOReady's Get SAML Redirect URL endpoint:

// this is how you implement a "Sign in with SSO" button
var redirectResponse = await ssoready.Saml.GetSamlRedirectUrlAsync(new GetSamlRedirectUrlRequest
{
    // the ID of the organization/workspace/team (whatever you call it)
    // you want to log the user into
    OrganizationExternalId = email.Split("@")[1]
});

// redirect the user to `redirectResponse.RedirectUrl`...

You can use whatever your preferred ID is for organizations (you might call them "workspaces" or "teams") as your OrganizationExternalId. You configure those IDs inside SSOReady, and SSOReady handles keeping track of that organization's SAML and SCIM settings.

To handle logins, you'll use SSOReady's Redeem SAML Access Code endpoint:

// this goes in your handler for POST /ssoready-callback
var redeemResponse = await ssoready.Saml.RedeemSamlAccessCodeAsync(new RedeemSamlAccessCodeRequest
{
    SamlAccessCode = "saml_access_code_..."
});

// log the user in as `redeemResponse.Email` inside `redeemResponse.OrganizationExternalId`...

You configure the URL for your /ssoready-callback endpoint in SSOReady.

SCIM in one line of code

SCIM (aka "Enterprise directory sync") is basically a way for you to get a list of your customer's employees offline.

To get a customer's employees, you'll use SSOReady's List SCIM Users endpoint:

var listScimUsersResponse = await ssoready.Scim.ListScimUsersAsync(
    new ScimListScimUsersRequest { OrganizationExternalId = "my_custom_external_id" }
});

// create users from each scimUser
foreach (var scimUser in listScimUsersResponse.ScimUsers) {
    // every scimUser has an Id, Email, Attributes, and Deleted
    // ...
}

Contributing

Issues and PRs are more than welcome. Be advised that this library is largely autogenerated from ssoready/docs. Most code changes ultimately need to be made there, not on this repo.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 is compatible.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.1.0 141 11/14/2024
0.1.2 162 10/30/2024
0.1.1 117 10/15/2024