GNU libmicrohttpd 1.0.0
Loading...
Searching...
No Matches
MHD_DigestAuthUsernameInfo Struct Reference

#include <microhttpd.h>

Data Fields

enum MHD_DigestAuthAlgo3 algo3
 
enum MHD_DigestAuthUsernameType uname_type
 
charusername
 
size_t username_len
 
charuserhash_hex
 
size_t userhash_hex_len
 
uint8_tuserhash_bin
 

Detailed Description

Information from Digest Authorization client's header.

All buffers pointed by any struct members are freed when MHD_free() is called for pointer to this structure.

Application may modify buffers as needed until MHD_free() is called for pointer to this structure

Note
Available since MHD_VERSION 0x00097701

Definition at line 5348 of file microhttpd.h.

Field Documentation

◆ algo3

enum MHD_DigestAuthAlgo3 MHD_DigestAuthUsernameInfo::algo3

The algorithm as defined by client. Set automatically to MD5 if not specified by client.

Warning
Do not be confused with MHD_DigestAuthAlgorithm, which uses other values!

Definition at line 5356 of file microhttpd.h.

◆ uname_type

enum MHD_DigestAuthUsernameType MHD_DigestAuthUsernameInfo::uname_type

The type of username used by client. The 'invalid' and 'missing' types are not used in this structure, instead NULL is returned by MHD_digest_auth_get_username3().

Definition at line 5363 of file microhttpd.h.

Referenced by MHD_digest_auth_get_username(), and MHD_digest_auth_get_username3().

◆ userhash_bin

uint8_t* MHD_DigestAuthUsernameInfo::userhash_bin

The userhash decoded to binary form. Used only if username type is userhash, always NULL otherwise. When not NULL, this points to binary sequence userhash_hex_len /2 bytes long. The valid size should be #MHD_digest_get_hash_size(algo3) bytes. The buffer pointed by the userhash_bin becomes invalid when the pointer to the structure is freed by MHD_free().

Warning
This is a binary data, no zero termination.
To avoid buffer overruns, always check the size of the data before use, because userhash_bin can point even to zero-sized data.
See also
MHD_digest_auth_calc_userhash()

Definition at line 5416 of file microhttpd.h.

◆ userhash_hex

char* MHD_DigestAuthUsernameInfo::userhash_hex

The userhash string. Valid only if username type is userhash. This is unqoted string without decoding of the hexadecimal digits (as provided by the client). The buffer pointed by the userhash_hex becomes invalid when the pointer to the structure is freed by MHD_free().

See also
MHD_digest_auth_calc_userhash_hex()

Definition at line 5393 of file microhttpd.h.

◆ userhash_hex_len

size_t MHD_DigestAuthUsernameInfo::userhash_hex_len

The length of the userhash_hex in characters. The valid size should be #MHD_digest_get_hash_size(algo3) * 2 characters. When the userhash_hex is NULL, this member is always zero.

Definition at line 5400 of file microhttpd.h.

◆ username

char* MHD_DigestAuthUsernameInfo::username

The username string. Used only if username type is standard or extended, always NULL otherwise. If extended notation is used, this string is pct-decoded string with charset and language tag removed (i.e. it is original username extracted from the extended notation). When userhash is used by the client, this member is NULL and userhash_hex and userhash_bin are set. The buffer pointed by the username becomes invalid when the pointer to the structure is freed by MHD_free().

Definition at line 5376 of file microhttpd.h.

Referenced by MHD_digest_auth_get_username().

◆ username_len

size_t MHD_DigestAuthUsernameInfo::username_len

The length of the username. When the username is NULL, this member is always zero.

Definition at line 5382 of file microhttpd.h.


The documentation for this struct was generated from the following file: