2005-08-09 23:06:39 +00:00
|
|
|
/* vim:set ts=4 sw=4 et cindent: */
|
2012-05-21 11:12:37 +00: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-09 23:06:39 +00:00
|
|
|
|
|
|
|
#ifndef nsHttpNegotiateAuth_h__
|
|
|
|
#define nsHttpNegotiateAuth_h__
|
|
|
|
|
|
|
|
#include "nsIHttpAuthenticator.h"
|
|
|
|
#include "nsIURI.h"
|
|
|
|
#include "nsSubstring.h"
|
2012-06-13 03:13:31 +00:00
|
|
|
#include "mozilla/Attributes.h"
|
2005-08-09 23:06:39 +00:00
|
|
|
|
2005-08-18 15:22:33 +00:00
|
|
|
// The nsHttpNegotiateAuth class provides responses for the GSS-API Negotiate method
|
2005-08-09 23:06:39 +00:00
|
|
|
// as specified by Microsoft in draft-brezak-spnego-http-04.txt
|
|
|
|
|
2012-06-13 03:13:31 +00:00
|
|
|
class nsHttpNegotiateAuth MOZ_FINAL : public nsIHttpAuthenticator
|
2005-08-09 23:06:39 +00:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
NS_DECL_ISUPPORTS
|
|
|
|
NS_DECL_NSIHTTPAUTHENTICATOR
|
|
|
|
|
|
|
|
private:
|
2005-08-09 23:06:49 +00:00
|
|
|
// returns the value of the given boolean pref
|
2011-09-29 06:19:26 +00:00
|
|
|
bool TestBoolPref(const char *pref);
|
2005-08-09 23:06:49 +00:00
|
|
|
|
2012-02-17 15:24:31 +00:00
|
|
|
// tests if the host part of an uri is fully qualified
|
|
|
|
bool TestNonFqdn(nsIURI *uri);
|
|
|
|
|
2005-08-09 23:06:39 +00:00
|
|
|
// returns true if URI is accepted by the list of hosts in the pref
|
2011-09-29 06:19:26 +00:00
|
|
|
bool TestPref(nsIURI *, const char *pref);
|
2005-08-09 23:06:39 +00:00
|
|
|
|
2011-09-29 06:19:26 +00:00
|
|
|
bool MatchesBaseURI(const nsCSubstring &scheme,
|
2005-08-09 23:06:39 +00:00
|
|
|
const nsCSubstring &host,
|
2012-08-22 15:56:38 +00:00
|
|
|
int32_t port,
|
2005-08-09 23:06:39 +00:00
|
|
|
const char *baseStart,
|
|
|
|
const char *baseEnd);
|
|
|
|
};
|
|
|
|
#endif /* nsHttpNegotiateAuth_h__ */
|