diff options
author | kotontrion <[email protected]> | 2024-05-19 19:15:09 +0200 |
---|---|---|
committer | kotontrion <[email protected]> | 2024-05-19 19:15:09 +0200 |
commit | 2308e485ec479dd120baf4496b839612eb96aaa0 (patch) | |
tree | beb0e26820c512e702509427d90132c41ca5b45c /examples/simple_example.js | |
parent | df48cbd0695f1145fde13da10dbe596f8a09822e (diff) |
add: Readme and gjs examples
Diffstat (limited to 'examples/simple_example.js')
-rw-r--r-- | examples/simple_example.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/examples/simple_example.js b/examples/simple_example.js new file mode 100644 index 0000000..2bf38c1 --- /dev/null +++ b/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 |