Popularity
2.0
Declining
Activity
0.0
Stable
4
2
1
Programming language: Crystal
License: MIT License
Tags:
HTTP
ntlm alternatives and similar shards
Based on the "HTTP" category.
Alternatively, view ntlm alternatives based on common mentions on social networks and blogs.
-
halite
💎HTTP Requests Client with a chainable REST API, built-in sessions and middlewares. -
cossack
Simple and flexible HTTP client for Crystal with middleware and test support. -
Cable
It's like ActionCable (100% compatible with JS Client), but you know, for Crystal -
http-protection
This library protects against typical web attacks. It was inspired in rack-protection Ruby gem. -
crystal-routing
Extensible library to deal with http request and string based routing in Crystal -
http-params-serializable
The HTTP params parsing module for Crystal 🤓 -
http_parser.cr
Crystal wrapper for Http Parser lib: https://github.com/joyent/http-parser -
multipart.cr
Adds multipart and multipart/form-data support to the crystal standard library -
ContentDisposition
Crystal shard to create HTTP Content-Disposition headers with proper escaping/encoding of filenames -
http_distributor
http server which allows sneaky http request though it. -
crystal-cossack
Simple and flexible HTTP client for Crystal with middleware and test support.
Updating dependencies is time-consuming.
Solutions like Dependabot or Renovate update but don't merge dependencies. You need to do it manually while it could be fully automated! Add a Merge Queue to your workflow and stop caring about PR management & merging. Try Mergify for free.
Promo
blog.mergify.com
Do you think we are missing an alternative of ntlm or a related project?
README
Crystal Lang NTLM Auth
Communicate with servers that implement NTLM auth.
Installation
- Add the dependency to your
shard.yml
:
dependencies:
ntlm:
github: spider-gazelle/ntlm
- Run
shards install
Usage
Authenticate a HTTP request
require "http/client"
require "ntlm"
route = "/terrible/soap/api"
username = "username"
password = "password"
# NOTE:: domain is not always required, this can sometimes be left `nil`
domain = "DOMAIN"
client = HTTP::Client.new "corporate.service"
response = client.get route
if response.status_code == 401 && response.headers["WWW-Authenticate"]?
supported = response.headers.get("WWW-Authenticate")
raise "doesn't support NTLM auth: #{supported}" unless supported.includes?("NTLM")
# Negotiate NTLM
response = client.get route, HTTP::Headers{"Authorization" => NTLM.negotiate_http(domain)}
# Extract the challenge
raise "unexpected response #{response.status_code}" unless response.status_code == 401 && response.headers["WWW-Authenticate"]?
challenge = response.headers["WWW-Authenticate"]
# Authenticate the client
response = client.get route, HTTP::Headers{"Authorization" => NTLM.authenticate_http(challenge, username, password)}
end
response