Skip to content
This repository has been archived by the owner on Sep 17, 2023. It is now read-only.

Lets you login to the «Université de Lorraine» central authentication system and fetch pages from the UL services using the authenticated session

License

Notifications You must be signed in to change notification settings

ifndev/univ-lorraine-cas-session

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

univ-lorraine-cas-session

Usage

// Import
import ULSession from "univ-lorraine-cas-session";

// Create a new ULSession
let ulSession = new ULSession();

// Log in
ulSession.login("username", "password")
    .then(
        () => {
            // We are now logged in
            console.log("logged in sucessfuly");
            
            // Fetch a page using the newly authenticated session
            ulSession.fetchPage("https://assiduite.univ-lorraine.fr/etudiant/absences")
                .then(
                    (page) => {
                        // Page fetched sucessfully, print out the content
                        console.log(page);
                    }
                )
                .catch(
                    (error) => {
                        // An error occured while fetching the page
                        console.log(error);
                    }
                )
        }
    )
    .catch(function (error) {
        // An error occured while logging in
        console.log(error);
    }
    );

About

Lets you login to the «Université de Lorraine» central authentication system and fetch pages from the UL services using the authenticated session

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published