aboutsummaryrefslogtreecommitdiffstats
path: root/examples/rest_basic_auth/src/toppage_handler.erl
diff options
context:
space:
mode:
Diffstat (limited to 'examples/rest_basic_auth/src/toppage_handler.erl')
-rw-r--r--examples/rest_basic_auth/src/toppage_handler.erl2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/rest_basic_auth/src/toppage_handler.erl b/examples/rest_basic_auth/src/toppage_handler.erl
index 18a8cae..2e8250f 100644
--- a/examples/rest_basic_auth/src/toppage_handler.erl
+++ b/examples/rest_basic_auth/src/toppage_handler.erl
@@ -13,7 +13,7 @@ init(Req, Opts) ->
is_authorized(Req, State) ->
case cowboy_req:parse_header(<<"authorization">>, Req) of
- {<<"basic">>, {User = <<"Alladin">>, <<"open sesame">>}} ->
+ {basic, User = <<"Alladin">>, <<"open sesame">>} ->
{true, Req, User};
_ ->
{{false, <<"Basic realm=\"cowboy\"">>}, Req, State}