Skip to main content

NAuthRequest

Package: @nauth-toolkit/core Type: Interface

Standardized request shape for platform adapters.

import { NAuthRequest } from '@nauth-toolkit/nestjs';

Properties

PropertyTypeRequiredDescription
methodstringYesHTTP method (uppercase)
pathstringYesPath without query
urlstringYesFull URL
bodyRecord<string, unknown>YesParsed body
queryRecord<string, unknown>YesQuery params
paramsRecord<string, string>YesPath params
headersRecord<string, string | string[] | undefined>YesHeaders (lowercase keys)
cookiesRecord<string, string | undefined>YesParsed cookies
ipstringYesClient IP
attributesNAuthRequestAttributesYesAdapter-managed request attributes
rawunknownYesEscape hatch (framework request)

Methods

MethodReturnsDescription
getHeader(name)string | undefinedCase-insensitive header lookup