2016-04-08 05:09:32 +03:00
|
|
|
:: Test url +https://app.asana.com/api/1.0/users/me
|
2016-04-07 02:51:30 +03:00
|
|
|
::
|
2016-04-08 05:16:04 +03:00
|
|
|
:::: /hoon/asana/com/sec
|
2016-04-07 02:51:30 +03:00
|
|
|
::
|
|
|
|
/+ oauth2
|
|
|
|
::
|
|
|
|
::::
|
|
|
|
::
|
2016-04-08 05:09:07 +03:00
|
|
|
|%
|
|
|
|
++ dialog-url 'https://app.asana.com/-/oauth_authorize?response_type=code'
|
|
|
|
++ exchange-url 'https://app.asana.com/-/oauth_token'
|
|
|
|
--
|
|
|
|
::
|
|
|
|
::::
|
|
|
|
::
|
|
|
|
|_ {bal/(bale keys:oauth2) tok/token:oauth2}
|
|
|
|
:: aut is a "standard oauth2" core, which implements the
|
|
|
|
:: most common handling of oauth2 semantics. see lib/oauth2 for more details.
|
|
|
|
++ aut (~(standard oauth2 bal tok) . |=(tok/token:oauth2 +>(tok tok)))
|
|
|
|
++ out (out-add-header:aut scope=~ dialog-url)
|
|
|
|
::
|
|
|
|
++ in (in-code-to-token:aut exchange-url)
|
|
|
|
++ bak bak-save-token:aut
|
2016-04-07 02:51:30 +03:00
|
|
|
--
|
2016-04-08 05:09:32 +03:00
|
|
|
:: create a developer app by logging into https://app.asana.com/, and clicking
|
|
|
|
:: "My Profile Settings" > Apps > "Manage my developer apps"
|
2016-04-07 02:51:30 +03:00
|
|
|
|
|
|
|
:: Be sure to be on https://localhost:8443 and to have registered
|
2016-04-07 23:52:59 +03:00
|
|
|
:: 'http://localhost:8443/~/ac/asana.com/~./in' as the redirect URI.
|
2016-04-07 02:51:30 +03:00
|
|
|
:: (If unable to change port number of ship, change the redirect URI port in %eyre)
|
|
|
|
|
2016-04-08 05:09:32 +03:00
|
|
|
:: |init-oauth2 /com/asana
|
2016-04-07 02:51:30 +03:00
|
|
|
|
2016-04-08 05:09:32 +03:00
|
|
|
:: Enter this sample command to get your user information:
|
|
|
|
:: +https://app.asana.com/api/1.0/users/me
|
2016-04-07 23:52:59 +03:00
|
|
|
|
2016-04-07 02:51:30 +03:00
|
|
|
:: Before you receive the response, you'll have to clink on the link.
|
|
|
|
:: If you successfully auth, you should receive the response in the dojo.
|
|
|
|
|
|
|
|
|