From 9e76b2c40a09910f9682c3b47a72b46c78731435 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gast=C3=B3n=20Fournier?= Date: Fri, 22 Aug 2025 06:47:32 -0700 Subject: [PATCH] docs: some details spotted to align with new token types (#10523) ## About the changes Few places where we can use Backend token instead of CLIENT. --- .../api/legacy/unleash/client/features.md | 2 +- .../api/legacy/unleash/client/metrics.md | 2 +- .../api/legacy/unleash/client/register.md | 2 +- website/docs/reference/terraform.mdx | 6 +++--- website/remote-content/sdks.js | 20 +++++++++---------- 5 files changed, 16 insertions(+), 16 deletions(-) diff --git a/website/docs/reference/api/legacy/unleash/client/features.md b/website/docs/reference/api/legacy/unleash/client/features.md index 26d05aab98..79ac544f13 100644 --- a/website/docs/reference/api/legacy/unleash/client/features.md +++ b/website/docs/reference/api/legacy/unleash/client/features.md @@ -6,7 +6,7 @@ import SearchPriority from '@site/src/components/SearchPriority'; -> In order to access the client API endpoints you need to identify yourself. Unless you're using the `none` authentication method, you'll need to [create a CLIENT token](/how-to/how-to-create-api-tokens.mdx) and add an Authorization header using the token. +> In order to access the client API endpoints you need to identify yourself. Unless you're using the `none` authentication method, you'll need to [create a Backend token](/how-to/how-to-create-api-tokens.mdx) and add an Authorization header using the token. ### Fetching Feature Flags {#fetching-feature-toggles} diff --git a/website/docs/reference/api/legacy/unleash/client/metrics.md b/website/docs/reference/api/legacy/unleash/client/metrics.md index d3015451b6..c85c2b5191 100644 --- a/website/docs/reference/api/legacy/unleash/client/metrics.md +++ b/website/docs/reference/api/legacy/unleash/client/metrics.md @@ -7,7 +7,7 @@ import SearchPriority from '@site/src/components/SearchPriority'; -> In order to access the client API endpoints you need to identify yourself. Unless you're using the `none` authentication method, you'll need to [create a CLIENT token](/how-to/how-to-create-api-tokens) and add an Authorization header using the token. +> In order to access the client API endpoints you need to identify yourself. Unless you're using the `none` authentication method, you'll need to [create a Backend token](/how-to/how-to-create-api-tokens) and add an Authorization header using the token. ### Send metrics {#send-metrics} diff --git a/website/docs/reference/api/legacy/unleash/client/register.md b/website/docs/reference/api/legacy/unleash/client/register.md index 4dd5d55736..b36643d768 100644 --- a/website/docs/reference/api/legacy/unleash/client/register.md +++ b/website/docs/reference/api/legacy/unleash/client/register.md @@ -7,7 +7,7 @@ import SearchPriority from '@site/src/components/SearchPriority'; -> In order to access the client API endpoints you need to identify yourself. Unless you're using the `none` authentication method, you'll need to [create a CLIENT token](/how-to/how-to-create-api-tokens) and add an Authorization header using the token. +> In order to access the client API endpoints you need to identify yourself. Unless you're using the `none` authentication method, you'll need to [create a Backend token](/how-to/how-to-create-api-tokens) and add an Authorization header using the token. ### Client registration {#client-registration} diff --git a/website/docs/reference/terraform.mdx b/website/docs/reference/terraform.mdx index f1267eee54..b13e16194e 100644 --- a/website/docs/reference/terraform.mdx +++ b/website/docs/reference/terraform.mdx @@ -37,11 +37,11 @@ The permissions of the API token you use with Terraform and your Unleash [plan]( Example usage: ```hcl -resource "unleash_api_token" "client_token" { - token_name = "client_token" +resource "unleash_api_token" "backend_token" { + token_name = "backend_token" type = "client" expires_at = "2024-12-31T23:59:59Z" - project = "default" + projects = ["default"] environment = "development" } ``` diff --git a/website/remote-content/sdks.js b/website/remote-content/sdks.js index d2546a12c7..9b31ae9c20 100644 --- a/website/remote-content/sdks.js +++ b/website/remote-content/sdks.js @@ -21,10 +21,10 @@ import { // // type ReadmeData = Readme & { repoUrl: string }; -const CLIENT_SIDE_SDK = 'frontend'; -const SERVER_SIDE_SDK = 'backend'; +const FRONTEND_SDKS = 'frontend'; +const BACKEND_SDKS = 'backend'; -const serverSideSdks = { +const backendSdks = { 'unleash-go-sdk': { sidebarName: 'Go', branch: 'v5', @@ -53,7 +53,7 @@ const serverSideSdks = { }, }; -const clientSideSdks = { +const frontendSdks = { 'unleash-android-proxy-sdk': { sidebarName: 'Android (legacy)', slugName: 'android-proxy-legacy', @@ -89,11 +89,11 @@ const clientSideSdks = { }; const SDKS = (() => { - const serverSide = Object.entries(serverSideSdks).map( - enrichAdditional({ type: SERVER_SIDE_SDK }), + const serverSide = Object.entries(backendSdks).map( + enrichAdditional({ type: BACKEND_SDKS }), ); - const clientSide = Object.entries(clientSideSdks).map( - enrichAdditional({ type: CLIENT_SIDE_SDK }), + const clientSide = Object.entries(frontendSdks).map( + enrichAdditional({ type: FRONTEND_SDKS }), ); return Object.fromEntries(serverSide.concat(clientSide)); @@ -101,8 +101,8 @@ const SDKS = (() => { const getAdmonitions = (sdk) => { const admonitions = { - [CLIENT_SIDE_SDK]: `To connect to Unleash from a frontend application, you'll need to use the [Unleash front-end API](/reference/front-end-api) ([how do I create an API token?](/how-to/how-to-create-api-tokens.mdx)) or the [Unleash proxy](/reference/unleash-proxy) ([how do I create client keys?](/reference/api-tokens-and-client-keys#proxy-client-keys)).`, - [SERVER_SIDE_SDK]: `To connect to Unleash, you'll need your Unleash API url (e.g. \`https:///api\`) and a [backend API token](/reference/api-tokens-and-client-keys.mdx#backend-tokens) ([how do I create an API token?](/how-to/how-to-create-api-tokens.mdx)).`, + [FRONTEND_SDKS]: `To connect to Unleash from a frontend application, you'll need to use the [Unleash front-end API](/reference/front-end-api) ([how do I create an API token?](/how-to/how-to-create-api-tokens.mdx)) or the [Unleash proxy](/reference/unleash-proxy) ([how do I create client keys?](/reference/api-tokens-and-client-keys#proxy-client-keys)).`, + [BACKEND_SDKS]: `To connect to Unleash, you'll need your Unleash API url (e.g. \`https:///api\`) and a [backend API token](/reference/api-tokens-and-client-keys.mdx#backend-tokens) ([how do I create an API token?](/how-to/how-to-create-api-tokens.mdx)).`, }; const wrap = (text) => `:::tip\n${text}\n:::`;