moodle3session
moodle3session is a module allowing to obtain a moodle session cookie for moodle3 instances. With that cookie it is possible to act like a real logged in user.
Installation
npm install moodle3session --saveyarn add moodle3sessionbower install moodle3session --save
Usage
To get a moodle session you have to create a new MoodleSession
object...
const moodle3session = ;const session = 'https://moodle.mysite.de';... const moodleSession = await session; // stringconst stillValid = await session; // boolean