urbit/gen/hood/init-oauth2.hoon

36 lines
774 B
Plaintext
Raw Normal View History

2016-10-22 02:44:39 +03:00
:: API: input oauth2 application credentials for domain
2016-02-05 02:03:51 +03:00
::
:::: /hoon/init-oauth2/hood/gen
::
/? 314
/+ sole, old-zuse
2017-11-10 03:06:58 +03:00
=, old-zuse
2016-02-05 02:03:51 +03:00
::
::::
2016-11-17 04:42:58 +03:00
::
=, ask:sole
2016-02-05 02:03:51 +03:00
:- %ask
2016-08-11 21:15:06 +03:00
|= $: {now/@da eny/@uvJ bec/beak}
2018-03-19 07:18:20 +03:00
{arg/$@(~ {dom/path ~})}
~
2016-02-05 02:03:51 +03:00
==
^- (sole-result:sole {$write-sec-atom p/host:eyre q/@})
2016-02-05 02:03:51 +03:00
=- ?~ arg -
(fun.q.q [%& dom.arg])
%+ prompt
2016-02-05 02:03:51 +03:00
[%& %oauth-hostname "api hostname: https://"]
%+ parse thos:de-purl:html
2017-10-21 00:13:34 +03:00
|= hot/host:eyre
2018-03-19 06:54:47 +03:00
?: ?=(%| -.hot)
2016-02-05 02:03:51 +03:00
~|(%ips-unsupported !!)
%+ prompt
2016-02-05 02:03:51 +03:00
[%& %oauth-client "client id: "]
%+ parse (boss 256 (star prn))
2016-02-23 04:50:21 +03:00
|= cid/@t
%+ prompt
2016-02-05 02:03:51 +03:00
[%& %oauth-secret "client secret: "]
%+ parse (boss 256 (star prn))
2016-02-23 04:50:21 +03:00
|= cis/@t
%+ output %write-sec-atom :: XX typed pair
2017-10-21 00:13:34 +03:00
[hot (of-wain:format cid cis ~)]