michael@0: /* vim:set ts=4 sw=4 et cindent: */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #ifndef nsAuthSSPI_h__ michael@0: #define nsAuthSSPI_h__ michael@0: michael@0: #include "nsAuth.h" michael@0: #include "nsIAuthModule.h" michael@0: #include "nsString.h" michael@0: michael@0: #include michael@0: michael@0: #define SECURITY_WIN32 1 michael@0: #include michael@0: #include michael@0: #include michael@0: michael@0: // The nsNegotiateAuth class provides responses for the GSS-API Negotiate method michael@0: // as specified by Microsoft in draft-brezak-spnego-http-04.txt michael@0: michael@0: // It can also be configured to talk raw NTLM. This implementation of NTLM has michael@0: // the advantage of being able to access the user's logon credentials. This michael@0: // implementation of NTLM should only be used for single-signon. It should be michael@0: // avoided when authenticating over the internet since it may use a lower-grade michael@0: // version of password hashing depending on the version of Windows being used. michael@0: michael@0: class nsAuthSSPI MOZ_FINAL : public nsIAuthModule michael@0: { michael@0: public: michael@0: NS_DECL_ISUPPORTS michael@0: NS_DECL_NSIAUTHMODULE michael@0: michael@0: nsAuthSSPI(pType package = PACKAGE_TYPE_NEGOTIATE); michael@0: michael@0: private: michael@0: ~nsAuthSSPI(); michael@0: michael@0: void Reset(); michael@0: michael@0: typedef TimeStamp MS_TimeStamp; michael@0: michael@0: private: michael@0: CredHandle mCred; michael@0: CtxtHandle mCtxt; michael@0: nsCString mServiceName; michael@0: uint32_t mServiceFlags; michael@0: uint32_t mMaxTokenLen; michael@0: pType mPackage; michael@0: nsString mDomain; michael@0: nsString mUsername; michael@0: nsString mPassword; michael@0: bool mIsFirst; michael@0: void* mCertDERData; michael@0: uint32_t mCertDERLength; michael@0: }; michael@0: michael@0: #endif /* nsAuthSSPI_h__ */