summaryrefslogtreecommitdiff
path: root/auth/examples/simple_example.js
blob: 2bf38c1ff38dcba0d92144f5d5ea86edfc21d306 (plain)
1
2
3
4
5
6
7
8
9
#!/usr/bin/env -S gjs -m
import Auth from "gi://AstalAuth";
import Gio from "gi://Gio";

Gio._promisify(Auth.Pam, "authenticate");

await Auth.Pam.authenticate("password")
    .then(_ => print("authentication sucessful"))
    .catch(logError);