shrub/gen/hood/init-auth-basic.hoon

35 lines
777 B
Plaintext
Raw Normal View History

2016-10-22 02:44:39 +03:00
:: API: input basic auth credentials for domain
::
:::: /hoon/init-auth-basic/hood/gen
::
/? 314
/- sole
::
::::
2016-11-17 04:42:58 +03:00
::
2016-11-17 04:37:39 +03:00
=, sole
:- %ask
2016-08-11 21:15:06 +03:00
|= $: {now/@da eny/@uvJ bec/beak}
{arg/$@($~ {dom/path $~})}
$~
==
2017-10-20 23:13:10 +03:00
^- (sole-result {$write-sec-atom p/host:eyre q/@})
=- ?~ arg -
(fun.q.q [%& dom.arg])
%+ sole-lo
[%& %oauth-hostname "api hostname: https://"]
2017-10-20 23:13:10 +03:00
%+ sole-go thos:de-purl:html
|= hot/host:eyre
?: ?=($| -.hot)
~|(%ips-unsupported !!)
%+ sole-lo
[%& %auth-user "username: "]
%+ sole-go (boss 256 (star ;~(less col prn)))
|= usr/@t
%+ sole-lo
[%| %auth-passwd "password: "]
%+ sole-go (boss 256 (star prn))
|= pas/@t
%+ sole-so %write-sec-atom :: XX typed pair
2017-10-20 23:13:10 +03:00
[hot (crip (en-base64:mimes:html (rap 3 usr ':' pas ~)))]