AspNet.Security.OAuth.OneID
1.1.71
See the version list below for details.
dotnet add package AspNet.Security.OAuth.OneID --version 1.1.71
NuGet\Install-Package AspNet.Security.OAuth.OneID -Version 1.1.71
<PackageReference Include="AspNet.Security.OAuth.OneID" Version="1.1.71" />
paket add AspNet.Security.OAuth.OneID --version 1.1.71
#r "nuget: AspNet.Security.OAuth.OneID, 1.1.71"
// Install AspNet.Security.OAuth.OneID as a Cake Addin #addin nuget:?package=AspNet.Security.OAuth.OneID&version=1.1.71 // Install AspNet.Security.OAuth.OneID as a Cake Tool #tool nuget:?package=AspNet.Security.OAuth.OneID&version=1.1.71
Ontario Health (OH) OneID Authentication Middleware
- An easy to use library that makes connecting with Ontario Health easy for .NET Kestrel/Owin/Katana applications.
About | Usage | Development | Gallery | Acknowledgement | License
🔰 About
This library was created by Clinical Support Systems and Kori Francis, who have experience integrating with APIs of varying complexity. We wanted to simplify the connection in .NET web applications so we could get on with the actual API implementation.
🎉 Supported Ontario Health (OH) Services
To make integration simple, there's support in this middlewear to adjust the scope and profile depending on the service you're integrating with. As such, we currently support the following:
This will allow you to perform authentication once but retrieve an access_token
that can access multiple services.
Supported oAuth/OIDC Features
- ✔️ Authenticate
- ✔️ Discovery
- ✔️ User Info
- ✔️ Validation (use JSON Web Key Set)
- ✔️ Manual refresh
- ❌ End Session
- ❌ Logout
☀️ Usage
Here is how to use this library in your project.
🔌 NuGet Installation
Install-Package AspNet.Security.OAuth.OneID
📦 Startup.cs
Add the following to your authentication pipeline:
OWIN/Katana (ASP.NET)
app.UseOneIdAuthentication(new OneIdAuthenticationOptions()
{
CertificateThumbprint = ConfigurationManager.AppSettings["EHS:CertificateThumbprint"],
ClientId = ConfigurationManager.AppSettings["EHS:AuthClientId"],
Environment = OneIdAuthenticationEnvironment.PartnerSelfTest
});
Kestrel (ASP.NET Core)
services.AddAuthentication().AddOneId(options =>
{
options.ClientId = Configuration["EHS:AuthClientId"];
options.CertificateThumbprint = Configuration["EHS:CertificateThumbprint"];
options.Environment = OneIdAuthenticationEnvironment.PartnerSelfTest;
});
In the case of multiple service usage, simply specify that in the authentication options:
services.AddAuthentication().AddOneId(OneIdAuthenticationDefaults.AuthenticationScheme, (OneIdAuthenticationOptions options) =>
{
// ...
options.ServiceProfileOptions = OneIdAuthenticationServiceProfiles.OLIS | OneIdAuthenticationServiceProfiles.DHDR;
});
🔧 Development
If you want other people to contribute to this project, this is the section, make sure you always add this.
📓 Pre-Requisites
List all the pre-requisites the system needs to develop this project.
- You will need a PKI certificate from Ontario Health (OH)
- You will need login credentials from Ontario Health (OH)
🔥 Contribution
Your contributions are always welcome and appreciated. Following are the things you can do to contribute to this project.
Report a bug <br> If you think you have encountered a bug, and I should know about it, feel free to report it and I will take care of it.
Request a feature <br> You can also request for a feature.
Create a pull request <br> It can't get better then this, your pull request will be appreciated by the community. You can get started by picking up any open issues from here and make a pull request.
If you are new to open-source, make sure to check read more about it here and learn more about creating a pull request here.
🌵 Branches
I use an agile continuous integration methodology, so the version is frequently updated and development is really fast.
develop
is the development branch.master
is the production branch.No further branches should be created in the main repository.
Steps to create a pull request
- Make a PR to
master
branch. - Comply with the best practices and guidelines e.g. where the PR concerns visual elements it should have an image showing the effect.
- It must pass all continuous integration checks and get positive reviews.
After this, changes will be merged.
📷 Gallery
🌟 Credit/Acknowledgment
- Kori Francis
- David Ball
- Alex McKeever
- Victoria Tolls
🔒 License
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. |
.NET Framework | net48 is compatible. net481 was computed. |
-
.NETFramework 4.8
- Microsoft.IdentityModel.JsonWebTokens (>= 8.0.1)
- Microsoft.Net.Http (>= 2.2.29)
- Microsoft.Owin (>= 4.2.2)
- Microsoft.Owin.Security.OAuth (>= 4.2.2)
- Newtonsoft.Json (>= 13.0.3)
- System.IdentityModel.Tokens.Jwt (>= 6.35.0)
-
net8.0
- Microsoft.AspNetCore.Authentication.OpenIdConnect (>= 8.0.8)
- Microsoft.IdentityModel.JsonWebTokens (>= 8.0.1)
- Newtonsoft.Json (>= 13.0.3)
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.73 | 0 | 11/21/2024 |
1.1.71 | 106 | 9/24/2024 |
1.1.70 | 97 | 9/24/2024 |
1.1.69 | 112 | 9/24/2024 |
1.1.68 | 94 | 9/24/2024 |
1.1.67 | 98 | 9/24/2024 |
1.1.64 | 86 | 9/23/2024 |
1.1.62 | 93 | 9/23/2024 |
1.1.61 | 80 | 9/23/2024 |
1.1.60 | 80 | 9/23/2024 |
1.1.59 | 88 | 9/20/2024 |
1.1.58 | 80 | 9/20/2024 |
1.1.57 | 77 | 9/20/2024 |
1.1.56 | 84 | 9/20/2024 |
1.1.52 | 111 | 8/19/2024 |
1.1.51 | 112 | 8/19/2024 |
1.1.45 | 846 | 6/1/2023 |
1.1.44 | 989 | 2/13/2023 |
1.1.43 | 809 | 1/20/2023 |
1.1.41 | 766 | 1/20/2023 |
1.1.40 | 810 | 11/10/2022 |
1.1.38 | 803 | 11/7/2022 |
1.1.37 | 904 | 11/3/2022 |
1.1.36 | 816 | 11/1/2022 |
1.1.34 | 835 | 11/1/2022 |
1.1.33 | 826 | 11/1/2022 |
1.1.28 | 828 | 11/1/2022 |
1.1.27 | 829 | 11/1/2022 |
1.1.26 | 825 | 11/1/2022 |
1.1.25 | 865 | 11/1/2022 |
1.1.24 | 807 | 11/1/2022 |
1.1.23 | 826 | 11/1/2022 |
1.1.19 | 805 | 11/1/2022 |
1.1.16 | 855 | 11/1/2022 |
1.1.15 | 830 | 11/1/2022 |
1.1.14 | 835 | 11/1/2022 |
1.1.13 | 855 | 10/31/2022 |
1.1.12 | 783 | 10/31/2022 |
1.1.11 | 826 | 10/31/2022 |
1.1.10 | 833 | 10/28/2022 |
1.1.9 | 833 | 10/26/2022 |
1.1.8 | 858 | 10/26/2022 |
1.1.7 | 902 | 10/25/2022 |
1.1.6 | 856 | 10/25/2022 |
1.1.5 | 864 | 10/25/2022 |
1.1.4 | 866 | 10/25/2022 |
1.1.3 | 913 | 10/19/2022 |
1.1.2 | 882 | 10/19/2022 |
1.1.1 | 892 | 10/19/2022 |
1.0.17 | 932 | 10/14/2022 |
1.0.16 | 886 | 10/14/2022 |
1.0.15 | 908 | 10/14/2022 |
1.0.14 | 912 | 10/14/2022 |
1.0.12 | 876 | 10/14/2022 |
1.0.11 | 1,388 | 2/24/2022 |
1.0.8 | 899 | 11/29/2021 |
1.0.7 | 886 | 10/12/2021 |
1.0.6 | 865 | 10/12/2021 |
1.0.5 | 872 | 10/8/2021 |
1.0.4 | 892 | 9/16/2021 |
1.0.3 | 850 | 9/16/2021 |
1.0.2 | 828 | 9/16/2021 |
1.0.1 | 1,089 | 6/18/2021 |
1.0.0 | 853 | 6/18/2021 |
0.5.4-beta-gbf669a996d | 1,149 | 11/26/2020 |
0.5.4-beta-g9ece0e71be | 888 | 10/23/2020 |
0.5.4-beta-g3c0cdfdeeb | 771 | 11/26/2020 |
0.5.3-beta-gf90864d1d9 | 860 | 10/23/2020 |
0.5.3-beta-g859c56758b | 897 | 9/24/2020 |
0.5.3-beta-g1fbff73a8c | 872 | 10/23/2020 |
0.5.2-beta-gf1fe4f7d2a | 921 | 9/17/2020 |
0.5.1-beta-g01069f6024 | 974 | 9/17/2020 |
0.5.0-beta-g919276409b | 857 | 9/17/2020 |