diff options
Diffstat (limited to 'src/microhttpd/digestauth.h')
-rw-r--r-- | src/microhttpd/digestauth.h | 58 |
1 files changed, 25 insertions, 33 deletions
diff --git a/src/microhttpd/digestauth.h b/src/microhttpd/digestauth.h index af54bc63..e8844f27 100644 --- a/src/microhttpd/digestauth.h +++ b/src/microhttpd/digestauth.h | |||
@@ -50,43 +50,35 @@ | |||
50 | #define _MHD_AUTH_DIGEST_BASE "Digest" | 50 | #define _MHD_AUTH_DIGEST_BASE "Digest" |
51 | 51 | ||
52 | /** | 52 | /** |
53 | * Parameter of request's Digest Authorization header | 53 | * The token for MD5 algorithm. |
54 | */ | 54 | */ |
55 | struct MHD_RqDAuthParam | 55 | #define _MHD_MD5_TOKEN "MD5" |
56 | { | ||
57 | /** | ||
58 | * The string with length, NOT zero-terminated | ||
59 | */ | ||
60 | struct _MHD_str_w_len value; | ||
61 | /** | ||
62 | * True if string must be "unquoted" before processing. | ||
63 | * This member is false if the string is used in DQUOTE marks, but no | ||
64 | * backslash-escape is used in the string. | ||
65 | */ | ||
66 | bool quoted; | ||
67 | }; | ||
68 | 56 | ||
69 | /** | 57 | /** |
70 | * Request client's Digest Authorization header parameters | 58 | * The token for SHA-256 algorithm. |
71 | */ | 59 | */ |
72 | struct MHD_RqDAuth | 60 | #define _MHD_SHA256_TOKEN "SHA-256" |
73 | { | 61 | |
74 | struct MHD_RqDAuthParam nonce; | 62 | /** |
75 | struct MHD_RqDAuthParam opaque; | 63 | * The token for SHA-512/256 algorithm. |
76 | struct MHD_RqDAuthParam algorithm; | 64 | * Unsupported currently by MHD for authentication. |
77 | struct MHD_RqDAuthParam response; | 65 | */ |
78 | struct MHD_RqDAuthParam username; | 66 | #define _MHD_SHA512_256_TOKEN "SHA-512-256" |
79 | struct MHD_RqDAuthParam username_ext; | 67 | |
80 | struct MHD_RqDAuthParam realm; | 68 | /** |
81 | struct MHD_RqDAuthParam uri; | 69 | * The suffix token for "session" algorithms. |
82 | struct MHD_RqDAuthParam qop; | 70 | */ |
83 | struct MHD_RqDAuthParam cnonce; | 71 | #define _MHD_SESS_TOKEN "-sess" |
84 | struct MHD_RqDAuthParam nc; | 72 | |
85 | /** | 73 | /** |
86 | * True if 'userhash' parameter is used with value 'true'. | 74 | * The "auth" token for QOP |
87 | */ | 75 | */ |
88 | bool userhash; | 76 | #define MHD_TOKEN_AUTH_ "auth" |
89 | }; | 77 | |
78 | /** | ||
79 | * The "auth-int" token for QOP | ||
80 | */ | ||
81 | #define MHD_TOKEN_AUTH_INT_ "auth-int" | ||
90 | 82 | ||
91 | #endif /* ! MHD_DIGESTAUTH_H */ | 83 | #endif /* ! MHD_DIGESTAUTH_H */ |
92 | 84 | ||