FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
cefpython/cefpython/var/http_authentication.php at cefpython31 · pythonthings/cefpython · GitHub
pythonthings
cefpython
Repository navigation
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
cefpython
/
cefpython
/
var
/
http_authentication.php
Copy path
More file actions
More file actions
Latest commit
History
History
History
30 lines (21 loc) · 665 Bytes
Breadcrumbs
cefpython
/
cefpython
/
var
/
http_authentication.php
Copy path
File metadata and controls
30 lines (21 loc) · 665 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<?php
# Remember that CefRequestHandler::GetAuthCredentials() is called
# on IO thread, you need to use CefPostTask() on GUI thread to display
# a form for entering username/password.
HttpAuthentication
();
function
HttpAuthentication
()
{
if
(!
isset
(
$
_SERVER
[
'
PHP_AUTH_USER
'
])) {
header
(
'
WWW-Authenticate: Basic realm="CEF Realm"
'
);
header
(
'
HTTP/1.0 401 Unauthorized
'
);
print
'
The process of authentication was cancelled.
'
;
exit
();
}
else
{
$
username
=
$
_SERVER
[
'
PHP_AUTH_USER
'
];
$
password
=
$
_SERVER
[
'
PHP_AUTH_PW
'
];
print
"
Authenticated successfully.<br>
"
;
print
"
Username=
$
username
<br>
"
;
print
"
Password=
$
password
<br>
"
;
}
}
?>
Back
|
FazBrowse Home
|
New Git URL