From d130e99d42903811e33dd8f304a9a8c6461147c0 Mon Sep 17 00:00:00 2001 From: Jose Sernaque Date: Fri, 9 Aug 2024 11:57:10 -0700 Subject: [PATCH] Renamed to token auth directory; Fixed link --- .../.gitignore | 0 .../.vscode/launch.json | 0 .../.vscode/tasks.json | 0 .../{token-auth => v7-token-auth-example}/README.md | 8 ++++---- .../edgio.config.js | 2 +- .../jsconfig.json | 0 .../next.config.js | 0 .../next.config.mjs | 0 .../package-lock.json | 0 .../package.json | 4 ++-- .../postcss.config.mjs | 0 .../public/edgio.png | Bin .../public/next.svg | 0 .../public/vercel.svg | 0 .../{token-auth => v7-token-auth-example}/routes.js | 2 +- .../src/app/api/token/route.js | 0 .../src/app/favicon.ico | Bin .../src/app/globals.css | 0 .../src/app/layout.js | 0 .../src/app/page.js | 0 .../src/app/secure/dynamic/page.jsx | 0 .../src/app/secure/generator/page.jsx | 0 .../src/app/secure/info/page.jsx | 0 .../src/app/secure/layout.jsx | 0 .../src/app/secure/page.jsx | 0 .../src/app/secure/static/page.jsx | 0 .../src/components/TokenAwareLink.jsx | 0 .../sw/service-worker.js | 0 .../tailwind.config.js | 0 29 files changed, 8 insertions(+), 8 deletions(-) rename examples/{token-auth => v7-token-auth-example}/.gitignore (100%) rename examples/{token-auth => v7-token-auth-example}/.vscode/launch.json (100%) rename examples/{token-auth => v7-token-auth-example}/.vscode/tasks.json (100%) rename examples/{token-auth => v7-token-auth-example}/README.md (84%) rename examples/{token-auth => v7-token-auth-example}/edgio.config.js (58%) rename examples/{token-auth => v7-token-auth-example}/jsconfig.json (100%) rename examples/{token-auth => v7-token-auth-example}/next.config.js (100%) rename examples/{token-auth => v7-token-auth-example}/next.config.mjs (100%) rename examples/{token-auth => v7-token-auth-example}/package-lock.json (100%) rename examples/{token-auth => v7-token-auth-example}/package.json (85%) rename examples/{token-auth => v7-token-auth-example}/postcss.config.mjs (100%) rename examples/{token-auth => v7-token-auth-example}/public/edgio.png (100%) rename examples/{token-auth => v7-token-auth-example}/public/next.svg (100%) rename examples/{token-auth => v7-token-auth-example}/public/vercel.svg (100%) rename examples/{token-auth => v7-token-auth-example}/routes.js (92%) rename examples/{token-auth => v7-token-auth-example}/src/app/api/token/route.js (100%) rename examples/{token-auth => v7-token-auth-example}/src/app/favicon.ico (100%) rename examples/{token-auth => v7-token-auth-example}/src/app/globals.css (100%) rename examples/{token-auth => v7-token-auth-example}/src/app/layout.js (100%) rename examples/{token-auth => v7-token-auth-example}/src/app/page.js (100%) rename examples/{token-auth => v7-token-auth-example}/src/app/secure/dynamic/page.jsx (100%) rename examples/{token-auth => v7-token-auth-example}/src/app/secure/generator/page.jsx (100%) rename examples/{token-auth => v7-token-auth-example}/src/app/secure/info/page.jsx (100%) rename examples/{token-auth => v7-token-auth-example}/src/app/secure/layout.jsx (100%) rename examples/{token-auth => v7-token-auth-example}/src/app/secure/page.jsx (100%) rename examples/{token-auth => v7-token-auth-example}/src/app/secure/static/page.jsx (100%) rename examples/{token-auth => v7-token-auth-example}/src/components/TokenAwareLink.jsx (100%) rename examples/{token-auth => v7-token-auth-example}/sw/service-worker.js (100%) rename examples/{token-auth => v7-token-auth-example}/tailwind.config.js (100%) diff --git a/examples/token-auth/.gitignore b/examples/v7-token-auth-example/.gitignore similarity index 100% rename from examples/token-auth/.gitignore rename to examples/v7-token-auth-example/.gitignore diff --git a/examples/token-auth/.vscode/launch.json b/examples/v7-token-auth-example/.vscode/launch.json similarity index 100% rename from examples/token-auth/.vscode/launch.json rename to examples/v7-token-auth-example/.vscode/launch.json diff --git a/examples/token-auth/.vscode/tasks.json b/examples/v7-token-auth-example/.vscode/tasks.json similarity index 100% rename from examples/token-auth/.vscode/tasks.json rename to examples/v7-token-auth-example/.vscode/tasks.json diff --git a/examples/token-auth/README.md b/examples/v7-token-auth-example/README.md similarity index 84% rename from examples/token-auth/README.md rename to examples/v7-token-auth-example/README.md index 2ddf78cf9..50e455454 100644 --- a/examples/token-auth/README.md +++ b/examples/v7-token-auth-example/README.md @@ -1,16 +1,16 @@ # Next.js Demo of Edgio Token Auth Functionality This project demonstrates how Token Auth works with Edgio. For more details on this feature, visit [the docs](https://docs.edg.io/applications/v7/security/token_auth). -## Pages Available +## Available Pages This application exposes a few separate pages and one API endpoint: -* Main Page `/`: This page does not require an auth token. -* Token Auth Landing Page `/secure`: This page does not require an auth token. All links on this page (except for the link to the homepage) DO require a valid token. +* Main Page `/`: This page does not require a token. +* Token Auth Landing Page `/secure`: This page does not require a token. All links on this page require a valid token. * Static Secure Page `/secure/static`: This page shows static data. * Static Dynamic Page `/secure/dynamic`: This page shows dynamic data fetched from a third-party API. * Token Generator/Decoder `/secure/generator`: This page allows the visitor to create and decode `ectoken`-compatible tokens. * Current Token Information `/secure/info`: This page shows the decoded information about the token used to access the page. -* API route `/api/token`: This API route takes a GET request and returns a new token valid for all users but only for three minutes from when it was generated. +* API route `/api/token`: This API route takes a `GET` request and returns a new token valid for all users but only for three minutes from when it was generated. ## How to Use 1. Navigate to the project homepage and click the link for the "Landing Page." diff --git a/examples/token-auth/edgio.config.js b/examples/v7-token-auth-example/edgio.config.js similarity index 58% rename from examples/token-auth/edgio.config.js rename to examples/v7-token-auth-example/edgio.config.js index 1670aba9e..ffa5ae71f 100644 --- a/examples/token-auth/edgio.config.js +++ b/examples/v7-token-auth-example/edgio.config.js @@ -1,4 +1,4 @@ module.exports = { connector: '@edgio/next', - organization: 'se-apps', + organization: 'edgio-community', } diff --git a/examples/token-auth/jsconfig.json b/examples/v7-token-auth-example/jsconfig.json similarity index 100% rename from examples/token-auth/jsconfig.json rename to examples/v7-token-auth-example/jsconfig.json diff --git a/examples/token-auth/next.config.js b/examples/v7-token-auth-example/next.config.js similarity index 100% rename from examples/token-auth/next.config.js rename to examples/v7-token-auth-example/next.config.js diff --git a/examples/token-auth/next.config.mjs b/examples/v7-token-auth-example/next.config.mjs similarity index 100% rename from examples/token-auth/next.config.mjs rename to examples/v7-token-auth-example/next.config.mjs diff --git a/examples/token-auth/package-lock.json b/examples/v7-token-auth-example/package-lock.json similarity index 100% rename from examples/token-auth/package-lock.json rename to examples/v7-token-auth-example/package-lock.json diff --git a/examples/token-auth/package.json b/examples/v7-token-auth-example/package.json similarity index 85% rename from examples/token-auth/package.json rename to examples/v7-token-auth-example/package.json index 75da06282..8987eed84 100644 --- a/examples/token-auth/package.json +++ b/examples/v7-token-auth-example/package.json @@ -8,7 +8,7 @@ "start": "next start", "lint": "next lint" }, - "name": "edgio-token-auth-example", + "name": "edgio-v7-token-auth-example", "version": "0.1.0", "private": true, "dependencies": { @@ -28,5 +28,5 @@ "postcss": "^8", "tailwindcss": "^3.4.1" }, - "repository": "git@github.com:edgio-docs/edgio-token-auth-example.git" + "repository": "git@github.com:edgio-docs/edgio-v7-token-auth-example.git" } \ No newline at end of file diff --git a/examples/token-auth/postcss.config.mjs b/examples/v7-token-auth-example/postcss.config.mjs similarity index 100% rename from examples/token-auth/postcss.config.mjs rename to examples/v7-token-auth-example/postcss.config.mjs diff --git a/examples/token-auth/public/edgio.png b/examples/v7-token-auth-example/public/edgio.png similarity index 100% rename from examples/token-auth/public/edgio.png rename to examples/v7-token-auth-example/public/edgio.png diff --git a/examples/token-auth/public/next.svg b/examples/v7-token-auth-example/public/next.svg similarity index 100% rename from examples/token-auth/public/next.svg rename to examples/v7-token-auth-example/public/next.svg diff --git a/examples/token-auth/public/vercel.svg b/examples/v7-token-auth-example/public/vercel.svg similarity index 100% rename from examples/token-auth/public/vercel.svg rename to examples/v7-token-auth-example/public/vercel.svg diff --git a/examples/token-auth/routes.js b/examples/v7-token-auth-example/routes.js similarity index 92% rename from examples/token-auth/routes.js rename to examples/v7-token-auth-example/routes.js index 7daaa9f4c..bc9039674 100644 --- a/examples/token-auth/routes.js +++ b/examples/v7-token-auth-example/routes.js @@ -25,7 +25,7 @@ export default new Router() { response: { set_response_body: - "

