hook up twitter security driver

This commit is contained in:
Anton Dyudin 2016-03-10 20:32:27 -08:00
parent 6c45cb1264
commit dafc0b501c

View File

@ -1,23 +1,22 @@
:: Test url +https://slack.com/api/auth.test
::
:::: /hoon/slack/com/sec
:: Test url +https://api.twitter.com/1.1/account/verify_credentials
::
:::: /hoon/twitter/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]
--
=+ ^= aut
%^ oauth1
'https://api.twitter.com/oauth/request_token'
'https://api.twitter.com/oauth/authorize'
'https://api.twitter.com/oauth/access_token'
|_ {(bale keys:oauth1) tok/token:oauth1}
++ aut ~(. ^aut . +<- +<+) :: XX electroplating
++ out out-math:aut
++ in in-oauth-token:aut
++ bak (bak-save-access:aut save-token)
++ res (res-handle-reqt:aut save-token)
++ save-token |=(tok/token:aut +>(tok tok))
++ wyp ~
--