74 DBGC ( http,
"HTTP %p malformed WWW-Authenticate \"%s\"\n",
82 DBGC ( http,
"HTTP %p unrecognised authentication scheme "
83 "\"%s\"\n", http,
name );
94 if ( (
rc = auth->
parse ( http, line ) ) != 0 ) {
95 DBGC ( http,
"HTTP %p could not parse %s WWW-Authenticate "
106 .name =
"WWW-Authenticate",
119 char *buf,
size_t len ) {
131 auth_len = auth->
format ( http, ( buf + used ),
132 ( ( used <
len ) ? (
len - used ) : 0 ) );
133 if ( auth_len < 0 ) {
144 .name =
"Authorization",
#define NULL
NULL pointer (VOID *)
struct arbelprm_rc_send_wqe rc
#define FILE_LICENCE(_licence)
Declare a particular licence as applying to a file.
#define EPROTO
Protocol error.
#define FILE_SECBOOT(_status)
Declare a file's UEFI Secure Boot permission status.
Hyper Text Transport Protocol.
#define __http_response_header
Declare an HTTP response header.
#define HTTP_AUTHENTICATIONS
HTTP authentication scheme table.
#define __http_request_header
Declare an HTTP request header.
static struct http_authentication * http_authentication(const char *name)
Identify authentication scheme.
static int http_parse_www_authenticate(struct http_transaction *http, char *line)
Parse HTTP "WWW-Authenticate" header.
static int http_format_authorization(struct http_transaction *http, char *buf, size_t len)
Construct HTTP "Authorization" header.
char * http_token(char **line, char **value)
Get HTTP response token.
char * strerror(int errno)
Retrieve string representation of error number.
int strcasecmp(const char *first, const char *second)
Compare case-insensitive strings.
An HTTP authentication scheme.
int(* format)(struct http_transaction *http, char *buf, size_t len)
Construct remaining "Authorization" header line.
int(* parse)(struct http_transaction *http, char *line)
Parse remaining "WWW-Authenticate" header line.
const char * name
Name (e.g.
struct http_authentication * auth
Authentication scheme (if any)
struct http_request_auth auth
Authentication descriptor.
struct http_authentication * auth
Authentication scheme (if any)
struct http_response_auth auth
Authorization descriptor.
struct http_response response
Response.
struct http_request request
Request.
#define for_each_table_entry(pointer, table)
Iterate through all entries within a linker table.
int snprintf(char *buf, size_t size, const char *fmt,...)
Write a formatted string to a buffer.