Merge mozilla-central to autoland. CLOSED TREE
[gecko.git] / extensions / auth / nsHttpNegotiateAuth.h
blobd84f04df5ad13f2a30c2a038328f064563ff242f
1 /* vim:set ts=4 sw=2 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 nsHttpNegotiateAuth_h__
7 #define nsHttpNegotiateAuth_h__
9 #include "nsIHttpAuthenticator.h"
10 #include "nsIURI.h"
11 #include "mozilla/StaticPtr.h"
13 // The nsHttpNegotiateAuth class provides responses for the GSS-API Negotiate
14 // method as specified by Microsoft in draft-brezak-spnego-http-04.txt
16 class nsHttpNegotiateAuth final : public nsIHttpAuthenticator {
17 public:
18 NS_DECL_THREADSAFE_ISUPPORTS
19 NS_DECL_NSIHTTPAUTHENTICATOR
21 static already_AddRefed<nsIHttpAuthenticator> GetOrCreate();
23 private:
24 ~nsHttpNegotiateAuth() {}
26 // returns the value of the given boolean pref
27 bool TestBoolPref(const char* pref);
29 // tests if the host part of an uri is fully qualified
30 bool TestNonFqdn(nsIURI* uri);
32 // Singleton pointer
33 static mozilla::StaticRefPtr<nsHttpNegotiateAuth> gSingleton;
35 #endif /* nsHttpNegotiateAuth_h__ */