summaryrefslogtreecommitdiff
path: root/auth/examples/simple_example.js
diff options
context:
space:
mode:
authorAylur <[email protected]>2024-09-01 03:19:31 +0200
committerAylur <[email protected]>2024-09-01 03:19:31 +0200
commit6adcd2884ee48ec0b1c8b7486e42b2eeffc48159 (patch)
tree6c9eb7a3a47d5fc2a3bdd866d36dc8fd9201c0d0 /auth/examples/simple_example.js
parent43e6bd47863c45b9232f0f74e973b83b8354bd3a (diff)
move to monorepo
Diffstat (limited to 'auth/examples/simple_example.js')
-rw-r--r--auth/examples/simple_example.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/auth/examples/simple_example.js b/auth/examples/simple_example.js
new file mode 100644
index 0000000..2bf38c1
--- /dev/null
+++ b/auth/examples/simple_example.js
@@ -0,0 +1,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); \ No newline at end of file