Kestrun assembly Kestrun namespace public type description static class FixedTimeEquals Provides constant-time comparison methods to prevent timing attacks. static class KestrunHostManager Provides management functionality for KestrunHost instances, including creation, retrieval, starting, stopping, and destruction. static class KestrunRuntimeInfo Utility class to expose information about the runtime environment that Kestrun was built for, and to gate features by TFM and runtime.
Kestrun.Authentication namespace public type description class ApiKeyAuthenticationOptions Options for API key authentication, including header names, validation, and claims issuance. class ApiKeyAuthHandler Handles API Key authentication for incoming HTTP requests. enum ApiKeyChallengeFormat Specifies the format for API key authentication challenges. class AssertionService Service to create OpenID Connect client assertions. record AuthenticationCodeSettings Represents the settings for authentication code, including language, code, extra imports, and references. static class AuthenticationDefaults Default values for authentication schemes. class AuthenticationRegistry Registry of authentication options keyed by (schema, type). Stores as base AuthenticationSchemeOptions, with typed helpers. enum AuthenticationType Types of authentication supported. static class AuthOptionsHelper Helper class to retrieve authentication options from the DI container. class BasicAuthenticationOptions Options for configuring Basic Authentication in Kestrun. class BasicAuthHandler Handles Basic Authentication for HTTP requests. class CookieAuthOptions Options for cookie-based authentication. interface IAuthenticationCommonOptions Defines common options for authentication, including code validation, claim issuance, and claim policy configuration. interface IAuthenticationHostOptions Defines common options for authentication, including code validation, claim issuance, and claim policy configuration. interface IAuthHandler Defines common options for authentication, including code validation, claim issuance, and claim policy configuration. interface IClaimsCommonOptions Defines common options for authentication, including code validation, claim issuance, and claim policy configuration. interface IOpenApiAuthenticationOptions Defines options for OpenAPI authentication schemes. class JwtAuthOptions Options for JWT-based authentication. class OAuth2Options Options for OAuth2 authentication. class OidcEvents OpenID Connect events to handle client assertion injection. class OidcOptions Options for OpenID Connect authentication. class WindowsAuthOptions Options for Windows Authentication. enum WindowsAuthProtocol Defines the protocol used for Windows Authentication.
Kestrun.Certificates namespace public type description static class CertificateManager Drop-in replacement for Pode’s certificate helpers, powered by Bouncy Castle. record CsrOptions Options for creating a Certificate Signing Request (CSR). record CsrResult Represents the result of creating a Certificate Signing Request (CSR), including the PEM-encoded CSR and the private key. enum ExportFormat Specifies the format to use when exporting certificates. static class JwkJson JSON serializer options for JWK serialization. enum KeyType Specifies the type of cryptographic key to use for certificate operations. class RsaJwk Represents an RSA JSON Web Key (JWK). record SelfSignedOptions Options for creating a self-signed certificate.
Kestrun.Claims namespace Kestrun.Client namespace public type description static class KrHttpClientFactory Factory methods to create HttpClient instances for different transport types. class KrHttpClientOptions Extra options to shape HttpClient behavior. static class KrHttpDownloads Helper methods for common HTTP download scenarios.
Kestrun.Health namespace public type description class DiskSpaceProbe Probe that reports free disk space for a target drive / mount point. enum HealthEndpointContentType Supported response content types for the built-in health endpoint. class HealthEndpointOptions Options controlling the built-in health endpoint exposed by KestrunHost . record HealthProbeEntry Represents the result of a single probe execution. record HealthReport Represents an aggregated health report produced by HealthProbeRunner. static class HealthReportTextFormatter Produces a concise, human-readable text representation of a HealthReport . Intended for terminals, logs, or lightweight probes where structured formats (JSON/YAML/XML) are unnecessary. record HealthSummary Summary counts of probe results grouped by ProbeStatus . class HttpProbe A health probe that performs an HTTP GET request to a specified URL and interprets the JSON response according to the health probe contract. interface IProbe Defines a health probe that can be checked asynchronously. abstract class Probe Base class for health probes. record ProbeResult Result of a health probe check. enum ProbeStatus Health probe status enumeration. static class ProbeStatusLabels Provides string constants for well-known probe statuses that dynamic scripts may return. These values are used when converting script outputs into ProbeResult statuses. class ProcessProbe A health probe that runs an external process and interprets its output.
Kestrun.Hosting namespace Kestrun.Hosting.Compression namespace Kestrun.Hosting.Options namespace Kestrun.Jwt namespace public type description static class JwkUtilities Utilities for working with JSON Web Keys (JWK), including RFC 7638 thumbprints. enum JwtAlgorithm Specifies supported JWT signing algorithms. static class JwtAlgorithmExtensions Provides extension methods for the JwtAlgorithm enum. class JwtBuilderResult Represents the result of building a JWT, including the token, key, builder, issue time, and expiration. static class JwtInspector Provides methods for inspecting and extracting parameters from JWT tokens. class JwtParameters Represents all parameters extracted from a JWT, including header fields, standard properties, and claims. class JwtTokenBuilder Fluent utility to create any flavour of JWS/JWE in one line.
Kestrun.Languages namespace public type description record CsGlobals Provides global and local variable dictionaries and context for C# delegate execution. record ParameterForInjectionInfo Information about a parameter to be injected into a script.
Kestrun.Logging namespace public type description static class LoggerConfigurationExtensions Convenience extensions for hooking Serilog loggers into LoggerManager . static class LoggerExtensions Sanitized Serilog extensions to strip control chars (including CR/LF) from any string property values before writing the log. static class LoggerManager Manages a collection of named Serilog loggers and their configurations.
Kestrun.Logging.Data namespace public type description class ErrorRecordWrapper Wraps an ErrorRecord object to provide additional logging information. class InvocationInfoWrapper Wraps the PowerShell InvocationInfo object and exposes its properties for logging purposes.
Kestrun.Logging.Enrichers namespace public type description class ErrorRecordEnricher Enriches Serilog log events with error record and invocation info from WrapperException.
Kestrun.Logging.Enrichers.Extensions namespace public type description static class ErrorRecordEnricherExtensions Provides extension methods for enriching Serilog logs with error record information. static class ErrorRecordExtensions Provides extension methods for formatting error records and invocation info as tables.
Kestrun.Logging.Exceptions namespace public type description class WrapperException Represents an exception that wraps another exception and optionally an ErrorRecord.
Kestrun.Logging.Sinks namespace public type description class PowerShellSink A Serilog sink that formats log events and invokes a callback for PowerShell integration.
Kestrun.Logging.Sinks.Extensions namespace public type description static class PowerShellSinkExtensions Provides extension methods for configuring PowerShell sinks in Serilog logging.
Kestrun.Logging.Utils.Console namespace public type description class Padding Represents padding values for left and right sides, and provides methods to generate padding strings. class Table Represents a console table for formatted output with optional grid and padding.
Kestrun.Logging.Utils.Console.Extensions namespace public type description static class TableExtensions Provides extension methods for the Table class.
Kestrun.Middleware namespace Kestrun.Models namespace public type description class ContentDispositionOptions Options for Content-Disposition header. enum ContentDispositionType Specifies the type of Content-Disposition header to use in the HTTP response. record KestrunContext Represents the context for a Kestrun request, including the request, response, HTTP context, and host. class KestrunRequest Represents a request model for Kestrun, containing HTTP method, path, query, headers, body, authorization, cookies, and form data. class KestrunResponse Represents an HTTP response in the Kestrun framework, providing methods to write various content types and manage headers, cookies, and status codes.
Kestrun.OpenApi namespace Kestrun.Razor namespace public type description static class PowerShellRazorPage Provides middleware for enabling PowerShell-backed Razor Pages, allowing execution of a sibling PowerShell script (.cshtml.ps1) for each Razor view ( .cshtml). class PwshKestrunModel Base PageModel that exposes whatever the sibling PowerShell script placed in HttpContext.Items["PageModel"].
Kestrun.Runtime namespace public type description static class EnvironmentHelper Helpers for determining the current environment name. static class PowerShellOpenApiClassExporter Exports OpenAPI component classes as PowerShell class definitions. static class VariablesMap Helper class to map common request and server properties, as well as shared state variables, into a dictionary.
Kestrun.Scheduling namespace public type description record JobInfo Represents a scheduled task with its configuration and state. record ScheduleReport Represents a report of scheduled jobs at a specific time. Contains the generation time and a list of job information. This is useful for monitoring and auditing scheduled tasks. class SchedulerService Represents a service for managing scheduled tasks. Provides methods to schedule, cancel, pause, resume, and report on tasks. This service is designed to run within a Kestrun application context. It supports both C# and PowerShell jobs, allowing for flexible scheduling options.
Kestrun.Scripting namespace Kestrun.SharedState namespace public type description static class GlobalStore Thread‑safe, case‑insensitive global key/value store for reference‑type objects. class SharedState Thread‑safe, case‑insensitive global key/value store for reference‑type objects.
Kestrun.SignalR namespace Kestrun.Tasks namespace public type description class KestrunTask Represents a single-shot task execution with its current state and telemetry. class KestrunTaskService Service to run ad-hoc Kestrun tasks in PowerShell, C#, or VB.NET, with status, result, and cancellation. record KrTask Basic information about a task for listing purposes. class ProgressiveKestrunTaskState Represents the progress state of a task. enum TaskState Represents the lifecycle state of a KestrunTask.
Kestrun.TBuilder namespace Kestrun.Utilities namespace public type description static class AssemblyAutoLoader Registers one or more folders that contain private assemblies and makes sure every DLL in those folders is available to PowerShell / scripts. Call PreloadAll once at startup (or from PowerShell) and forget about “could not load assembly …” errors. static class BuildError Utilities for formatting PowerShell error streams into HTTP responses. static class CcUtilities Provides utility methods for Kestrun. static class HostingExtensions Provides extension methods for hosting Kestrun servers. [Flags] enum HttpVerb Common HTTP verbs recognized by the framework. static class HttpVerbExtensions Extension methods for the HttpVerb enum. static class ObjectToDictionaryConverter Utility for converting arbitrary .NET objects to a Dictionary with string keys and values. Handles dictionaries, enumerables, and objects with public properties. static class PowerShellModuleLocator Utility class to locate the Kestrun PowerShell module. It searches for the module in both development and production environments. static class RateLimiterOptionsExtensions Provides extension methods for copying rate limiter options and policies. class ReadOnlyDictionaryAdapter Adapts a non-generic IDictionary to a read-only dictionary with string keys and nullable object values. static class SecureStringUtils Provides utility methods for working with SecureString and ReadOnlySpan<char>. static class XmlHelper Helpers for converting arbitrary objects into XElement instances.
Kestrun.Utilities.Json namespace public type description static class JsonSerializerHelper Helper class for JSON serialization and deserialization using System.Text.Json. static class PayloadSanitizer Utilities to sanitize arbitrary payloads (especially PowerShell objects) into JSON-friendly shapes for System.Text.Json/SignalR serialization without reference cycles.
Kestrun.Utilities.Yaml namespace Table of contents