From 46f27ace2251961bb27378136248608cf538c456 Mon Sep 17 00:00:00 2001 From: Henry Ault Date: Wed, 6 Apr 2016 15:42:55 -0700 Subject: [PATCH 1/3] digital open sec drive --- sec/com/digitalocean.hoon | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 sec/com/digitalocean.hoon diff --git a/sec/com/digitalocean.hoon b/sec/com/digitalocean.hoon new file mode 100644 index 0000000000..366290b548 --- /dev/null +++ b/sec/com/digitalocean.hoon @@ -0,0 +1,39 @@ +:: +:::: /hoon/digitalocean/com/sec + :: +/+ oauth2 +:: +:::: + :: +=+ ^= aut + %+ oauth2 + 'https://cloud.digitalocean.com/v1/oauth/authorize?response_type=code' + 'https://cloud.digitalocean.com/v1/oauth/token' +|_ {(bale keys:oauth2) tok/token.aut} +++ aut ~(. ^aut +<- /read/write) +++ 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))) +-- + + + +:: create a developer app on https://cloud.digitalocean.com/settings/api/applications/new +:: to get a client id and secret + +:: Be sure to be on https://localhost:8443 and to have registered +:: 'http://localhost:8443/~/ac/digitalocean.com/~./in' as the redirect URI. +:: (If unable to change port number of ship, change the redirect URI port in %eyre) + +:: |init-oauth2 |init-oauth2 /com/digitalocean + +:: Enter home this sample command to get your user information: +:: +https://api.digitalocean.com/v2/account +:: 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. + + From f2fb110b9d1ed34dc38303ac08d16bef685eb924 Mon Sep 17 00:00:00 2001 From: Henry Ault Date: Wed, 6 Apr 2016 16:51:30 -0700 Subject: [PATCH 2/3] almost complete asana --- sec/com/asana.hoon | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 sec/com/asana.hoon diff --git a/sec/com/asana.hoon b/sec/com/asana.hoon new file mode 100644 index 0000000000..f36b912b92 --- /dev/null +++ b/sec/com/asana.hoon @@ -0,0 +1,38 @@ +:: +:::: /hoon/digitalocean/com/sec + :: +/+ oauth2 +:: +:::: + :: +=+ ^= aut + %+ oauth2 + 'https://app.asana.com/1.0/oauth_authorize?response_type=code&state=ste' + 'https://app.asana.com/1.0/oauth_token' +|_ {(bale keys:oauth2) tok/token.aut} +++ aut ~(. ^aut +<- /read/write) +++ out + |= a/hiss + =; mow ~& db-authorized+mow mow + %. a + (out-quay:aut tok) +++ in in-code:aut +++ bak (bak-save-access:aut . |=(tok/token:aut +>(tok tok))) +-- + + +:: create a developer app on https://cloud.digitalocean.com/settings/api/applications/new +:: to get a client id and secret + +:: Be sure to be on https://localhost:8443 and to have registered +:: 'http://localhost:8443/~/ac/digitalocean.com/~./in' as the redirect URI. +:: (If unable to change port number of ship, change the redirect URI port in %eyre) + +:: |init-oauth2 |init-oauth2 /com/digitalocean + +:: Enter home this sample command to get your user information: +:: +https://api.digitalocean.com/v2/account +:: 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. + + From 5faa0af171a97eb68d8702db3623147d5be1e067 Mon Sep 17 00:00:00 2001 From: Henry Ault Date: Thu, 7 Apr 2016 13:52:59 -0700 Subject: [PATCH 3/3] asana driver and comments --- sec/com/asana.hoon | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/sec/com/asana.hoon b/sec/com/asana.hoon index f36b912b92..c415d1553d 100644 --- a/sec/com/asana.hoon +++ b/sec/com/asana.hoon @@ -7,31 +7,33 @@ :: =+ ^= aut %+ oauth2 - 'https://app.asana.com/1.0/oauth_authorize?response_type=code&state=ste' - 'https://app.asana.com/1.0/oauth_token' + 'https://app.asana.com/-/oauth_authorize?response_type=code&state=ste' + 'https://app.asana.com/-/oauth_token' |_ {(bale keys:oauth2) tok/token.aut} ++ aut ~(. ^aut +<- /read/write) ++ out |= a/hiss =; mow ~& db-authorized+mow mow %. a - (out-quay:aut tok) + (out-math:aut tok) ++ in in-code:aut ++ bak (bak-save-access:aut . |=(tok/token:aut +>(tok tok))) -- - -:: create a developer app on https://cloud.digitalocean.com/settings/api/applications/new -:: to get a client id and secret +:: create a developer app by logging into your asana account, clicking my +:: profile settings, clicking on 'apps,' and then 'Manage my developer apps' :: Be sure to be on https://localhost:8443 and to have registered -:: 'http://localhost:8443/~/ac/digitalocean.com/~./in' as the redirect URI. +:: 'http://localhost:8443/~/ac/asana.com/~./in' as the redirect URI. :: (If unable to change port number of ship, change the redirect URI port in %eyre) -:: |init-oauth2 |init-oauth2 /com/digitalocean +:: |init-oauth2 |init-oauth2 /com/asana :: Enter home this sample command to get your user information: -:: +https://api.digitalocean.com/v2/account +:: +https://app.asana.com/api/1.0/workspaces/{ID}, where 'ID' is the ID of your +:: workspace, which you can easily find by using the Asana API explorer: +:: https://asana.com/developers/api-reference/workspaces + :: 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.