shrub/gen/hood/init-oauth2/google.hoon

30 lines
717 B
Plaintext
Raw Normal View History

2016-10-22 02:44:39 +03:00
:: API: input auth2 client_secret_*.json for .googleapis.com
::
2016-03-05 03:24:23 +03:00
:::: /hoon/google/init-oauth2/hood/gen
::
/? 314
/- sole
::
::::
2016-11-17 04:42:58 +03:00
::
2016-11-17 04:37:39 +03:00
=, sole
:- %ask
2016-08-11 21:15:06 +03:00
|= $: {now/@da eny/@uvJ bec/beak}
{arg/$@($~ {jon/json $~})}
$~
==
^- (sole-result {$write-sec-atom p/host q/@})
%+ sole-yo leaf+"Accepting credentials for https://*.googleapis.com"
=+ hot=[%& /com/googleapis]
=- ?~ arg -
(fun.q.q jon.arg)
%+ sole-lo
[%& %oauth-json "json credentials: "]
%+ sole-go apex:poja
|= jon/json
=+ ~| bad-json+jon
=- `{cid/@t cis/@t}`(need (rep jon))
rep=(ot web+(ot 'client_id'^so 'client_secret'^so ~) ~):jo
%+ sole-so %write-sec-atom :: XX typed pair
[hot (role cid cis ~)]