Gathering detailed insights and metrics for axios-ntlm
Gathering detailed insights and metrics for axios-ntlm
Gathering detailed insights and metrics for axios-ntlm
Gathering detailed insights and metrics for axios-ntlm
npm install axios-ntlm
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
7 Stars
69 Commits
16 Forks
4 Watching
2 Branches
5 Contributors
Updated on 12 Sept 2024
JavaScript (80.61%)
TypeScript (19.39%)
Cumulative downloads
Total Downloads
Last day
4.7%
66,502
Compared to previous day
Last week
4.3%
338,769
Compared to previous week
Last month
6.7%
1,420,355
Compared to previous month
Last year
48%
13,657,090
Compared to previous year
2
This is a helper library for NTLM Authentication using the Axios HTTP library on Node. It attaches interceptors to an axios instance to authenticate using NTLM for any resources that offer it.
This example will create you a brand new axios instance you can utilise the same as any other axios instance
1 2import { NtlmClient } from 'axios-ntlm'; 3 4(async () => { 5 6 let credentials: NtlmCredentials = { 7 username: 'username', 8 password: "password", 9 domain: 'domain' 10 } 11 12 let client = NtlmClient(credentials) 13 14 try { 15 let resp = await client({ 16 url: 'https://protected.site.example.com', 17 method: 'get' 18 }); 19 console.log(resp.data); 20 } 21 catch (err) { 22 console.log(err) 23 console.log("Failed") 24 } 25 26})() 27
This shows how to pass in an axios config in the same way that you would when setting up any other axios instance.
Note: If doing this, be aware that http(s)Agents need to be attached to keep the connection alive. If there are none attached already, they will be added. If you are providing your own then you will need to set this up.
1import { AxiosRequestConfig } from 'axios'; 2import { NtlmClient, NtlmCredentials } from 'axios-ntlm'; 3 4(async () => { 5 6 let credentials: NtlmCredentials = { 7 username: 'username', 8 password: "password", 9 domain: 'domain' 10 } 11 12 let config: AxiosRequestConfig = { 13 baseURL: 'https://protected.site.example.com', 14 method: 'get' 15 } 16 17 let client = NtlmClient(credentials, config) 18 19 try { 20 let resp = await client.get('/api/123') 21 console.log(resp); 22 } 23 catch (err) { 24 console.log(err) 25 console.log("Failed") 26 } 27 28})() 29
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
1 existing vulnerabilities detected
Details
Reason
Found 5/13 approved changesets -- score normalized to 3
Reason
dependency not pinned by hash detected -- score normalized to 3
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2024-11-25
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More