How to use the httpntlm.ntlm function in httpntlm

To help you get started, we’ve selected a few httpntlm examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github postmanlabs / postman-runtime / test / fixtures / server.js View on Github external
const fs = require('fs'),
    net = require('net'),
    url = require('url'),
    dns = require('dns'),
    _ = require('lodash'),
    path = require('path'),
    http = require('http'),
    https = require('https'),
    crypto = require('crypto'),
    GraphQL = require('graphql'),
    ntlmUtils = require('httpntlm').ntlm,
    enableServerDestroy = require('server-destroy');

/**
 * Echo raw request message to test
 *  - Body for HTTP methods like GET, HEAD
 *  - Custom HTTP methods
 *
 * @example
 * var s = createRawEchoServer();
 *
 * s.listen(3000, function() {
 *   console.log(s.port);
 *   s.close();
 * });
 *
 * @note For HEAD request, read body from `raw-request` response header
github s-KaiNet / sp-request / test / unit / OnPremResolver.spec.ts View on Github external
mockery.enable({
      warnOnReplace: false,
      warnOnUnregistered: false,
      useCleanCache: true
    });

    requestDeferred = defer();

    requestPromiseStub = sinon.stub().returns(requestDeferred.promise);

    mockery.registerMock('request-promise', requestPromiseStub);

    let resolverModule: any = require('./../../src/core/auth/OnPremResolver');
    resolver = new resolverModule.OnPremResolver();
    let ntlm: any = require('httpntlm').ntlm;
    sinon.stub(ntlm, 'createType1Message').returns(type1Message);
    sinon.stub(ntlm, 'parseType2Message').returns(type2Message);
    sinon.stub(ntlm, 'createType3Message').returns(type3Message);
  });
github postmanlabs / postman-runtime / lib / authorizer / ntlm.js View on Github external
/**
 * @fileOverview
 *
 * Implements the NTLM over HTTP specification: [MS-NTHT] https://msdn.microsoft.com/en-us/library/cc237488.aspx
 * Also see [MS-NLMP]: https://msdn.microsoft.com/en-us/library/cc236621.aspx
 *
 * @note NTLM supports a number of different variations, where an actual TCP connection is signed etc. This file
 * does _not_ implement those cases.
 */

var ntlmUtil = require('httpntlm').ntlm,
    _ = require('lodash'),

    EMPTY = '',
    NTLM = 'NTLM',
    STATE = 'state',
    NEGOTIATE = 'negotiate',
    NTLM_HEADER = 'ntlmHeader',
    AUTHORIZATION = 'Authorization',
    WWW_AUTHENTICATE = 'www-authenticate',
    DISABLE_RETRY_REQUEST = 'disableRetryRequest',
    NTLM_PARAMETERS = {
        DOMAIN: 'domain',
        WORKSTATION: 'workstation',
        USERNAME: 'username',
        PASSWORD: 'password'
    },

httpntlm

httpntlm is a Node.js library to do HTTP NTLM authentication

MIT
Latest version published 11 months ago

Package Health Score

74 / 100
Full package analysis