Bug 1568151 - Replace `target.getInspector()` by `target.getFront("inspector")`....
[gecko.git] / extensions / auth / nsHttpNegotiateAuth.h
blobc69c4c3c568e9ff64f68fda733bffa51e5c9ee3a
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/Attributes.h"
12 #include "mozilla/LazyIdleThread.h"
13 #include "mozilla/StaticPtr.h"
15 // The nsHttpNegotiateAuth class provides responses for the GSS-API Negotiate
16 // method as specified by Microsoft in draft-brezak-spnego-http-04.txt
18 class nsHttpNegotiateAuth final : public nsIHttpAuthenticator {
19 public:
20 NS_DECL_THREADSAFE_ISUPPORTS
21 NS_DECL_NSIHTTPAUTHENTICATOR
23 static already_AddRefed<nsIHttpAuthenticator> GetOrCreate();
25 private:
26 ~nsHttpNegotiateAuth() {}
28 // returns the value of the given boolean pref
29 bool TestBoolPref(const char* pref);
31 // tests if the host part of an uri is fully qualified
32 bool TestNonFqdn(nsIURI* uri);
34 // Thread for GenerateCredentialsAsync
35 RefPtr<mozilla::LazyIdleThread> mNegotiateThread;
37 // Singleton pointer
38 static mozilla::StaticRefPtr<nsHttpNegotiateAuth> gSingleton;
40 #endif /* nsHttpNegotiateAuth_h__ */