Skip to content

Erlang client for NTLM Authentication and NTLM Over HTTP

License

Notifications You must be signed in to change notification settings

gotthardp/erlang-ntlm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Erlang client for NTLM Authentication and NTLM Over HTTP

Client-side implementation of:

  • NT LAN Manager (NTLM) Authentication Protocol [MS-NLMP]
  • NTLM Over HTTP Protocol [MS-NTHT]

This enables Erlang implementations to interface Microsoft SharePoint and other Microsoft Internet Information Services (IIS) based applications. Few sample functions are provided for interfacing the SharePoint 2013 REST API.

Usage

NT LAN Manager (NTLM) Authentication Protocol

negotiate() -> NegotiateMessage

Constructs the NTLM NEGOTIATE_MESSAGE:

  • NegotiateMessage = binary()

authenticate(Workstation, DomainName, UserName, Password, ChallengeMessage) -> AuthenticateMessage

Parses the NTLM CHALLENGE_MESSAGE and constructs the NTLM AUTHENTICATE_MESSAGE:

  • Workstation = workstationstring()
  • DomainName = domainstring()
  • UserName = httpc:userstring()
  • Password = httpc:passwordstring()
  • ChallengeMessage = binary()
  • AuthenticateMessage = binary()

NTLM Over HTTP Protocol

ntlm_httpc:request(Method, Request, Credentials) -> {ok, Result} | {error, Reason}

Replacement of httpc:request that supports NTLM authentication:

  • Method = httpc:method()
  • Request = httpc:request()
  • Credentials = {workstationstring(), domainstring(), httpc:userstring(), httpc:passwordstring()}
  • Result = {status_line(), headers(), Body}
  • Body = binary()

Copyright and Licensing

This software is distributed under the terms of the MIT License. See the LICENSE.

Copyright (c) 2016-2019 Petr Gotthard

About

Erlang client for NTLM Authentication and NTLM Over HTTP

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages