Revert "Add missing (?) library"
[moonshot-firefox.git] / nsHttpMoonshot.h
1 /* The contents of this file are subject to the Mozilla Public License Version
2  * 1.1 (the "License"); you may not use this file except in compliance with
3  * the License. You may obtain a copy of the License at
4  * http://www.mozilla.org/MPL/
5  *
6  * Software distributed under the License is distributed on an "AS IS" basis,
7  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
8  * for the specific language governing rights and limitations under the
9  * License.
10  *
11  * The Original Code is the Negotiateauth
12  *
13  * The Initial Developer of the Original Code is Daniel Kouril.
14  * Portions created by the Initial Developer are Copyright (C) 2003
15  * the Initial Developer. All Rights Reserved.
16  *
17  * Contributor(s):
18  *   Daniel Kouril <kouril@ics.muni.cz> (original author)
19  *   Wyllys Ingersoll <wyllys.ingersoll@sun.com>
20  *   Christopher Nebergall <cneberg@sandia.gov>
21  */
22
23 #ifndef nsMoonshot_h__
24 #define nsMoonshot_h__
25
26 #include "nsIHttpAuthenticator.h"
27
28 #include <gssapi.h>
29 #include <gssapi/gssapi_ext.h>
30
31 #define NS_HTTPMOONSHOT_CID \
32 { /* 75c80fd0-accb-432c-af59-ec60668c3991 */         \
33     0x75c80fd0,                                      \
34     0xaccb,                                          \
35     0x432c,                                          \
36     {0xaf, 0x59, 0xec, 0x60, 0x66, 0x8c, 0x39, 0x91} \
37 }
38
39 #define NS_HTTP_AUTHENTICATOR_CONTRACTID        \
40         "@mozilla.org/network/http-authenticator;1?scheme=gssapi"
41
42 #define NEGOTIATE_AUTH "GSSAPI"
43
44 class nsHttpMoonshot : public nsIHttpAuthenticator
45 #if 0
46 ,
47                          public nsIHttpAuthenticator_1_9_2
48 #endif
49 {
50    public:
51       NS_DECL_ISUPPORTS
52       NS_DECL_NSIHTTPAUTHENTICATOR
53 #if 0
54       NS_DECL_NSIHTTPAUTHENTICATOR_1_9_2
55 #endif
56
57
58       nsHttpMoonshot();
59       virtual ~nsHttpMoonshot();
60
61
62       NS_IMETHODIMP
63       GenerateCredentials_1_9_2(nsIHttpChannel *httpChannel,
64                                                const char *challenge,
65                                                PRBool isProxyAuth,
66                                                const PRUnichar *domain,
67                                                const PRUnichar *username,
68                                                const PRUnichar *password,
69                                                nsISupports **sessionState,
70                                                nsISupports **continuationState,
71                                                PRUint32 *flags,
72                                                char **creds);
73
74    private:
75       void LogGssError(OM_uint32 maj, OM_uint32 min, char *prefix);
76 };
77 #endif /* nsMoonshot_h__ */