NAuthResponse
Package: @nauth-toolkit/core
Type: Interface
Standardized response contract for platform adapters.
- NestJS
- Express
- Fastify
import { NAuthResponse } from '@nauth-toolkit/nestjs';
import { NAuthResponse } from '@nauth-toolkit/core';
import { NAuthResponse } from '@nauth-toolkit/core';
Properties
| Property | Type | Required | Description |
|---|---|---|---|
raw | unknown | Yes | Escape hatch (framework response) |
Methods
| Method | Returns | Description |
|---|---|---|
status(code) | this | Set status code |
header(name, value) | this | Set header |
setCookie(name, value, options?) | this | Set cookie |
clearCookie(name, options?) | this | Clear cookie |
send(body) | void | Send body |
json(body) | void | Send JSON |
redirect(url, status?) | void | Redirect |
isSent() | boolean | Whether headers were sent |
Related APIs
- NAuthRequest - Request interface
- NAuthAdapter - Adapter contract