1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-08-27 13:49:10 +02:00

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.
This commit is contained in:
Gastón Fournier 2025-08-22 06:47:32 -07:00 committed by GitHub
parent 7ea0c9ca9b
commit 9e76b2c40a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 16 additions and 16 deletions

View File

@ -6,7 +6,7 @@ import SearchPriority from '@site/src/components/SearchPriority';
<SearchPriority level="noindex" />
> 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}

View File

@ -7,7 +7,7 @@ import SearchPriority from '@site/src/components/SearchPriority';
<SearchPriority level="noindex" />
> 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}

View File

@ -7,7 +7,7 @@ import SearchPriority from '@site/src/components/SearchPriority';
<SearchPriority level="noindex" />
> 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}

View File

@ -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"
}
```

View File

@ -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://<your-unleash>/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://<your-unleash>/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:::`;