From 82833eac729ba8e7787f869c5302282a3da11b07 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 1 Mar 2024 11:54:21 +0000 Subject: [PATCH 1/4] Bump the prod-dependencies group with 1 update (#321) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package-lock.json | 14 +++++++------- package.json | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index cf958ae68..1db6da643 100644 --- a/package-lock.json +++ b/package-lock.json @@ -16,7 +16,7 @@ "@neo4j-antora/antora-table-footnotes": "^0.3.2", "@neo4j-documentation/macros": "^1.0.2", "@neo4j-documentation/remote-include": "^1.0.0", - "nodemon": "^3.0.2" + "nodemon": "^3.1.0" }, "devDependencies": { "dotenv": "^16.4.2", @@ -1812,9 +1812,9 @@ "dev": true }, "node_modules/nodemon": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-3.0.2.tgz", - "integrity": "sha512-9qIN2LNTrEzpOPBaWHTm4Asy1LxXLSickZStAQ4IZe7zsoIpD/A7LWxhZV3t4Zu352uBcqVnRsDXSMR2Sc3lTA==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-3.1.0.tgz", + "integrity": "sha512-xqlktYlDMCepBJd43ZQhjWwMw2obW/JRvkrLxq5RCNcuDDX1DbcPT+qT1IlIIdf+DhnWs90JpTMe+Y5KxOchvA==", "dependencies": { "chokidar": "^3.5.2", "debug": "^4", @@ -4398,9 +4398,9 @@ "dev": true }, "nodemon": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-3.0.2.tgz", - "integrity": "sha512-9qIN2LNTrEzpOPBaWHTm4Asy1LxXLSickZStAQ4IZe7zsoIpD/A7LWxhZV3t4Zu352uBcqVnRsDXSMR2Sc3lTA==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-3.1.0.tgz", + "integrity": "sha512-xqlktYlDMCepBJd43ZQhjWwMw2obW/JRvkrLxq5RCNcuDDX1DbcPT+qT1IlIIdf+DhnWs90JpTMe+Y5KxOchvA==", "requires": { "chokidar": "^3.5.2", "debug": "^4", diff --git a/package.json b/package.json index 27661843a..3f799ab7e 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,7 @@ "@neo4j-antora/antora-table-footnotes": "^0.3.2", "@neo4j-documentation/macros": "^1.0.2", "@neo4j-documentation/remote-include": "^1.0.0", - "nodemon": "^3.0.2" + "nodemon": "^3.1.0" }, "devDependencies": { "dotenv": "^16.4.2", From 8fa078efc8f39827a683e4179d497955315c7977 Mon Sep 17 00:00:00 2001 From: Neil Dewhurst Date: Fri, 1 Mar 2024 16:50:03 +0000 Subject: [PATCH 2/4] Create CODEOWNERS --- .github/CODEOWNERS | 1 + 1 file changed, 1 insertion(+) create mode 100644 .github/CODEOWNERS diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 000000000..4aa6ecc05 --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1 @@ +./.github/ @recrwplay From 2cc427fec1e3fde37cf617915bc1e02830514a77 Mon Sep 17 00:00:00 2001 From: Fi Quick <47183728+fiquick@users.noreply.github.com> Date: Mon, 4 Mar 2024 10:30:33 +0000 Subject: [PATCH 3/4] Add a Python example alongside the cURL example in the Aura API docs (#324) Co-authored-by: Nicola Vitucci --- .../pages/platform/api/authentication.adoc | 33 ++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/modules/ROOT/pages/platform/api/authentication.adoc b/modules/ROOT/pages/platform/api/authentication.adoc index 0583c3bac..fb5855d07 100644 --- a/modules/ROOT/pages/platform/api/authentication.adoc +++ b/modules/ROOT/pages/platform/api/authentication.adoc @@ -74,7 +74,12 @@ Both the request and response contain sensitive information and must be kept sec You are responsible for keeping the client credentials and access tokens confidential, whether in transit (by specifying HTTPS), if stored at rest, in log files, etc. ==== -==== cURL example +==== Request examples + +[.tabbed-example] +==== +[.include-with-cURL] +===== [source, shell] ---- @@ -86,6 +91,32 @@ curl --request POST 'https://api.neo4j.io/oauth/token' \ <1> The `--user` option sets the `Authorization` header for you, handling the base64 encoding of the client ID and client secret. +===== +[.include-with-Python] +===== + +[source, python] +---- +import requests +from requests.auth import HTTPBasicAuth + +# Make the request to the Aura API Auth endpoint +response = requests.request( + "POST", + "https://api.neo4j.io/oauth/token", + headers={"Content-Type": "application/x-www-form-urlencoded"}, + data={"grant_type": "client_credentials"}, + auth=HTTPBasicAuth(client_id, client_secret), + timeout=10 +) + +print(response.json()) +---- + +===== +==== + + ==== Response body example [source, json, role=nocopy] From 262a877292206f92c3082d0e412611a795f6e324 Mon Sep 17 00:00:00 2001 From: Fi Quick <47183728+fiquick@users.noreply.github.com> Date: Mon, 4 Mar 2024 16:45:23 +0000 Subject: [PATCH 4/4] Authenticating api requests (#326) Co-authored-by: Nicola Vitucci --- modules/ROOT/pages/platform/api/authentication.adoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/ROOT/pages/platform/api/authentication.adoc b/modules/ROOT/pages/platform/api/authentication.adoc index fb5855d07..694fcdead 100644 --- a/modules/ROOT/pages/platform/api/authentication.adoc +++ b/modules/ROOT/pages/platform/api/authentication.adoc @@ -106,13 +106,13 @@ response = requests.request( "https://api.neo4j.io/oauth/token", headers={"Content-Type": "application/x-www-form-urlencoded"}, data={"grant_type": "client_credentials"}, - auth=HTTPBasicAuth(client_id, client_secret), - timeout=10 + auth=HTTPBasicAuth(client_id, client_secret) <1> ) print(response.json()) ---- +<1> `client_id` and `client_secret` must be set to the values obtained from the Aura Console. ===== ====