Mercurial > libavformat.hg
diff httpauth.h @ 5885:a1a309c4a751 libavformat
Add support for http digest authentication
| author | mstorsjo |
|---|---|
| date | Thu, 25 Mar 2010 13:58:26 +0000 |
| parents | 61062082488b |
| children |
line wrap: on
line diff
--- a/httpauth.h Thu Mar 25 07:14:41 2010 +0000 +++ b/httpauth.h Thu Mar 25 13:58:26 2010 +0000 @@ -29,8 +29,22 @@ HTTP_AUTH_NONE = 0, /**< No authentication specified */ HTTP_AUTH_BASIC, /**< HTTP 1.0 Basic auth from RFC 1945 * (also in RFC 2617) */ + HTTP_AUTH_DIGEST, /**< HTTP 1.1 Digest auth from RFC 2617 */ } HTTPAuthType; +typedef struct { + char nonce[300]; /**< Server specified nonce */ + char algorithm[10]; /**< Server specified digest algorithm */ + char qop[30]; /**< Quality of protection, containing the one + * that we've chosen to use, from the + * alternatives that the server offered. */ + char opaque[300]; /**< A server-specified string that should be + * included in authentication responses, not + * included in the actual digest calculation. */ + int nc; /**< Nonce count, the number of earlier replies + * where this particular nonce has been used. */ +} DigestParams; + /** * HTTP Authentication state structure. Must be zero-initialized * before used with the functions below. @@ -44,6 +58,10 @@ * Authentication realm */ char realm[200]; + /** + * The parameters specifiec to digest authentication. + */ + DigestParams digest_params; } HTTPAuthState; void ff_http_auth_handle_header(HTTPAuthState *state, const char *key,
