Class: AuthClientModule
Class: AuthClientModule
Defined in: auth-server-nest/src/auth-client.module.ts:38
Generic Nest module for @vendidit/auth-server integration.
Every consuming service builds an AuthClientOptions object from its own
config (env, ConfigService, whatever) and imports this module. The module
registers all four APP_GUARDs globally — every route is authenticated by
default; use @Public() to opt out.
Opt-in features:
- options.m2m → ServiceAuthClient can exchange client-credentials for service JWTs; otherwise getToken() throws (or uses the legacy AUTH_REGISTRATION_TOKEN fallback until /oauth/token ships).
- options.permissions → PermissionRegistrarService registers the manifest with the auth server on boot.
- options.checkRevocation → TokenValidatorService queries Redis per request. Consumer must wire a Redis client under AUTH_CLIENT_REDIS.
Global by default so @CurrentUser() etc. work from any feature module
without re-importing.
Constructors
Constructor
new AuthClientModule():
AuthClientModule
Returns
AuthClientModule
Methods
forRoot()
staticforRoot(options):DynamicModule
Defined in: auth-server-nest/src/auth-client.module.ts:39
Parameters
options
Returns
DynamicModule