Home | History | Annotate | Download | only in http
      1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
      2 // Use of this source code is governed by a BSD-style license that can be
      3 // found in the LICENSE file.
      4 
      5 // See "SSPI Sample Application" at
      6 // http://msdn.microsoft.com/en-us/library/aa918273.aspx
      7 // and "NTLM Security Support Provider" at
      8 // http://msdn.microsoft.com/en-us/library/aa923611.aspx.
      9 
     10 #include "net/http/http_auth_handler_ntlm.h"
     11 
     12 #include "base/logging.h"
     13 #include "base/string_util.h"
     14 #include "net/base/net_errors.h"
     15 #include "net/base/net_util.h"
     16 #include "net/http/http_auth_sspi_win.h"
     17 
     18 #pragma comment(lib, "secur32.lib")
     19 
     20 namespace net {
     21 
     22 HttpAuthHandlerNTLM::HttpAuthHandlerNTLM() :  auth_sspi_("NTLM", NTLMSP_NAME) {
     23 }
     24 
     25 HttpAuthHandlerNTLM::~HttpAuthHandlerNTLM() {
     26 }
     27 
     28 // Require identity on first pass instead of second.
     29 bool HttpAuthHandlerNTLM::NeedsIdentity() {
     30   return auth_sspi_.NeedsIdentity();
     31 }
     32 
     33 bool HttpAuthHandlerNTLM::IsFinalRound() {
     34   return auth_sspi_.IsFinalRound();
     35 }
     36 
     37 
     38 }  // namespace net
     39 
     40