mirror of
https://github.com/urbit/shrub.git
synced 2024-12-12 10:29:01 +03:00
Merge remote-tracking branch 'ault011/dropbox-api'
Dropbox security driver
This commit is contained in:
commit
14c2568112
@ -483,7 +483,7 @@
|
|||||||
$http
|
$http
|
||||||
?> ?=($mime p.cay)
|
?> ?=($mime p.cay)
|
||||||
=+ mim=;;(mime q.q.cay)
|
=+ mim=;;(mime q.q.cay)
|
||||||
=+ maf=(~(add ja *math) %content-span (moon p.mim))
|
=+ maf=(~(add ja *math) %content-type (moon p.mim))
|
||||||
(dy-eyre /show q.p.mad [r.p.mad p.p.mad maf ~ q.mim])
|
(dy-eyre /show q.p.mad [r.p.mad p.p.mad maf ~ q.mim])
|
||||||
::
|
::
|
||||||
$show
|
$show
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
::
|
::
|
||||||
++ grow :: convert to
|
++ grow :: convert to
|
||||||
|%
|
|%
|
||||||
++ mime [/text/json (taco txt)] :: convert to %mime
|
++ mime [/application/json (taco txt)] :: convert to %mime
|
||||||
++ txt (crip (pojo jon))
|
++ txt (crip (pojo jon))
|
||||||
--
|
--
|
||||||
++ grab
|
++ grab
|
||||||
|
22
sec/com/dropboxapi.hoon
Normal file
22
sec/com/dropboxapi.hoon
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
:: Test url +https://api.dropboxapi.com/2/files/list_folder
|
||||||
|
:::: /hoon/dropboxapi/com/sec
|
||||||
|
::
|
||||||
|
/+ oauth2
|
||||||
|
::
|
||||||
|
::::
|
||||||
|
::
|
||||||
|
=+ ^= aut
|
||||||
|
%+ oauth2
|
||||||
|
'https://www.dropbox.com/1/oauth2/authorize?response_type=code'
|
||||||
|
'https://api.dropboxapi.com/1/oauth2/token'
|
||||||
|
|_ {(bale keys:oauth2) tok/token.aut}
|
||||||
|
++ aut ~(. ^aut +<- /)
|
||||||
|
++ out
|
||||||
|
|= a/hiss
|
||||||
|
=; mow ~& db-authorized+mow mow
|
||||||
|
%. a
|
||||||
|
(out-math:aut tok)
|
||||||
|
++ in in-code:aut
|
||||||
|
++ bak (bak-save-access:aut . |=(tok/token:aut +>(tok tok)))
|
||||||
|
--
|
||||||
|
::
|
Loading…
Reference in New Issue
Block a user