2016-10-22 02:44:39 +03:00
|
|
|
:: API: input auth2 client_secret_*.json for .googleapis.com
|
2016-03-05 02:16:31 +03:00
|
|
|
::
|
2016-03-05 03:24:23 +03:00
|
|
|
:::: /hoon/google/init-oauth2/hood/gen
|
2016-03-05 02:16:31 +03:00
|
|
|
::
|
|
|
|
/? 314
|
2018-10-03 02:36:08 +03:00
|
|
|
/- sole
|
2018-10-27 02:19:18 +03:00
|
|
|
/+ generators
|
2016-03-05 02:16:31 +03:00
|
|
|
::
|
|
|
|
::::
|
2016-11-17 04:42:58 +03:00
|
|
|
::
|
2018-10-03 02:36:08 +03:00
|
|
|
=, generators
|
2017-10-24 00:41:07 +03:00
|
|
|
=, format
|
2016-03-05 02:16:31 +03:00
|
|
|
:- %ask
|
2020-11-26 17:09:31 +03:00
|
|
|
|= $: [now=@da eny=@uvJ bec=beak]
|
|
|
|
[arg=$@(~ [jon=json ~])]
|
2018-03-19 07:18:20 +03:00
|
|
|
~
|
2016-03-05 02:16:31 +03:00
|
|
|
==
|
2020-11-26 17:09:31 +03:00
|
|
|
^- (sole-result:sole [%write-sec-atom p=host:eyre q=@])
|
2018-10-02 22:26:16 +03:00
|
|
|
%+ print leaf+"Accepting credentials for https://*.googleapis.com"
|
2016-03-05 02:16:31 +03:00
|
|
|
=+ hot=[%& /com/googleapis]
|
|
|
|
=- ?~ arg -
|
|
|
|
(fun.q.q jon.arg)
|
2018-10-02 22:26:16 +03:00
|
|
|
%+ prompt
|
2016-03-05 02:16:31 +03:00
|
|
|
[%& %oauth-json "json credentials: "]
|
2023-04-11 05:59:14 +03:00
|
|
|
%+ parse apex:de:json:html
|
2020-11-25 23:22:55 +03:00
|
|
|
|= jon=json
|
2016-03-05 02:16:31 +03:00
|
|
|
=+ ~| bad-json+jon
|
2020-11-26 17:09:31 +03:00
|
|
|
=- `[cid=@t cis=@t]`(need (rep jon))
|
2017-10-24 00:26:32 +03:00
|
|
|
rep=(ot web+(ot 'client_id'^so 'client_secret'^so ~) ~):dejs-soft:format
|
2018-10-03 02:36:08 +03:00
|
|
|
%+ produce %write-sec-atom :: XX typed pair
|
2017-10-24 00:26:32 +03:00
|
|
|
[hot (of-wain:format cid cis ~)]
|