|
iPXE
|
Hyper Text Transfer Protocol (HTTP) Basic authentication. More...
#include <stdio.h>#include <errno.h>#include <ipxe/uri.h>#include <ipxe/base64.h>#include <ipxe/http.h>Go to the source code of this file.
Macros | |
| #define | EACCES_USERNAME __einfo_error ( EINFO_EACCES_USERNAME ) |
| #define | EINFO_EACCES_USERNAME |
Functions | |
| FILE_LICENCE (GPL2_OR_LATER_OR_UBDL) | |
| static int | http_parse_basic_auth (struct http_transaction *http, char *line __unused) |
| Parse HTTP "WWW-Authenticate" header for Basic authentication. More... | |
| static int | http_basic_authenticate (struct http_transaction *http) |
| Perform HTTP Basic authentication. More... | |
| static int | http_format_basic_auth (struct http_transaction *http, char *buf, size_t len) |
| Construct HTTP "Authorization" header for Basic authentication. More... | |
| REQUIRING_SYMBOL (http_basic_auth) | |
| REQUIRE_OBJECT (httpauth) | |
Variables | |
| struct http_authentication http_basic_auth | __http_authentication |
| HTTP Basic authentication scheme. More... | |
Hyper Text Transfer Protocol (HTTP) Basic authentication.
Definition in file httpbasic.c.
| #define EACCES_USERNAME __einfo_error ( EINFO_EACCES_USERNAME ) |
Definition at line 40 of file httpbasic.c.
| #define EINFO_EACCES_USERNAME |
Definition at line 41 of file httpbasic.c.
| FILE_LICENCE | ( | GPL2_OR_LATER_OR_UBDL | ) |
|
static |
Parse HTTP "WWW-Authenticate" header for Basic authentication.
| http | HTTP transaction |
| line | Remaining header line |
| rc | Return status code |
Definition at line 52 of file httpbasic.c.
References http_request_auth::auth, http_request::auth, http_response::flags, HTTP_RESPONSE_RETRY, http_transaction::request, and http_transaction::response.
|
static |
Perform HTTP Basic authentication.
| http | HTTP transaction |
| rc | Return status code |
Definition at line 70 of file httpbasic.c.
References http_request::auth, http_request_auth::basic, DBGC, EACCES_USERNAME, uri::password, http_request_auth_basic::password, http_transaction::request, http_transaction::uri, uri::user, and http_request_auth_basic::username.
|
static |
Construct HTTP "Authorization" header for Basic authentication.
| http | HTTP transaction |
| buf | Buffer |
| len | Length of buffer |
| len | Length of header value, or negative error |
Definition at line 93 of file httpbasic.c.
References assert(), http_request::auth, base64_encode(), http_request_auth::basic, len, NULL, http_request_auth_basic::password, http_transaction::request, snprintf(), strlen(), and http_request_auth_basic::username.
| REQUIRING_SYMBOL | ( | http_basic_auth | ) |
| REQUIRE_OBJECT | ( | httpauth | ) |
| struct http_authentication http_basic_auth __http_authentication |
HTTP Basic authentication scheme.
Definition at line 113 of file httpbasic.c.
1.8.15