mirror of
https://github.com/ninenines/cowboy.git
synced 2025-07-15 04:30:25 +00:00
Implement authorization header parsing
Basic HTTP authorization according to RFC 2617 is implemented. Added an example of its usage with REST handler.
This commit is contained in:
parent
fd5a977a39
commit
54c6d3fa3a
11 changed files with 228 additions and 0 deletions
4
examples/basic_auth/start.sh
Executable file
4
examples/basic_auth/start.sh
Executable file
|
@ -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\")."
|
Loading…
Add table
Add a link
Reference in a new issue