From 54c6d3fa3aada272839a431a45318d33dbc6b9e5 Mon Sep 17 00:00:00 2001 From: Ivan Lisenkov Date: Wed, 30 Jan 2013 00:30:05 +0400 Subject: Implement authorization header parsing Basic HTTP authorization according to RFC 2617 is implemented. Added an example of its usage with REST handler. --- examples/basic_auth/start.sh | 4 ++++ 1 file changed, 4 insertions(+) create mode 100755 examples/basic_auth/start.sh (limited to 'examples/basic_auth/start.sh') diff --git a/examples/basic_auth/start.sh b/examples/basic_auth/start.sh new file mode 100755 index 0000000..9e8a30b --- /dev/null +++ b/examples/basic_auth/start.sh @@ -0,0 +1,4 @@ +#!/bin/sh +erl -pa ebin deps/*/ebin -s basic_auth \ + -eval "io:format(\"Get 401: curl -i http://localhost:8080~n\")." \ + -eval "io:format(\"Get 200: curl -i -u \\\"Alladin:open sesame\\\" http://localhost:8080~n\")." -- cgit v1.2.3