1 /* vim:set ts=4 sw=4 et cindent: */
2 /* ***** BEGIN LICENSE BLOCK *****
3 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
5 * The contents of this file are subject to the Mozilla Public License Version
6 * 1.1 (the "License"); you may not use this file except in compliance with
7 * the License. You may obtain a copy of the License at
8 * http://www.mozilla.org/MPL/
10 * Software distributed under the License is distributed on an "AS IS" basis,
11 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
12 * for the specific language governing rights and limitations under the
15 * The Original Code is the Negotiateauth
17 * The Initial Developer of the Original Code is Daniel Kouril.
18 * Portions created by the Initial Developer are Copyright (C) 2003
19 * the Initial Developer. All Rights Reserved.
22 * Daniel Kouril <kouril@ics.muni.cz> (original author)
23 * Wyllys Ingersoll <wyllys.ingersoll@sun.com>
24 * Christopher Nebergall <cneberg@sandia.gov>
25 * Darin Fisher <darin@meer.net>
27 * Alternatively, the contents of this file may be used under the terms of
28 * either the GNU General Public License Version 2 or later (the "GPL"), or
29 * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
30 * in which case the provisions of the GPL or the LGPL are applicable instead
31 * of those above. If you wish to allow use of your version of this file only
32 * under the terms of either the GPL or the LGPL, and not to allow others to
33 * use your version of this file under the terms of the MPL, indicate your
34 * decision by deleting the provisions above and replace them with the notice
35 * and other provisions required by the GPL or the LGPL. If you do not delete
36 * the provisions above, a recipient may use your version of this file under
37 * the terms of any one of the MPL, the GPL or the LGPL.
39 * ***** END LICENSE BLOCK ***** */
41 #ifndef nsAuthGSSAPI_h__
42 #define nsAuthGSSAPI_h__
45 #include "nsIAuthModule.h"
48 #define GSS_USE_FUNCTION_POINTERS 1
52 // The nsAuthGSSAPI class provides responses for the GSS-API Negotiate method
53 // as specified by Microsoft in draft-brezak-spnego-http-04.txt
55 /* Some remarks on thread safety ...
57 * The thread safety of this class depends largely upon the thread safety of
58 * the underlying GSSAPI and Kerberos libraries. This code just loads the
59 * system GSSAPI library, and whilst it avoids loading known bad libraries,
60 * it cannot determine the thread safety of the the code it loads.
62 * When used with a non-threadsafe library, it is not safe to simultaneously
63 * use multiple instantiations of this class.
65 * When used with a threadsafe Kerberos library, multiple instantiations of
66 * this class may happily co-exist. Methods may be sequentially called from
67 * multiple threads. The nature of the GSSAPI protocol is such that a correct
68 * implementation will never call methods in parallel, as the results of the
69 * last call are required as input to the next.
72 class nsAuthGSSAPI
: public nsIAuthModule
78 nsAuthGSSAPI(pType package
);
80 static void Shutdown();
83 ~nsAuthGSSAPI() { Reset(); }
86 gss_OID
GetOID() { return mMechOID
; }
91 nsCString mServiceName
;
92 PRUint32 mServiceFlags
;
97 #endif /* nsAuthGSSAPI_h__ */