auth-server
@mmm/auth-server
NestJS-Serverpaket der Auth-Domain.
Verantwortung
- serverseitige Auth-Kernlogik
- Guards, Decorators und Interceptors für Auth
- Password-Authentifizierung
- OAuth-Authentifizierung
- OIDC-spezifische Verifikation
Struktur
src/lib/server/coreGuard, Controller, Decorators, Rolling-Token-Logik, Basiskonfigurationsrc/lib/server/passwordPassword-spezifische Module, Validator-Verträge und Login-Endpunktsrc/lib/server/oauthOAuth-spezifische Module, Service, Provider-Adapter und Callback-Flowsrc/lib/server/oidcOIDC-spezifische Guard- und JWKS-Themen
Architekturgrenzen
- darf
@mmm/auth-contractsverwenden - darf keine Angular-spezifischen Typen oder Implementierungen enthalten
corebleibt providerneutralpassword,oauthundoidcdürfen aufcoreaufbauen, aber nicht umgekehrt
Öffentliche API
@mmm/auth/server@mmm/auth/server/core@mmm/auth/server/password@mmm/auth/server/oauth@mmm/auth/server/oidc
Beispiel
import { AuthServerModule } from "@mmm/auth/server";
AuthServerModule.forRoot({ jwt: { secret: process.env.JWT_SECRET! }, core: { resolver: authUserResolver, }, password: { validator: passwordValidator, },});Build
pnpm --dir backend run build