Home Documentation

Documentation

Everything you need to get AuthnzNet running as your local OAuth 2.0 + OIDC server.

1 Installation

AuthnzNet is distributed as a .NET global tool. You need the .NET 10 SDK or later.

Terminal
$ dotnet tool install -g Noundry.AuthnzNet.CLI

To update an existing installation:

Terminal
$ dotnet tool update -g Noundry.AuthnzNet.CLI

Once installed, the ndaz command is available globally.

2 Quick Start

Get a fully configured OAuth server running in three commands:

Terminal
# Step 1: Scaffold a tenant with admin user and OAuth client
$ ndaz quickstart --name "MyApp"

# Step 2: Start the OAuth server
$ ndaz serve

The quickstart command creates:

  • A tenant with the name you specified
  • An admin user with generated credentials
  • An OAuth client with client ID and secret

The server runs at https://localhost:5000 with a local SQLite database.

3 CLI Commands

The ndaz CLI provides commands for managing every aspect of your OAuth server.

ndaz serve

Start the OAuth 2.0 + OIDC server on localhost:5000.

$ ndaz serve
$ ndaz serve --port 5001  # custom port

ndaz quickstart

Create a complete tenant setup in one command.

$ ndaz quickstart --name "MyApp"

ndaz tenant

Manage tenants — create, list, and configure isolated OAuth environments.

$ ndaz tenant create --name "Staging"
$ ndaz tenant list

ndaz user

Manage users within a tenant.

$ ndaz user create --email "user@example.com" --password "pass123"
$ ndaz user list

ndaz client

Manage OAuth clients (applications).

$ ndaz client create --name "My Web App" --redirect-uri "https://localhost:3000/callback"
$ ndaz client list

ndaz config

View and modify server configuration.

$ ndaz config show
$ ndaz config set --key "Port" --value "5001"

4 OIDC Endpoints

AuthnzNet exposes standard OpenID Connect endpoints. Any OIDC-compliant client can discover and use them automatically.

Endpoint URL
Discovery /.well-known/openid-configuration
JWKS /.well-known/jwks.json
Authorization /oauth/authorize
Token /oauth/token
UserInfo /oauth/userinfo
End Session /oauth/end-session

Supported Grant Types

Authorization Code + PKCE

Web apps, mobile apps, SPAs

Client Credentials

Machine-to-machine, APIs

Resource Owner Password

Testing, trusted clients

Refresh Token

Token rotation, long sessions

5 Integration

AuthnzNet is a standard OIDC provider. Point your framework's auth middleware at https://localhost:5000 and it auto-discovers everything.

ASP.NET Core

Program.cs C#
builder.Services.AddAuthentication(options =>
{
    options.DefaultScheme = "Cookies";
    options.DefaultChallengeScheme = "oidc";
})
.AddCookie("Cookies")
.AddOpenIdConnect("oidc", options =>
{
    options.Authority = "https://localhost:5000";
    options.ClientId = "your-client-id";
    options.ClientSecret = "your-client-secret";
    options.ResponseType = "code";
    options.Scope.Add("openid");
    options.Scope.Add("profile");
});

NextAuth.js

auth.config.ts TypeScript
export default NextAuth({
  providers: [{
    id: "authnznet",
    name: "AuthnzNet",
    type: "oidc",
    issuer: "https://localhost:5000",
    clientId: "your-client-id",
    clientSecret: "your-client-secret",
  }]
})

Any OIDC Client

Point your OIDC library at the discovery endpoint and it will auto-configure:

https://localhost:5000/.well-known/openid-configuration

6 Configuration

AuthnzNet works out of the box with sensible defaults. Configuration is stored locally and can be modified via the CLI.

Data Storage

Item Location
Database %APPDATA%/AuthnzNet/authnznet.db
RS256 Signing Key %APPDATA%/AuthnzNet/signing-key.json
Configuration %APPDATA%/AuthnzNet/config.json

Token Defaults

Setting Default
Access token lifetime 60 minutes
Signing algorithm RS256 (RSA-2048)
Server port 5000
Clock skew 30 seconds