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
|
2018-10-03 02:36:08 +03:00
|
|
|
/- sole
|
2018-10-27 02:19:18 +03:00
|
|
|
/+ generators
|
2016-02-05 02:03:51 +03:00
|
|
|
::
|
|
|
|
::::
|
2016-11-17 04:42:58 +03:00
|
|
|
::
|
2018-10-03 02:36:08 +03:00
|
|
|
=, generators
|
2016-02-05 02:03:51 +03:00
|
|
|
:- %ask
|
2020-11-26 17:09:31 +03:00
|
|
|
|= $: [now=@da eny=@uvJ bec=beak]
|
|
|
|
[arg=$@(~ [dom=path ~])]
|
2018-03-19 07:18:20 +03:00
|
|
|
~
|
2016-02-05 02:03:51 +03:00
|
|
|
==
|
2020-11-26 17:09:31 +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])
|
2018-10-02 22:26:16 +03:00
|
|
|
%+ prompt
|
2016-02-05 02:03:51 +03:00
|
|
|
[%& %oauth-hostname "api hostname: https://"]
|
2018-10-02 22:26:16 +03:00
|
|
|
%+ parse thos:de-purl:html
|
2020-11-25 23:22:55 +03:00
|
|
|
|= hot=host:eyre
|
2018-03-19 06:54:47 +03:00
|
|
|
?: ?=(%| -.hot)
|
2016-02-05 02:03:51 +03:00
|
|
|
~|(%ips-unsupported !!)
|
2018-10-02 22:26:16 +03:00
|
|
|
%+ prompt
|
2016-02-05 02:03:51 +03:00
|
|
|
[%& %oauth-client "client id: "]
|
2018-10-02 22:26:16 +03:00
|
|
|
%+ parse (boss 256 (star prn))
|
2020-11-25 23:22:55 +03:00
|
|
|
|= cid=@t
|
2018-10-27 02:19:18 +03:00
|
|
|
%+ prompt
|
2016-02-05 02:03:51 +03:00
|
|
|
[%& %oauth-secret "client secret: "]
|
2018-10-02 22:26:16 +03:00
|
|
|
%+ parse (boss 256 (star prn))
|
2020-11-25 23:22:55 +03:00
|
|
|
|= cis=@t
|
2018-10-03 02:36:08 +03:00
|
|
|
%+ produce %write-sec-atom :: XX typed pair
|
2017-10-21 00:13:34 +03:00
|
|
|
[hot (of-wain:format cid cis ~)]
|