1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/extensions/auth/nsHttpNegotiateAuth.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,39 @@ 1.4 +/* vim:set ts=4 sw=4 et cindent: */ 1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public 1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this 1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 1.8 + 1.9 +#ifndef nsHttpNegotiateAuth_h__ 1.10 +#define nsHttpNegotiateAuth_h__ 1.11 + 1.12 +#include "nsIHttpAuthenticator.h" 1.13 +#include "nsIURI.h" 1.14 +#include "nsSubstring.h" 1.15 +#include "mozilla/Attributes.h" 1.16 + 1.17 +// The nsHttpNegotiateAuth class provides responses for the GSS-API Negotiate method 1.18 +// as specified by Microsoft in draft-brezak-spnego-http-04.txt 1.19 + 1.20 +class nsHttpNegotiateAuth MOZ_FINAL : public nsIHttpAuthenticator 1.21 +{ 1.22 +public: 1.23 + NS_DECL_ISUPPORTS 1.24 + NS_DECL_NSIHTTPAUTHENTICATOR 1.25 + 1.26 +private: 1.27 + // returns the value of the given boolean pref 1.28 + bool TestBoolPref(const char *pref); 1.29 + 1.30 + // tests if the host part of an uri is fully qualified 1.31 + bool TestNonFqdn(nsIURI *uri); 1.32 + 1.33 + // returns true if URI is accepted by the list of hosts in the pref 1.34 + bool TestPref(nsIURI *, const char *pref); 1.35 + 1.36 + bool MatchesBaseURI(const nsCSubstring &scheme, 1.37 + const nsCSubstring &host, 1.38 + int32_t port, 1.39 + const char *baseStart, 1.40 + const char *baseEnd); 1.41 +}; 1.42 +#endif /* nsHttpNegotiateAuth_h__ */