Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
webdav request made easy
Browsers
and Node.js
commonjs
and esm
npm install tsdav
or
yarn add tsdav
import { createDAVClient } from 'tsdav';
(async () => {
const client = await createDAVClient({
serverUrl: 'https://apidata.googleusercontent.com/caldav/v2/',
credentials: {
tokenUrl: 'https://accounts.google.com/o/oauth2/token',
username: 'YOUR_EMAIL_ADDRESS',
refreshToken: 'YOUR_REFRESH_TOKEN_WITH_CALDAV_PERMISSION',
clientId: 'YOUR_CLIENT_ID',
clientSecret: 'YOUR_CLIENT_SECRET',
},
authMethod: 'Oauth',
defaultAccountType: 'caldav',
});
const calendars = await client.fetchCalendars();
const calendarObjects = await client.fetchCalendarObjects({
calendar: calendars[0],
});
})();
import { createDAVClient } from 'tsdav';
(async () => {
const client = await createDAVClient({
serverUrl: 'https://contacts.icloud.com',
credentials: {
username: 'YOUR_APPLE_ID',
password: 'YOUR_APP_SPECIFIC_PASSWORD',
},
authMethod: 'Basic',
defaultAccountType: 'carddav',
});
const addressBooks = await client.fetchAddressBooks();
const vcards = await client.fetchVCards({
addressBook: addressBooks[0],
});
})();
After v1.1.0
, you have a new way of creating clients.
import { DAVClient } from 'tsdav';
const client = new DAVClient({
serverUrl: 'https://apidata.googleusercontent.com/caldav/v2/',
credentials: {
tokenUrl: 'https://accounts.google.com/o/oauth2/token',
username: 'YOUR_EMAIL_ADDRESS',
refreshToken: 'YOUR_REFRESH_TOKEN_WITH_CALDAV_PERMISSION',
clientId: 'YOUR_CLIENT_ID',
clientSecret: 'YOUR_CLIENT_SECRET',
},
authMethod: 'Oauth',
defaultAccountType: 'caldav',
});
(async () => {
await client.login();
const calendars = await client.fetchCalendars();
const calendarObjects = await client.fetchCalendarObjects({
calendar: calendars[0],
});
})();
import { DAVClient } from 'tsdav';
const client = new DAVClient({
serverUrl: 'https://contacts.icloud.com',
credentials: {
username: 'YOUR_APPLE_ID',
password: 'YOUR_APP_SPECIFIC_PASSWORD',
},
authMethod: 'Basic',
defaultAccountType: 'carddav',
});
(async () => {
await client.login();
const addressBooks = await client.fetchAddressBooks();
const vcards = await client.fetchVCards({
addressBook: addressBooks[0],
});
})();
Check out the Documentation
refers to Changelog
this package uses debug
package,
add tsdav:*
to DEBUG
env variable to enable debug logs
FAQs
WebDAV, CALDAV, and CARDDAV client for Nodejs and the Browser
We found that tsdav demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.