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
michael@0 | 1 | /* vim:set ts=4 sw=4 et cindent: */ |
michael@0 | 2 | /* This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 3 | * License, v. 2.0. If a copy of the MPL was not distributed with this |
michael@0 | 4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
michael@0 | 5 | |
michael@0 | 6 | #ifndef nsHttpNegotiateAuth_h__ |
michael@0 | 7 | #define nsHttpNegotiateAuth_h__ |
michael@0 | 8 | |
michael@0 | 9 | #include "nsIHttpAuthenticator.h" |
michael@0 | 10 | #include "nsIURI.h" |
michael@0 | 11 | #include "nsSubstring.h" |
michael@0 | 12 | #include "mozilla/Attributes.h" |
michael@0 | 13 | |
michael@0 | 14 | // The nsHttpNegotiateAuth class provides responses for the GSS-API Negotiate method |
michael@0 | 15 | // as specified by Microsoft in draft-brezak-spnego-http-04.txt |
michael@0 | 16 | |
michael@0 | 17 | class nsHttpNegotiateAuth MOZ_FINAL : public nsIHttpAuthenticator |
michael@0 | 18 | { |
michael@0 | 19 | public: |
michael@0 | 20 | NS_DECL_ISUPPORTS |
michael@0 | 21 | NS_DECL_NSIHTTPAUTHENTICATOR |
michael@0 | 22 | |
michael@0 | 23 | private: |
michael@0 | 24 | // returns the value of the given boolean pref |
michael@0 | 25 | bool TestBoolPref(const char *pref); |
michael@0 | 26 | |
michael@0 | 27 | // tests if the host part of an uri is fully qualified |
michael@0 | 28 | bool TestNonFqdn(nsIURI *uri); |
michael@0 | 29 | |
michael@0 | 30 | // returns true if URI is accepted by the list of hosts in the pref |
michael@0 | 31 | bool TestPref(nsIURI *, const char *pref); |
michael@0 | 32 | |
michael@0 | 33 | bool MatchesBaseURI(const nsCSubstring &scheme, |
michael@0 | 34 | const nsCSubstring &host, |
michael@0 | 35 | int32_t port, |
michael@0 | 36 | const char *baseStart, |
michael@0 | 37 | const char *baseEnd); |
michael@0 | 38 | }; |
michael@0 | 39 | #endif /* nsHttpNegotiateAuth_h__ */ |