shrub/gen/hood/init-oauth2.hoon

34 lines
670 B
Plaintext
Raw Normal View History

2016-02-05 02:03:51 +03:00
::
:::: /hoon/init-oauth2/hood/gen
::
/? 314
/- sole
::
::::
!:
[sole .]
:- %ask
2016-02-23 04:50:21 +03:00
|= $: {now/@da eny/@uvI bec/beak}
{arg/$@($~ {dom/path $~})}
$~
2016-02-05 02:03:51 +03:00
==
2016-02-23 04:50:21 +03:00
^- (sole-result {$write-sec-atom p/host q/@})
2016-02-05 02:03:51 +03:00
=- ?~ arg -
(fun.q.q [%& dom.arg])
%+ sole-lo
[%& %oauth-hostname "api hostname: https://"]
%+ sole-go thos:urlp
2016-02-23 04:50:21 +03:00
|= hot/host
?: ?=($| -.hot)
2016-02-05 02:03:51 +03:00
~|(%ips-unsupported !!)
%+ sole-lo
[%& %oauth-client "client id: "]
%+ sole-go (boss 256 (star prn))
2016-02-23 04:50:21 +03:00
|= cid/@t
2016-02-05 02:03:51 +03:00
%+ sole-lo
[%& %oauth-secret "client secret: "]
%+ sole-go (boss 256 (star prn))
2016-02-23 04:50:21 +03:00
|= cis/@t
2016-02-05 02:03:51 +03:00
%+ sole-so %write-sec-atom :: XX typed pair
[hot (role cid cis ~)]