1- import {
2- HttpException ,
3- HttpStatus ,
4- Inject ,
5- Injectable ,
6- Logger ,
7- } from '@nestjs/common' ;
1+ import { HttpException , HttpStatus , Injectable , Logger } from '@nestjs/common' ;
82import { ConfigService } from '@nestjs/config' ;
93import {
104 AttestationResponseDTO_Web2Json_Response ,
@@ -20,8 +14,6 @@ import { verifyWeb2Json } from '../verification/web-2-json/web2-json-verificatio
2014import { BaseVerifierService } from './common/verifier-base.service' ;
2115import { Web2JsonConfig } from 'src/config/interfaces/web2-json' ;
2216import { IConfig } from 'src/config/interfaces/common' ;
23- import { REQUEST } from '@nestjs/core' ;
24- import { Request } from 'express' ;
2517import { ProcessPoolService } from '../verification/web-2-json/process-pool.service' ;
2618import {
2719 BackpressureException ,
@@ -41,7 +33,6 @@ export class Web2JsonVerifierService extends BaseVerifierService<
4133 constructor (
4234 protected configService : ConfigService < IConfig > ,
4335 private readonly processPool : ProcessPoolService ,
44- @Inject ( REQUEST ) private readonly req : Request ,
4536 ) {
4637 super ( configService , 'Web2Json' , VerifierType . Web2 ) ;
4738 this . web2JsonConfig = this . configService . get ( 'web2JsonConfig' ) ;
@@ -85,16 +76,13 @@ export class Web2JsonVerifierService extends BaseVerifierService<
8576 throw new BackpressureException ( ) ;
8677 }
8778
88- // store user-agent if available
89- const userAgent : string = this . req . headers [ 'user-agent' ] || undefined ;
9079 const sourceConfig = this . web2JsonConfig . sources . find (
9180 ( s ) => encodeAttestationName ( s . sourceId ) === fixedRequest . sourceId ,
9281 ) ;
9382 const result = await verifyWeb2Json (
9483 fixedRequest ,
9584 this . web2JsonConfig . securityParams ,
9685 sourceConfig ,
97- userAgent ,
9886 this . processPool ,
9987 ) ;
10088 this . logger . debug (
0 commit comments