Vettvangur.AudkenniConnect 1.2.4

dotnet add package Vettvangur.AudkenniConnect --version 1.2.4                
NuGet\Install-Package Vettvangur.AudkenniConnect -Version 1.2.4                
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="Vettvangur.AudkenniConnect" Version="1.2.4" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Vettvangur.AudkenniConnect --version 1.2.4                
#r "nuget: Vettvangur.AudkenniConnect, 1.2.4"                
#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.
// Install Vettvangur.AudkenniConnect as a Cake Addin
#addin nuget:?package=Vettvangur.AudkenniConnect&version=1.2.4

// Install Vettvangur.AudkenniConnect as a Cake Tool
#tool nuget:?package=Vettvangur.AudkenniConnect&version=1.2.4                

Vettvangur.AudkenniConnect

About

Enables easy integration with the audkenni.is authentication service.

Supports .NET Framework 4.6.1 and higher, and .NET Core 5.0 to 8.0.

Currently, this package includes two ways for user authentication against Auðkenni's API; either via sim or app.<br/> Both are available with or without a custom verification code (aka challenge).

Setup

  1. Install the package from NuGet: Install-Package Vettvangur.AudkenniConnect

  2. Get your ApplicationId and ApiKey by contacting Vettvangur and add them to your app settings. <br/> Example for appsettings.json:

    {
      "AudkenniConnect": {
        "ApplicationId": "your-provided-application-id",
        "ApiKey": "your-provided-api-key"
      }
    }
    

    Example for web.config/app.config:

    <appSettings>
        <add key="AudkenniConnect:ApplicationId" value="your-provided-application-id" />
        <add key="AudkenniConnect:ApiKey" value="your-provided-api-key" />
    </appSettings>
    
  3. Register AudkenniConnect where you register your services:<br/> Example for Startup.cs:

    var audkenniServiceProvider = new ServiceCollection().BuildAudkenniProvider(<fetch-api-key-from-appsettings-here>;
    services.AddSingleton(audkenniServiceProvider);
    services.AddScoped(sp => audkenniServiceProvider.GetService<AudkenniConnectService>());
    
  4. Choose your method(s) - see below.

Please contact Vettvangur if you're having trouble with the setup.

High-level explanation of authorization steps:

  1. The client application notifies audkenni.is that a user wants to be authenticated, and gets a challenge code in return.
  2. The client application displays the challenge code to the user, the user gets the request to his device and he provides his pin.
  3. The client application polls the status of the authentication request until the user has finished answering the auth request on his device.

Choose your method(s)

AuthorizeWithCodeAsync

  • Used for authentication with challenge code. <br/>
  • This method takes care of step 1 from the high-level explanation above. <br/>
  • Used in cohesion with GetAuthorizationStatusAsync or PollAuthorizationStatusAsync.

AuthorizeSimpleAsync

  • This method is used on its own for a super-simplified authentication process. <br/>
  • This method takes care of steps 1-3 from the high-level explanation above; except for returning the challenge code to the client, a custom message can be used instead. <br/>
  • All steps of the auth-process that Auðkenni requires are handled automatically, including polling of the auth-status until the user has finished answering the auth request on his device.

NOTE: This method is NOT RECOMMENDED for app authentication as the app will always display a 4-digit challenge, which the client application will never see. Only a custom message can be included for app authentication.

GetAuthorizationStatusAsync

  • Only use this method if you want to implement the polling yourself. <br/>
  • If polling is implemented correctly then this method will take care of step 3 from the high-level explanation above. <br/>
  • Used in cohesion with AuthorizeWithCodeAsync to check if the user has authenticated. <br/>

PollAuthorizationStatusAsync

  • Use this method if you don't want to implement the polling yourself. <br/>
  • This method will take care of step 3 from the high-level explanation above. <br/>
  • In simple terms, this method is just calling the same endpoint as GetAuthorizationStatusAsync, but multiple times with some delay between each call.

Please contact Vettvangur if you need help choosing the right methods for your use-case.

Product Compatible and additional computed target framework versions.
.NET net5.0 is compatible.  net5.0-windows was computed.  net6.0 was computed.  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 was computed.  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 was computed.  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 net461 is compatible.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 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.2.4 413 8/1/2024

Initial release