mirror of
https://github.com/urbit/shrub.git
synced 2024-12-05 22:15:52 +03:00
37 lines
779 B
Plaintext
37 lines
779 B
Plaintext
:: API: input oauth1 application credentials for domain
|
|
::
|
|
:::: /hoon/init-oauth1/hood/gen
|
|
::
|
|
/? 314
|
|
/- sole
|
|
/+ generators, old-zuse
|
|
=, old-zuse
|
|
::
|
|
::::
|
|
::
|
|
=, generators
|
|
:- %ask
|
|
|= $: {now/@da eny/@uvJ bec/beak}
|
|
{arg/$@(~ {dom/path ~})}
|
|
~
|
|
==
|
|
^- (sole-result:sole {$write-sec-atom p/host q/@})
|
|
=- ?~ arg -
|
|
(fun.q.q [%& dom.arg])
|
|
%+ prompt
|
|
[%& %oauth-hostname "api hostname: https://"]
|
|
%+ parse thos:urlp
|
|
|= hot/host
|
|
?: ?=(%| -.hot)
|
|
~|(%ips-unsupported !!)
|
|
%+ prompt
|
|
[%& %oauth-client "consumer key: "]
|
|
%+ parse (boss 256 (star prn))
|
|
|= key/@t
|
|
%+ prompt
|
|
[%& %oauth-secret "consumer secret: "]
|
|
%+ parse (boss 256 (star prn))
|
|
|= sec/@t
|
|
%+ produce %write-sec-atom :: XX typed pair
|
|
[hot (of-wain:format key sec ~)]
|