mirror of
https://github.com/urbit/shrub.git
synced 2024-12-12 10:29:01 +03:00
added |init-oauth2 secrets dialog
This commit is contained in:
parent
49f8110b2d
commit
1a61fe4378
@ -127,6 +127,7 @@
|
||||
++ poke-kiln-overload (wrap poke-overload):from-kiln
|
||||
++ poke-kiln-unmount (wrap poke-unmount):from-kiln
|
||||
++ poke-kiln-unsync (wrap poke-unsync):from-kiln
|
||||
++ poke-write-sec-atom (wrap poke-sec-atom):from-write
|
||||
++ poke-write-paste (wrap poke-paste):from-write
|
||||
++ poke-will (wrap poke-will):from-helm
|
||||
++ quit-drum-phat (wrap quit-phat):from-drum
|
||||
|
33
gen/hood/init-oauth2.hoon
Normal file
33
gen/hood/init-oauth2.hoon
Normal file
@ -0,0 +1,33 @@
|
||||
::
|
||||
:::: /hoon/init-oauth2/hood/gen
|
||||
::
|
||||
/? 314
|
||||
/- sole
|
||||
::
|
||||
::::
|
||||
!:
|
||||
[sole .]
|
||||
:- %ask
|
||||
|= $: [now=@da eny=@uvI bec=beak]
|
||||
[arg=$|(~ [dom=path ~])]
|
||||
~
|
||||
==
|
||||
^- (sole-result ,[%write-sec-atom p=host q=@])
|
||||
=- ?~ arg -
|
||||
(fun.q.q [%& dom.arg])
|
||||
%+ sole-lo
|
||||
[%& %oauth-hostname "api hostname: https://"]
|
||||
%+ sole-go thos:urlp
|
||||
|= hot=host
|
||||
?: ?=(%| -.hot)
|
||||
~|(%ips-unsupported !!)
|
||||
%+ sole-lo
|
||||
[%& %oauth-client "client id: "]
|
||||
%+ sole-go (boss 256 (star prn))
|
||||
|= cid=@t
|
||||
%+ sole-lo
|
||||
[%& %oauth-secret "client secret: "]
|
||||
%+ sole-go (boss 256 (star prn))
|
||||
|= cis=@t
|
||||
%+ sole-so %write-sec-atom :: XX typed pair
|
||||
[hot (role cid cis ~)]
|
@ -37,6 +37,11 @@
|
||||
|= [typ=?(%hoon %md %txt) txt=@t] ^+ abet
|
||||
(poke--data [`typ /web/paste/(scot %da now)] %mime / (taco txt))
|
||||
::
|
||||
++ poke-sec-atom
|
||||
|= [hot=host dat=@]
|
||||
?> ?=(%& -.hot)
|
||||
(poke--data [`%atom [%sec p.hot]] %mime / (taco dat))
|
||||
::
|
||||
++ poke--data
|
||||
|= [[ext=(unit ,@t) pax=path] dat=data] ^+ abet
|
||||
?~ ext $(ext [~ -.dat])
|
||||
|
@ -17,7 +17,7 @@
|
||||
=< .(state-usr &)
|
||||
%- oauth2
|
||||
=- [[`/com/google/accounts /o/oauth2/v2/auth -] /oauth2/v4/token]
|
||||
:~ login-hint/(crip (rash lon suffix-email))
|
||||
:~ login-hint/?~(lon '' (crip (rash lon suffix-email)))
|
||||
access-type/%offline
|
||||
response-type/%code
|
||||
==
|
||||
|
Loading…
Reference in New Issue
Block a user