auth-guard-michimoney
v1.0.14
Published
A reusable NestJS AuthGuard for token introspection.
Downloads
239
Maintainers
Readme
auth-guard-michimoney
Instalar el paquete
npm i auth-guard-michimoney
Configurar el modulo
import { HttpModule } from '@nestjs/axios';
import { AuthGuardModule } from 'auth-guard-michimoney';
import { AuthConfig } from 'auth-guard-michimoney/dist/auth-config.dto';
@Module({
imports: [
//Otros modulos
HttpModule,
AuthGuardModule.register({
introspectionUrl: 'url',
clientId: 'clientid',
clientSecret: 'clientSecret',
} as AuthConfig), // Proporciona la configuración aquí
],
})
Utilizar el guard personalizado
import { AuthGuard } from 'auth-guard-michimoney';
@UseGuards(AuthGuard)