OneIdentity.SafeguardDotNet.PkceNoninteractiveLogin 8.2.3-dev-24706

This is a prerelease version of OneIdentity.SafeguardDotNet.PkceNoninteractiveLogin.
There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package OneIdentity.SafeguardDotNet.PkceNoninteractiveLogin --version 8.2.3-dev-24706
                    
NuGet\Install-Package OneIdentity.SafeguardDotNet.PkceNoninteractiveLogin -Version 8.2.3-dev-24706
                    
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="OneIdentity.SafeguardDotNet.PkceNoninteractiveLogin" Version="8.2.3-dev-24706" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="OneIdentity.SafeguardDotNet.PkceNoninteractiveLogin" Version="8.2.3-dev-24706" />
                    
Directory.Packages.props
<PackageReference Include="OneIdentity.SafeguardDotNet.PkceNoninteractiveLogin" />
                    
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 OneIdentity.SafeguardDotNet.PkceNoninteractiveLogin --version 8.2.3-dev-24706
                    
#r "nuget: OneIdentity.SafeguardDotNet.PkceNoninteractiveLogin, 8.2.3-dev-24706"
                    
#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 OneIdentity.SafeguardDotNet.PkceNoninteractiveLogin@8.2.3-dev-24706
                    
#: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=OneIdentity.SafeguardDotNet.PkceNoninteractiveLogin&version=8.2.3-dev-24706&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=OneIdentity.SafeguardDotNet.PkceNoninteractiveLogin&version=8.2.3-dev-24706&prerelease
                    
Install as a Cake Tool

SafeguardDotNet.PkceNoninteractiveLogin

PKCE-based non-interactive authentication for the Safeguard Web API without launching a browser.

Overview

This library provides OAuth2/PKCE authentication to Safeguard by allowing applications to manually handle the authentication flow without launching a browser. This is useful for:

  • Automated testing scenarios
  • Custom authentication workflows
  • Integration with non-browser-based UI frameworks
  • Scenarios where browser automation is required

Key Features

  • Manual PKCE Flow Control: Generate code verifier/challenge and build authorization URLs
  • No Browser Launch: Unlike BrowserLogin, this doesn't automatically open a browser
  • Flexible Integration: Programmatically obtain authorization codes through custom mechanisms
  • Standard OAuth2/PKCE: Follows OAuth2 Authorization Code Flow with PKCE (RFC 7636)

Usage Example

using OneIdentity.SafeguardDotNet.PkceNoninteractiveLogin;

// Step 1: Generate PKCE parameters
var codeVerifier = PkceNoninteractiveLogin.GenerateCodeVerifier();
var codeChallenge = PkceNoninteractiveLogin.GenerateCodeChallenge(codeVerifier);

// Step 2: Build authorization URL
var authUrl = PkceNoninteractiveLogin.BuildAuthorizationUrl(
    "safeguard.example.com",
    codeChallenge,
    username: "admin");

// Step 3: Your custom code to authenticate and obtain authorization code
// (e.g., using Selenium, Playwright, or other automation tools)
var authorizationCode = YourCustomAuthenticationMethod(authUrl);

// Step 4: Connect to Safeguard
var connection = PkceNoninteractiveLogin.Connect(
    "safeguard.example.com",
    authorizationCode,
    codeVerifier);

// Step 5: Use the connection
var userData = connection.InvokeMethod(Service.Core, Method.Get, "Me");

Comparison with BrowserLogin

Feature BrowserLogin PkceNoninteractiveLogin
Browser Launch Automatic Manual (caller controlled)
TCP Listener Built-in Not included
Authorization Code Captured automatically Must be obtained by caller
Use Case Interactive desktop apps Automated testing, custom flows

Dependencies

  • SafeguardDotNet (core SDK)
  • SafeguardDotNet.LoginCommon (shared OAuth utilities)
  • Serilog (logging)

Testing

See Test/SafeguardDotNetPkceNoninteractiveLoginTester for a reference implementation that demonstrates both interactive and non-interactive testing modes.

License

Apache 2.0. See LICENSE file for details.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  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.  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 was computed.  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
8.2.3-dev-25208 31 3/19/2026
8.2.3-dev-24706 42 3/17/2026
8.2.3-dev-24700 41 3/17/2026
8.2.3-dev-23900 81 3/11/2026
8.2.3-dev-23099 78 3/6/2026
8.2.3-dev-23053 79 3/6/2026
8.2.2 193 3/5/2026
8.2.1 134 3/3/2026
8.2.1-dev-22051 87 3/2/2026
8.2.1-dev-22043 84 3/2/2026
8.2.0-dev-19047 94 2/11/2026
8.0.0-dev-19043 93 2/11/2026

PKCE Non-interactive Login for One Identity Safeguard Web API .NET SDK

     Allows custom application to use the Safeguard Web API by authenticating to
     Safeguard using OAuth2/PKCE flow without launching a browser. This enables
     programmatic authentication by directly calling rSTS endpoints.