mirror of
https://github.com/urbit/shrub.git
synced 2025-01-05 19:46:50 +03:00
hook up twitter security driver
This commit is contained in:
parent
6c45cb1264
commit
dafc0b501c
@ -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 ~
|
||||
--
|
||||
|
Loading…
Reference in New Issue
Block a user