@@ -704,20 +704,23 @@ describe('🎏 data handling', () => {
704704
705705 const customURL = new URL ( url ) ;
706706 customURL . searchParams . append ( 'token' , 'sensitive' ) ;
707+ customURL . searchParams . append ( 'client_secret' , 'data' ) ;
707708 customURL . searchParams . append ( 'random' , 'non-sensitive' ) ;
708709
709710 const config : GaxiosOptions = {
710711 headers : {
711712 authentication : 'My Auth' ,
713+ authorization : 'My Auth' ,
712714 'content-type' : 'application/x-www-form-urlencoded' ,
713715 random : 'data' ,
714716 } ,
715717 data : {
716718 grant_type : 'urn:ietf:params:oauth:grant-type:jwt-bearer' ,
717719 assertion : 'somesensitivedata' ,
718720 unrelated : 'data' ,
721+ client_secret : 'data' ,
719722 } ,
720- body : 'grant_type=somesensitivedata&assertion=somesensitivedata' ,
723+ body : 'grant_type=somesensitivedata&assertion=somesensitivedata&client_secret=data ' ,
721724 } ;
722725
723726 // simulate JSON response
@@ -756,13 +759,15 @@ describe('🎏 data handling', () => {
756759 assert . deepStrictEqual ( e . config . headers , {
757760 ...config . headers , // non-redactables should be present
758761 authentication : REDACT ,
762+ authorization : REDACT ,
759763 } ) ;
760764
761765 // config redactions - data
762766 assert . deepStrictEqual ( e . config . data , {
763767 ...config . data , // non-redactables should be present
764768 grant_type : REDACT ,
765769 assertion : REDACT ,
770+ client_secret : REDACT ,
766771 } ) ;
767772
768773 // config redactions - body
@@ -773,6 +778,7 @@ describe('🎏 data handling', () => {
773778 const resultURL = new URL ( e . config . url ) ;
774779 assert . notDeepStrictEqual ( resultURL . toString ( ) , customURL . toString ( ) ) ;
775780 customURL . searchParams . set ( 'token' , REDACT ) ;
781+ customURL . searchParams . set ( 'client_secret' , REDACT ) ;
776782 assert . deepStrictEqual ( resultURL . toString ( ) , customURL . toString ( ) ) ;
777783
778784 // response redactions
@@ -781,11 +787,13 @@ describe('🎏 data handling', () => {
781787 assert . deepStrictEqual ( e . response . headers , {
782788 ...responseHeaders , // non-redactables should be present
783789 authentication : REDACT ,
790+ authorization : REDACT ,
784791 } ) ;
785792 assert . deepStrictEqual ( e . response . data , {
786793 ...response , // non-redactables should be present
787- grant_type : REDACT ,
788794 assertion : REDACT ,
795+ client_secret : REDACT ,
796+ grant_type : REDACT ,
789797 } ) ;
790798 } finally {
791799 scope . done ( ) ;
0 commit comments