Modules & Guards
AuthModule
- Bundles login strategies, JWT validation, and shared providers
- Import in your Nest app to enable authentication helpers
Guards
| Guard | Description |
|---|---|
JwtAuthGuard | Validates bearer JWT and populates AuthUser |
| Capability/role guards | Used in Access Control backend to enforce feature permissions |
Types
| Type | Description |
|---|---|
AuthUser | Surface used by guards and services; includes optional mfaEnabled |
Example
import { JwtAuthGuard } from '@digiwedge/auth';
@UseGuards(JwtAuthGuard)
@Get('/me')
getProfile(@Req() req) {
return req.user;
}