Merge remote-tracking branch 'ault011/dropbox-api'

Dropbox security driver
This commit is contained in:
Raymond Pasco 2016-04-05 18:55:25 -04:00
commit 14c2568112
3 changed files with 24 additions and 2 deletions

View File

@ -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

View File

@ -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
View 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)))
--
::