Thu, 22 Jan 2015 13:21:57 +0100
Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6
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 nsHttpNegotiateAuth_h__
7 #define nsHttpNegotiateAuth_h__
9 #include "nsIHttpAuthenticator.h"
10 #include "nsIURI.h"
11 #include "nsSubstring.h"
12 #include "mozilla/Attributes.h"
14 // The nsHttpNegotiateAuth class provides responses for the GSS-API Negotiate method
15 // as specified by Microsoft in draft-brezak-spnego-http-04.txt
17 class nsHttpNegotiateAuth MOZ_FINAL : public nsIHttpAuthenticator
18 {
19 public:
20 NS_DECL_ISUPPORTS
21 NS_DECL_NSIHTTPAUTHENTICATOR
23 private:
24 // returns the value of the given boolean pref
25 bool TestBoolPref(const char *pref);
27 // tests if the host part of an uri is fully qualified
28 bool TestNonFqdn(nsIURI *uri);
30 // returns true if URI is accepted by the list of hosts in the pref
31 bool TestPref(nsIURI *, const char *pref);
33 bool MatchesBaseURI(const nsCSubstring &scheme,
34 const nsCSubstring &host,
35 int32_t port,
36 const char *baseStart,
37 const char *baseEnd);
38 };
39 #endif /* nsHttpNegotiateAuth_h__ */