AppStream.HealthcareBluebook
1.0.0
dotnet add package AppStream.HealthcareBluebook --version 1.0.0
NuGet\Install-Package AppStream.HealthcareBluebook -Version 1.0.0
<PackageReference Include="AppStream.HealthcareBluebook" Version="1.0.0" />
paket add AppStream.HealthcareBluebook --version 1.0.0
#r "nuget: AppStream.HealthcareBluebook, 1.0.0"
// Install AppStream.HealthcareBluebook as a Cake Addin #addin nuget:?package=AppStream.HealthcareBluebook&version=1.0.0 // Install AppStream.HealthcareBluebook as a Cake Tool #tool nuget:?package=AppStream.HealthcareBluebook&version=1.0.0
AppStream.HealthcareBluebook Library
AppStream.HealthcareBluebook
is an open-source .NET Core library designed to simplify the integration process with Healthcare Bluebook's Single Sign-On (SSO) system using SAML 2.0. The library provides an easy-to-use interface to seamlessly integrate your web application with Healthcare Bluebook's SSO.
Acknowledgements
This library relies heavily on the excellent work done by the ITfoxtec.Identity.Saml2.MvcCore project. We extend our sincere appreciation to the contributors and maintainers of this library for providing a solid foundation for SAML 2.0 integration in ASP.NET Core applications.
Getting Started
Follow these simple steps to integrate AppStream.HealthcareBluebook into your web application.
1. Installation
Install the AppStream.HealthcareBluebook NuGet package in your .NET Core web application using the following command:
dotnet add package AppStream.HealthcareBluebook
2. Configuration
In your web app's startup code, add the following lines based on your certificate storage preference:
If your signing certificate is on your machine:
builder.Services
.AddHealthcareBluebook()
.WithCertFileCertificateProvider();
If your signing certificate is in Azure Key Vault:
builder.Services
.AddHealthcareBluebook()
.WithAzureKeyVaultCertificateProvider();
You can also create and use your own implementation of ISigningCertificateProvider
:
builder.Services
.AddHealthcareBluebook()
.WithCertificateProvider<YourSigningCertificateProvider>();
3. App Settings
Configure your app settings in your appsettings.json
or equivalent configuration file:
{
"HcbbSaml": {
"Audience": ">> HCBB audience <<",
"ClientIdAttributeName": "clientid",
"ClientIdAttributeValue": ">> your client id <<",
"Issuer": ">> your saml 'issuer' value <<",
"MemberIdAttributeName": "memberid",
"SignatureAlgorithm": "http://www.w3.org/2001/04/xmldsig-more#rsa-sha256",
"SingleSignOnDestination": "url to HCBB SSO"
},
"AzureKeyVault": { // needed only when using AzureKeyVaultSigningCertificateProvider
"CertificateName": ">> name of the cert in the key vault <<",
"KeyVaultUrl": ">> url to your key vault <<"
},
"CertFile": { // needed only when using CertFileSigningCertificateProvider
"FileName": "cert file name",
"Password": "cert passwrd"
}
}
4. Integration
Inject IHcbbSamlResponseGenerator
into your controller and return the SAML response to the browser:
public class HomeController : Controller
{
private readonly IHcbbSamlResponseGenerator _hcbbSamlResponseGenerator;
public HomeController(IHcbbSamlResponseGenerator hcbbSamlResponseGenerator)
{
_hcbbSamlResponseGenerator = hcbbSamlResponseGenerator;
}
public IActionResult GoToHcbb()
{
return _hcbbSamlResponseGenerator
.GenerateHcbbSamlResponse("insert member id here");
}
}
Feel free to contribute to this library! Please do open issues and submit your pull requests so this library can become a robust integartion tool 🚀
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | 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. |
-
net8.0
- Azure.Identity (>= 1.10.4)
- Azure.Security.KeyVault.Certificates (>= 4.5.1)
- ITfoxtec.Identity.Saml2.MvcCore (>= 4.10.7)
- RSAKeyVaultProvider (>= 2.1.1)
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.0.0 | 219 | 2/1/2024 |