mirror of
https://github.com/ninenines/cowboy.git
synced 2025-07-15 04:30:25 +00:00
Merge branch 'improve_basic_auth_example' of git://github.com/acammack/cowboy
This commit is contained in:
commit
cb15243d8b
1 changed files with 1 additions and 1 deletions
|
@ -18,7 +18,7 @@ is_authorized(Req, S) ->
|
||||||
{<<"basic">>, {User = <<"Alladin">>, <<"open sesame">>}} ->
|
{<<"basic">>, {User = <<"Alladin">>, <<"open sesame">>}} ->
|
||||||
{true, Req1, User};
|
{true, Req1, User};
|
||||||
_ ->
|
_ ->
|
||||||
{{false, <<"Restricted">>}, Req1, S}
|
{{false, <<"Basic realm=\"cowboy\"">>}, Req1, S}
|
||||||
end.
|
end.
|
||||||
|
|
||||||
content_types_provided(Req, State) ->
|
content_types_provided(Req, State) ->
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue