summaryrefslogtreecommitdiff
path: root/demo.sh
diff options
context:
space:
mode:
authorYves Fischer <yvesf-git@xapek.org>2015-11-05 21:54:27 +0100
committerCharlie Root <root@www1.2.localnet.cc>2016-01-13 18:50:49 +0000
commitdd4f295a0c0ca578922bddb9da36f87f5d7ad1b4 (patch)
tree6d29d9fdf36af9a83da6e4d2bbc419beaab44933 /demo.sh
downloadauth-xmppmessage-dd4f295a0c0ca578922bddb9da36f87f5d7ad1b4.tar.gz
auth-xmppmessage-dd4f295a0c0ca578922bddb9da36f87f5d7ad1b4.zip
stateless version
Diffstat (limited to 'demo.sh')
-rwxr-xr-xdemo.sh22
1 files changed, 22 insertions, 0 deletions
diff --git a/demo.sh b/demo.sh
new file mode 100755
index 0000000..67cb4dc
--- /dev/null
+++ b/demo.sh
@@ -0,0 +1,22 @@
+#!/bin/sh
+# Usage:
+# - No arguments: Request a token
+# - With arguments: Verify a token
+export IP=1.2.3.4
+export URI=/test
+export HTTP_HOST=www.example.com;
+export CONTEXT="validsec=60;secret=asdsad;users=yvesf@xapek.org,marc@xapek.org;jid=___;jid_pw=___"
+export SKIP_XMPP=1
+
+if [ -z "$1" ]; then # request token
+ (
+ echo "yvesf@xapek.org"
+ echo ""
+ ) | ./login.py
+else # verify token
+ (
+ echo "yvesf@xapek.org"
+ echo "$1"
+ ) | ./login.py
+ echo "Result $?"
+fi