2005-08-10 03:06:39 +04:00
|
|
|
/* vim:set ts=4 sw=4 et cindent: */
|
2012-05-21 15:12:37 +04:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
2005-08-10 03:06:39 +04:00
|
|
|
|
|
|
|
#ifndef nsHttpNegotiateAuth_h__
|
|
|
|
#define nsHttpNegotiateAuth_h__
|
|
|
|
|
|
|
|
#include "nsIHttpAuthenticator.h"
|
|
|
|
#include "nsIURI.h"
|
|
|
|
#include "nsSubstring.h"
|
2012-06-13 07:13:31 +04:00
|
|
|
#include "mozilla/Attributes.h"
|
2005-08-10 03:06:39 +04:00
|
|
|
|
2005-08-18 19:22:33 +04:00
|
|
|
// The nsHttpNegotiateAuth class provides responses for the GSS-API Negotiate method
|
2005-08-10 03:06:39 +04:00
|
|
|
// as specified by Microsoft in draft-brezak-spnego-http-04.txt
|
|
|
|
|
2012-06-13 07:13:31 +04:00
|
|
|
class nsHttpNegotiateAuth MOZ_FINAL : public nsIHttpAuthenticator
|
2005-08-10 03:06:39 +04:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
NS_DECL_ISUPPORTS
|
|
|
|
NS_DECL_NSIHTTPAUTHENTICATOR
|
|
|
|
|
|
|
|
private:
|
2005-08-10 03:06:49 +04:00
|
|
|
// returns the value of the given boolean pref
|
2011-09-29 10:19:26 +04:00
|
|
|
bool TestBoolPref(const char *pref);
|
2005-08-10 03:06:49 +04:00
|
|
|
|
2012-02-17 19:24:31 +04:00
|
|
|
// tests if the host part of an uri is fully qualified
|
|
|
|
bool TestNonFqdn(nsIURI *uri);
|
|
|
|
|
2005-08-10 03:06:39 +04:00
|
|
|
// returns true if URI is accepted by the list of hosts in the pref
|
2011-09-29 10:19:26 +04:00
|
|
|
bool TestPref(nsIURI *, const char *pref);
|
2005-08-10 03:06:39 +04:00
|
|
|
|
2011-09-29 10:19:26 +04:00
|
|
|
bool MatchesBaseURI(const nsCSubstring &scheme,
|
2005-08-10 03:06:39 +04:00
|
|
|
const nsCSubstring &host,
|
|
|
|
PRInt32 port,
|
|
|
|
const char *baseStart,
|
|
|
|
const char *baseEnd);
|
|
|
|
};
|
|
|
|
#endif /* nsHttpNegotiateAuth_h__ */
|