From dd4f295a0c0ca578922bddb9da36f87f5d7ad1b4 Mon Sep 17 00:00:00 2001 From: Yves Fischer Date: Thu, 5 Nov 2015 21:54:27 +0100 Subject: stateless version --- demo.sh | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100755 demo.sh (limited to 'demo.sh') 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 -- cgit v1.2.1