diff options
author | Yves Fischer <yvesf-git@xapek.org> | 2015-11-05 21:54:27 +0100 |
---|---|---|
committer | Charlie Root <root@www1.2.localnet.cc> | 2016-01-13 18:50:49 +0000 |
commit | dd4f295a0c0ca578922bddb9da36f87f5d7ad1b4 (patch) | |
tree | 6d29d9fdf36af9a83da6e4d2bbc419beaab44933 /demo.sh | |
download | auth-xmppmessage-dd4f295a0c0ca578922bddb9da36f87f5d7ad1b4.tar.gz auth-xmppmessage-dd4f295a0c0ca578922bddb9da36f87f5d7ad1b4.zip |
stateless version
Diffstat (limited to 'demo.sh')
-rwxr-xr-x | demo.sh | 22 |
1 files changed, 22 insertions, 0 deletions
@@ -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 |