403 - Access Denied

Your request requires a valid token to proceed. Please append it to the URL and try again.

Return to the Token Auth landing page.

", + "

403 - Access Denied

Your request requires a valid token to proceed. Please append it to the URL and try again.

Return to the Token Auth landing page.

", set_status_code: 403 }, } diff --git a/examples/token-auth/src/app/api/token/route.js b/examples/v7-token-auth-example/src/app/api/token/route.js similarity index 100% rename from examples/token-auth/src/app/api/token/route.js rename to examples/v7-token-auth-example/src/app/api/token/route.js diff --git a/examples/token-auth/src/app/favicon.ico b/examples/v7-token-auth-example/src/app/favicon.ico similarity index 100% rename from examples/token-auth/src/app/favicon.ico rename to examples/v7-token-auth-example/src/app/favicon.ico diff --git a/examples/token-auth/src/app/globals.css b/examples/v7-token-auth-example/src/app/globals.css similarity index 100% rename from examples/token-auth/src/app/globals.css rename to examples/v7-token-auth-example/src/app/globals.css diff --git a/examples/token-auth/src/app/layout.js b/examples/v7-token-auth-example/src/app/layout.js similarity index 100% rename from examples/token-auth/src/app/layout.js rename to examples/v7-token-auth-example/src/app/layout.js diff --git a/examples/token-auth/src/app/page.js b/examples/v7-token-auth-example/src/app/page.js similarity index 100% rename from examples/token-auth/src/app/page.js rename to examples/v7-token-auth-example/src/app/page.js diff --git a/examples/token-auth/src/app/secure/dynamic/page.jsx b/examples/v7-token-auth-example/src/app/secure/dynamic/page.jsx similarity index 100% rename from examples/token-auth/src/app/secure/dynamic/page.jsx rename to examples/v7-token-auth-example/src/app/secure/dynamic/page.jsx diff --git a/examples/token-auth/src/app/secure/generator/page.jsx b/examples/v7-token-auth-example/src/app/secure/generator/page.jsx similarity index 100% rename from examples/token-auth/src/app/secure/generator/page.jsx rename to examples/v7-token-auth-example/src/app/secure/generator/page.jsx diff --git a/examples/token-auth/src/app/secure/info/page.jsx b/examples/v7-token-auth-example/src/app/secure/info/page.jsx similarity index 100% rename from examples/token-auth/src/app/secure/info/page.jsx rename to examples/v7-token-auth-example/src/app/secure/info/page.jsx diff --git a/examples/token-auth/src/app/secure/layout.jsx b/examples/v7-token-auth-example/src/app/secure/layout.jsx similarity index 100% rename from examples/token-auth/src/app/secure/layout.jsx rename to examples/v7-token-auth-example/src/app/secure/layout.jsx diff --git a/examples/token-auth/src/app/secure/page.jsx b/examples/v7-token-auth-example/src/app/secure/page.jsx similarity index 100% rename from examples/token-auth/src/app/secure/page.jsx rename to examples/v7-token-auth-example/src/app/secure/page.jsx diff --git a/examples/token-auth/src/app/secure/static/page.jsx b/examples/v7-token-auth-example/src/app/secure/static/page.jsx similarity index 100% rename from examples/token-auth/src/app/secure/static/page.jsx rename to examples/v7-token-auth-example/src/app/secure/static/page.jsx diff --git a/examples/token-auth/src/components/TokenAwareLink.jsx b/examples/v7-token-auth-example/src/components/TokenAwareLink.jsx similarity index 100% rename from examples/token-auth/src/components/TokenAwareLink.jsx rename to examples/v7-token-auth-example/src/components/TokenAwareLink.jsx diff --git a/examples/token-auth/sw/service-worker.js b/examples/v7-token-auth-example/sw/service-worker.js similarity index 100% rename from examples/token-auth/sw/service-worker.js rename to examples/v7-token-auth-example/sw/service-worker.js diff --git a/examples/token-auth/tailwind.config.js b/examples/v7-token-auth-example/tailwind.config.js similarity index 100% rename from examples/token-auth/tailwind.config.js rename to examples/v7-token-auth-example/tailwind.config.js