NextIteration.SpectreConsole.Auth.Providers.SoftwareOne 0.2.0

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

NextIteration.SpectreConsole.Auth.Providers.SoftwareOne

NuGet Downloads License: MIT .NET CI

SoftwareOne Marketplace credential provider for NextIteration.SpectreConsole.Auth.

Drops a ready-to-use SoftwareOneCredential, SoftwareOneToken, authentication service, Spectre.Console accounts add prompt collector, and accounts list display formatter into a CLI that already uses the core auth package.


Install

dotnet add package NextIteration.SpectreConsole.Auth.Providers.SoftwareOne

Requires the core package (NextIteration.SpectreConsole.Auth ≥ 0.4.1) — NuGet pulls it in transitively.


Quick start

using NextIteration.SpectreConsole.Auth;
using NextIteration.SpectreConsole.Auth.Providers.SoftwareOne;

services.AddCredentialStore(opts =>
{
    opts.CredentialsDirectory = Path.Combine(
        Environment.GetFolderPath(Environment.SpecialFolder.UserProfile),
        ".my-cli", "credentials");
});

services.AddSoftwareOneAuthProvider();

// ... then hook up the accounts branch in your Spectre.Console configurator
// (from the core package):
//
//   config.AddAccountsBranch();

From that point on:

my-cli accounts add        # prompts for SoftwareOne (and any other registered providers)
my-cli accounts list       # shows stored credentials with Actor, Base URL, masked token
my-cli accounts select <id>
my-cli accounts delete <id>

Resolving a token in consumer code:

public sealed class MarketplaceClient(SoftwareOneAuthenticationService auth, IHttpClientFactory http)
{
    public async Task<string> GetOrdersAsync()
    {
        var token = await auth.AuthenticateAsync();
        using var client = http.CreateClient();
        client.BaseAddress = token.BaseUrl;
        client.DefaultRequestHeaders.Authorization =
            new AuthenticationHeaderValue(SoftwareOneToken.TokenType, token.ApiToken);
        // ... token.Actor / token.Environment let you branch on which flow to use
        return await client.GetStringAsync($"/v1/{token.Actor.ToLowerInvariant()}/orders");
    }
}

What gets stored

Each accounts add run serialises a SoftwareOneCredential into the encrypted keystore:

Field Source Notes
ApiToken hidden prompt Long-lived portal-issued token
BaseUrl prompt (validated) Absolute http(s) URL, default https://api.softwareone.com/
Environment selection prompt Production / Staging / Test
Actor selection prompt Operations / Vendor

The token never leaves the credential store unencrypted. accounts list renders a masked fingerprint (first four + last four characters) and four stars for anything shorter than 10 chars.


Authentication model

SoftwareOne tokens are long-lived and issued out-of-band via the Marketplace portal — there's no exchange or refresh flow. SoftwareOneAuthenticationService.AuthenticateAsync() is therefore a pass-through: it deserialises the selected credential and projects it into a SoftwareOneToken. IsExpired is hard-coded to false, but tokens can be revoked in the portal — a revoked token surfaces as a 401 on the first API call. Consumers should treat 401 as "prompt for a fresh credential" rather than relying on IsExpired.


Supported platforms

Whatever the core package supports (currently Windows, macOS, Linux on .NET 10).


References


License

MIT © Stuart Meeks

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  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. 
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
0.4.0 127 6/20/2026
0.3.3 254 6/10/2026
0.3.2 399 5/3/2026
0.3.1 105 5/3/2026
0.3.0 199 4/18/2026
0.2.0 109 4/18/2026
0.1.1 108 4/17/2026
0.1.0 118 4/17/2026