File tree Expand file tree Collapse file tree 2 files changed +4
-5
lines changed 
src/webdriver/BiDi/Modules/Network Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Original file line number Diff line number Diff line change 2121
2222namespace  OpenQA . Selenium . BiDi . Modules . Network ; 
2323
24- [ JsonPolymorphic ( TypeDiscriminatorPropertyName  =  "type" ) ] 
25- [ JsonDerivedType ( typeof ( Basic ) ,  "password" ) ] 
26- public  abstract  record  AuthCredentials 
24+ public  record  AuthCredentials ( string  Username ,  string  Password ) 
2725{ 
28-     public  record  Basic ( string  Username ,  string  Password )  :  AuthCredentials ; 
26+     [ JsonInclude ] 
27+     internal  string  Type  {  get ;  }  =  "password" ; 
2928} 
3029
3130
Original file line number Diff line number Diff line change @@ -163,7 +163,7 @@ public async Task CanContinueWithAuthCredentials()
163163        await  using  var  intercept  =  await  bidi . Network . InterceptAuthAsync ( async  e => 
164164        { 
165165            //TODO Seems it would be better to have method which takes abstract options 
166-             await  e . Request . Request . ContinueWithAuthAsync ( new  AuthCredentials . Basic ( "test" ,  "test" ) ) ; 
166+             await  e . Request . Request . ContinueWithAuthAsync ( new  AuthCredentials ( "test" ,  "test" ) ) ; 
167167        } ) ; 
168168
169169        await  context . NavigateAsync ( UrlBuilder . WhereIs ( "basicAuth" ) ,  new ( )  {  Wait  =  ReadinessState . Complete  } ) ; 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments