1 /* vim:set ts=4 sw=4 et cindent: */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 #ifndef nsAuthGSSAPI_h__
7 #define nsAuthGSSAPI_h__
10 #include "nsIAuthModule.h"
12 #include "mozilla/Attributes.h"
14 #define GSS_USE_FUNCTION_POINTERS 1
18 // The nsAuthGSSAPI class provides responses for the GSS-API Negotiate method
19 // as specified by Microsoft in draft-brezak-spnego-http-04.txt
21 /* Some remarks on thread safety ...
23 * The thread safety of this class depends largely upon the thread safety of
24 * the underlying GSSAPI and Kerberos libraries. This code just loads the
25 * system GSSAPI library, and whilst it avoids loading known bad libraries,
26 * it cannot determine the thread safety of the the code it loads.
28 * When used with a non-threadsafe library, it is not safe to simultaneously
29 * use multiple instantiations of this class.
31 * When used with a threadsafe Kerberos library, multiple instantiations of
32 * this class may happily co-exist. Methods may be sequentially called from
33 * multiple threads. The nature of the GSSAPI protocol is such that a correct
34 * implementation will never call methods in parallel, as the results of the
35 * last call are required as input to the next.
38 class nsAuthGSSAPI MOZ_FINAL
: public nsIAuthModule
41 NS_DECL_THREADSAFE_ISUPPORTS
44 nsAuthGSSAPI(pType package
);
46 static void Shutdown();
49 ~nsAuthGSSAPI() { Reset(); }
52 gss_OID
GetOID() { return mMechOID
; }
57 nsCString mServiceName
;
58 uint32_t mServiceFlags
;
63 #endif /* nsAuthGSSAPI_h__ */