AspNetCore.Authentication.SK.SmartID 1.0.0-alpha6

.NET Core 3.1
This is a prerelease version of AspNetCore.Authentication.SK.SmartID.
dotnet add package AspNetCore.Authentication.SK.SmartID --version 1.0.0-alpha6
NuGet\Install-Package AspNetCore.Authentication.SK.SmartID -Version 1.0.0-alpha6
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="AspNetCore.Authentication.SK.SmartID" Version="1.0.0-alpha6" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add AspNetCore.Authentication.SK.SmartID --version 1.0.0-alpha6
#r "nuget: AspNetCore.Authentication.SK.SmartID, 1.0.0-alpha6"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install AspNetCore.Authentication.SK.SmartID as a Cake Addin
#addin nuget:?package=AspNetCore.Authentication.SK.SmartID&version=1.0.0-alpha6&prerelease

// Install AspNetCore.Authentication.SK.SmartID as a Cake Tool
#tool nuget:?package=AspNetCore.Authentication.SK.SmartID&version=1.0.0-alpha6&prerelease

AspNetCore.Authentication.SK.SmartID

AspNetCore.Authentication.SK.SmartID is a Smart-ID security middleware that you can use in your ASP.NET Core application to support SK Smart-ID authentication. It is inspired by Microsoft Twitter authentication and SK Smart-ID java client. It is not perfect, but functional as external authentication.

The latest alpha release can be found on NuGet.

Getting started

Install live or demo SK root CA and intermediate certificates to your running computer or server from SK site. They have to be installed in propriate stores or received user certifiactes are not validated.

Add following lines to your Startup class:

public void ConfigureServices(IServiceCollection services)
{
    services.AddAuthentication()
        .AddSmartId<ApplicationUser>(SmartIdDefaults.DemoCertificatePublicKey, options =>
            {
                const string displayText = "Smart-ID ASP.NET Core";
                options.RelyingPartyUUID = Configuration["SmartID:RelyingPartyUUID"];
                options.RelyingPartyName = Configuration["SmartID:RelyingPartyName"];
                //options.UseDemo(true); // To use Smart-ID demo, use this.

                options.AllowedInteractions.Add(
                    new AllowedInteraction(AllowedInteractionType.VerificationCodeChoice, displayText));
                options.AllowedInteractions.Add(
                    new AllowedInteraction(AllowedInteractionType.DisplayTextAndPin, displayText));
            });
}

public void Configure(IApplicationBuilder app)
{
    app.UseAuthentication();
    app.UseAuthorization();
}

See the /sample directory for a complete sample using ASP.NET Core MVC.

Product Versions
.NET net5.0 net5.0-windows net6.0 net6.0-android net6.0-ios net6.0-maccatalyst net6.0-macos net6.0-tvos net6.0-windows net7.0 net7.0-android net7.0-ios net7.0-maccatalyst net7.0-macos net7.0-tvos net7.0-windows
.NET Core netcoreapp3.1
Compatible target framework(s)
Additional computed target framework(s)
Learn more about Target Frameworks and .NET Standard.
  • .NETCoreApp 3.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-alpha6 555 4/11/2022
1.0.0-alpha5 4,028 3/17/2021
1.0.0-alpha4 244 2/18/2021