@@ -673,26 +673,26 @@ MerchantConfig.prototype.defaultPropValues = function defaultPropValues() {
673673
674674 //useMLEGlobally check for auth Type
675675 if ( this . enableRequestMLEForOptionalApisGlobally === true || this . mapToControlMLEonAPI != null ) {
676- // if (this.enableRequestMLEForOptionalApisGlobally === true && this.authenticationType.toLowerCase() !== Constants.JWT) {
677- // ApiException.ApiException("MLE is only supported in JWT auth type", logger);
678- // }
676+ if ( this . enableRequestMLEForOptionalApisGlobally === true && this . authenticationType . toLowerCase ( ) !== Constants . JWT ) {
677+ ApiException . ApiException ( "Request MLE is only supported in JWT auth type" , logger ) ;
678+ }
679679
680680 if ( this . mapToControlMLEonAPI != null && typeof ( this . mapToControlMLEonAPI ) !== "object" ) {
681681 ApiException . ApiException ( "mapToControlMLEonAPI in merchantConfig should be key value pair" , logger ) ;
682682 }
683683
684- // if (this.mapToControlMLEonAPI != null && Object.keys(this.mapToControlMLEonAPI).length !== 0) {
685- // var hasTrueValue = false;
686- // for (const[key, value] of Object.entries(this.mapToControlMLEonAPI)) {
687- // if (value === true) {
688- // hasTrueValue = true;
689- // break;
690- // }
691- // }
692- // if (hasTrueValue && this.authenticationType.toLowerCase() !== Constants.JWT) {
693- // ApiException.ApiException("MLE is only supported in JWT auth type", logger);
694- // }
695- // }
684+ if ( this . mapToControlMLEonAPI != null && Object . keys ( this . mapToControlMLEonAPI ) . length !== 0 ) {
685+ var hasTrueValue = false ;
686+ for ( const [ key , value ] of Object . entries ( this . mapToControlMLEonAPI ) ) {
687+ if ( value === true ) {
688+ hasTrueValue = true ;
689+ break ;
690+ }
691+ }
692+ if ( hasTrueValue && this . authenticationType . toLowerCase ( ) !== Constants . JWT ) {
693+ ApiException . ApiException ( "Request MLE is only supported in JWT auth type" , logger ) ;
694+ }
695+ }
696696 }
697697 if ( this . mleForRequestPublicCertPath ) {
698698 // First check if the file exists and is readable
0 commit comments