mirror of
https://github.com/skipperbent/simple-php-router.git
synced 2026-06-17 00:37:52 +00:00
[FEATURE] Minor features
- Added basic auth to Response class. - Added getPassword() method for basic auth password in Response class.
This commit is contained in:
@@ -29,4 +29,9 @@ class Response {
|
||||
$this->redirect(url());
|
||||
}
|
||||
|
||||
public function auth($name = '') {
|
||||
header('WWW-Authenticate: Basic realm="' . $name . '"');
|
||||
header('HTTP/1.0 401 Unauthorized');
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user