@@ -98,7 +98,12 @@ def test_generate_request_header(self):
98
98
auth = requests_gssapi .HTTPKerberosAuth ()
99
99
self .assertEqual (auth .generate_request_header (response , host ), b64_negotiate_response )
100
100
fake_init .assert_called_with (
101
- name = gssapi_sname (
"[email protected] " ),
creds = None ,
mech = SPNEGO ,
flags = gssflags ,
usage = "initiate"
101
+ name = gssapi_sname (
"[email protected] " ),
102
+ creds = None ,
103
+ mech = SPNEGO ,
104
+ flags = gssflags ,
105
+ usage = "initiate" ,
106
+ channel_bindings = None ,
102
107
)
103
108
fake_resp .assert_called_with (b"token" )
104
109
@@ -113,7 +118,12 @@ def test_generate_request_header_init_error(self):
113
118
requests_gssapi .exceptions .SPNEGOExchangeError , auth .generate_request_header , response , host
114
119
)
115
120
fake_init .assert_called_with (
116
- name = gssapi_sname (
"[email protected] " ),
usage = "initiate" ,
flags = gssflags ,
creds = None ,
mech = SPNEGO
121
+ name = gssapi_sname (
"[email protected] " ),
122
+ usage = "initiate" ,
123
+ flags = gssflags ,
124
+ creds = None ,
125
+ mech = SPNEGO ,
126
+ channel_bindings = None ,
117
127
)
118
128
119
129
def test_generate_request_header_step_error (self ):
@@ -127,7 +137,12 @@ def test_generate_request_header_step_error(self):
127
137
requests_gssapi .exceptions .SPNEGOExchangeError , auth .generate_request_header , response , host
128
138
)
129
139
fake_init .assert_called_with (
130
- name = gssapi_sname (
"[email protected] " ),
usage = "initiate" ,
flags = gssflags ,
creds = None ,
mech = SPNEGO
140
+ name = gssapi_sname (
"[email protected] " ),
141
+ usage = "initiate" ,
142
+ flags = gssflags ,
143
+ creds = None ,
144
+ mech = SPNEGO ,
145
+ channel_bindings = None ,
131
146
)
132
147
fail_resp .assert_called_with (b"token" )
133
148
@@ -162,7 +177,12 @@ def test_authenticate_user(self):
162
177
connection .send .assert_called_with (request )
163
178
raw .release_conn .assert_called_with ()
164
179
fake_init .assert_called_with (
165
- name = gssapi_sname (
"[email protected] " ),
flags = gssflags ,
usage = "initiate" ,
creds = None ,
mech = SPNEGO
180
+ name = gssapi_sname (
"[email protected] " ),
181
+ flags = gssflags ,
182
+ usage = "initiate" ,
183
+ creds = None ,
184
+ mech = SPNEGO ,
185
+ channel_bindings = None ,
166
186
)
167
187
fake_resp .assert_called_with (b"token" )
168
188
@@ -197,7 +217,12 @@ def test_handle_401(self):
197
217
connection .send .assert_called_with (request )
198
218
raw .release_conn .assert_called_with ()
199
219
fake_init .assert_called_with (
200
- name = gssapi_sname (
"[email protected] " ),
creds = None ,
mech = SPNEGO ,
flags = gssflags ,
usage = "initiate"
220
+ name = gssapi_sname (
"[email protected] " ),
221
+ creds = None ,
222
+ mech = SPNEGO ,
223
+ flags = gssflags ,
224
+ usage = "initiate" ,
225
+ channel_bindings = None ,
201
226
)
202
227
fake_resp .assert_called_with (b"token" )
203
228
@@ -402,7 +427,12 @@ def test_handle_response_401(self):
402
427
connection .send .assert_called_with (request )
403
428
raw .release_conn .assert_called_with ()
404
429
fake_init .assert_called_with (
405
- name = gssapi_sname (
"[email protected] " ),
usage = "initiate" ,
flags = gssflags ,
creds = None ,
mech = SPNEGO
430
+ name = gssapi_sname (
"[email protected] " ),
431
+ usage = "initiate" ,
432
+ flags = gssflags ,
433
+ creds = None ,
434
+ mech = SPNEGO ,
435
+ channel_bindings = None ,
406
436
)
407
437
fake_resp .assert_called_with (b"token" )
408
438
@@ -443,7 +473,12 @@ def connection_send(self, *args, **kwargs):
443
473
connection .send .assert_called_with (request )
444
474
raw .release_conn .assert_called_with ()
445
475
fake_init .assert_called_with (
446
- name = gssapi_sname (
"[email protected] " ),
usage = "initiate" ,
flags = gssflags ,
creds = None ,
mech = SPNEGO
476
+ name = gssapi_sname (
"[email protected] " ),
477
+ usage = "initiate" ,
478
+ flags = gssflags ,
479
+ creds = None ,
480
+ mech = SPNEGO ,
481
+ channel_bindings = None ,
447
482
)
448
483
fake_resp .assert_called_with (b"token" )
449
484
@@ -456,7 +491,12 @@ def test_generate_request_header_custom_service(self):
456
491
auth = requests_gssapi .HTTPKerberosAuth (service = "barfoo" )
457
492
auth .generate_request_header (response , host ),
458
493
fake_init .assert_called_with (
459
- name = gssapi_sname (
"[email protected] " ),
usage = "initiate" ,
flags = gssflags ,
creds = None ,
mech = SPNEGO
494
+ name = gssapi_sname (
"[email protected] " ),
495
+ usage = "initiate" ,
496
+ flags = gssflags ,
497
+ creds = None ,
498
+ mech = SPNEGO ,
499
+ channel_bindings = None ,
460
500
)
461
501
fake_resp .assert_called_with (b"token" )
462
502
@@ -496,6 +536,7 @@ def test_delegation(self):
496
536
flags = gssdelegflags ,
497
537
creds = None ,
498
538
mech = SPNEGO ,
539
+ channel_bindings = None ,
499
540
)
500
541
fake_resp .assert_called_with (b"token" )
501
542
@@ -522,6 +563,7 @@ def test_principal_override(self):
522
563
flags = gssflags ,
523
564
creds = b"fake creds" ,
524
565
mech = SPNEGO ,
566
+ channel_bindings = None ,
525
567
)
526
568
527
569
def test_realm_override (self ):
@@ -538,6 +580,7 @@ def test_realm_override(self):
538
580
flags = gssflags ,
539
581
creds = None ,
540
582
mech = SPNEGO ,
583
+ channel_bindings = None ,
541
584
)
542
585
fake_resp .assert_called_with (b"token" )
543
586
@@ -569,6 +612,7 @@ def test_explicit_creds(self):
569
612
flags = gssflags ,
570
613
creds = b"fake creds" ,
571
614
mech = SPNEGO ,
615
+ channel_bindings = None ,
572
616
)
573
617
fake_resp .assert_called_with (b"token" )
574
618
@@ -589,6 +633,7 @@ def test_explicit_mech(self):
589
633
flags = gssflags ,
590
634
creds = None ,
591
635
mech = b"fake mech" ,
636
+ channel_bindings = None ,
592
637
)
593
638
fake_resp .assert_called_with (b"token" )
594
639
@@ -606,6 +651,7 @@ def test_target_name(self):
606
651
flags = gssflags ,
607
652
creds = None ,
608
653
mech = SPNEGO ,
654
+ channel_bindings = None ,
609
655
)
610
656
fake_resp .assert_called_with (b"token" )
611
657
0 commit comments