NAuthRequest
Package: @nauth-toolkit/core
Type: Interface
Standardized request shape for platform adapters.
- NestJS
- Express
- Fastify
import { NAuthRequest } from '@nauth-toolkit/nestjs';
import { NAuthRequest } from '@nauth-toolkit/core';
import { NAuthRequest } from '@nauth-toolkit/core';
Properties
| Property | Type | Required | Description |
|---|---|---|---|
method | string | Yes | HTTP method (uppercase) |
path | string | Yes | Path without query |
url | string | Yes | Full URL |
body | Record<string, unknown> | Yes | Parsed body |
query | Record<string, unknown> | Yes | Query params |
params | Record<string, string> | Yes | Path params |
headers | Record<string, string | string[] | undefined> | Yes | Headers (lowercase keys) |
cookies | Record<string, string | undefined> | Yes | Parsed cookies |
ip | string | Yes | Client IP |
attributes | NAuthRequestAttributes | Yes | Adapter-managed request attributes |
raw | unknown | Yes | Escape hatch (framework request) |
Methods
| Method | Returns | Description |
|---|---|---|
getHeader(name) | string | undefined | Case-insensitive header lookup |
Related APIs
- NAuthResponse - Response interface
- NAuthAdapter - Adapter contract