mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-11-13 08:38:43 +03:00
b3901ab42f
git-subtree-dir: pkg/arvo git-subtree-mainline:9c8f40bf6c
git-subtree-split:c20e2a185f
33 lines
787 B
Plaintext
33 lines
787 B
Plaintext
:: API: input auth2 client_secret_*.json for .googleapis.com
|
|
::
|
|
:::: /hoon/google/init-oauth2/hood/gen
|
|
::
|
|
/? 314
|
|
/- sole
|
|
/+ generators
|
|
::
|
|
::::
|
|
::
|
|
=, generators
|
|
=, html
|
|
=, format
|
|
:- %ask
|
|
|= $: {now/@da eny/@uvJ bec/beak}
|
|
{arg/$@(~ {jon/json ~})}
|
|
~
|
|
==
|
|
^- (sole-result:sole {$write-sec-atom p/host:eyre q/@})
|
|
%+ print leaf+"Accepting credentials for https://*.googleapis.com"
|
|
=+ hot=[%& /com/googleapis]
|
|
=- ?~ arg -
|
|
(fun.q.q jon.arg)
|
|
%+ prompt
|
|
[%& %oauth-json "json credentials: "]
|
|
%+ parse apex:de-json
|
|
|= jon/json
|
|
=+ ~| bad-json+jon
|
|
=- `{cid/@t cis/@t}`(need (rep jon))
|
|
rep=(ot web+(ot 'client_id'^so 'client_secret'^so ~) ~):dejs-soft:format
|
|
%+ produce %write-sec-atom :: XX typed pair
|
|
[hot (of-wain:format cid cis ~)]
|