]> git.sesse.net Git - ffmpeg/blobdiff - libavformat/httpauth.h
Merge commit '9446d75941d639f19cfa9ae007eb4c5ca041f200'
[ffmpeg] / libavformat / httpauth.h
index 47d11af51afd4688e58a68c69ff109f79b747d63..ebab3fca297fe02b37eecd6e1c10879ebcb912b8 100644 (file)
@@ -29,8 +29,22 @@ typedef enum HTTPAuthType {
     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 @@ typedef struct {
      * 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,