stub security driver: check that authorization exists

This commit is contained in:
Anton Dyudin 2016-03-09 16:01:15 -08:00
parent be51072ade
commit faf017da53

23
sec/com/twitter.hoon Normal file
View File

@ -0,0 +1,23 @@
:: Test url +https://slack.com/api/auth.test
::
:::: /hoon/slack/com/sec
::
/+ oauth1
::
::::
::
::=+ ^= aut
:: %+ oauth2
:: 'https://slack.com/oauth/authorize'
:: 'https://slack.com/api/oauth.access'
|_ {(bale @t:keys:oauth1) tok/{@t @t}}
::++ aut ~(. ^aut +<- /client/admin)
::++ out (out-quay:aut 'token'^tok)
:: ++ in in-code:aut
:: ++ bak (bak-save-access:aut . |=(tok/token:aut +>(tok tok)))
++ out
|= a/hiss ^- {$send hiss}
~| %authorization
~& twit-auth+(~(got by q.q.a) %authorization)
[%send a]
--