Skip to content

fersasil/uffs-authenticator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

To use it you should install node and npm!

Install all dependencies using:

npm install

Start the application using:

npm start

Important! Port 3001 should be free to be able to run this application

Endpoints:

/POST login/

Data should include the fields password and username

The default port is 3001, so, to be able to run this you should use http://localhost:3001/login

Average time of response is 600ms for an unauthorized user and 1500ms in case of success

Example using php:

// Generated by curl-to-PHP: http://incarnate.github.io/curl-to-php/
$ch = curl_init();

$username = 'YOUR IDUFFS should be here';
$password = 'Your password should be here';

curl_setopt($ch, CURLOPT_URL, 'http://localhost:3001/login');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, "username={$$username}&password={$password}");
curl_setopt($ch, CURLOPT_POST, 1);

curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);

$result = curl_exec($ch);
if (curl_errno($ch)) {
    echo 'Error:' . curl_error($ch);
}
curl_close($ch);

//Result should be a json file

$result = json_decode($result);

// Your code goes here

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published