shrub/lib/basic-auth.hoon
2016-03-11 11:49:36 -08:00

9 lines
254 B
Plaintext

!:
=+ keys=@t
|= bal/(bale keys)
?~ key.bal
~|(%basic-auth-no-key ~_(leaf+"Run |init-auth-basic {<`path`dom.bal>}" !!))
=+ aut=authorization+(cat 3 'Basic ' key.bal)
~& aut=`{@tas @t}`aut
|=(a/hiss [%send %_(a q.q (~(add ja q.q.a) -.aut +.aut))])