forked from cztomczak/cefpython
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhttp_authentication_win.pyx
More file actions
18 lines (17 loc) · 713 Bytes
/
http_authentication_win.pyx
File metadata and controls
18 lines (17 loc) · 713 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# Copyright (c) 2012-2014 The CEF Python authors. All rights reserved.
# License: New BSD License.
# Website: http://code.google.com/p/cefpython/
cdef cpp_bool HttpAuthenticationDialog(
browser, isProxy, host, port, realm, scheme, username, password
) except *:
cdef AuthCredentialsData* credentialsData
cdef int innerWindowHandle = browser.GetWindowHandle()
cdef HWND hwnd = <HWND>innerWindowHandle
with nogil:
credentialsData = AuthDialog(hwnd)
if credentialsData == NULL:
return False
else:
username[0] = CharToPyString(credentialsData.username.c_str())
password[0] = CharToPyString(credentialsData.password.c_str())
return True