mirror of
https://github.com/Unleash/unleash.git
synced 2025-09-01 13:47:27 +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:
parent
7ea0c9ca9b
commit
9e76b2c40a
@ -6,7 +6,7 @@ import SearchPriority from '@site/src/components/SearchPriority';
|
|||||||
|
|
||||||
<SearchPriority level="noindex" />
|
<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}
|
### Fetching Feature Flags {#fetching-feature-toggles}
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@ import SearchPriority from '@site/src/components/SearchPriority';
|
|||||||
|
|
||||||
<SearchPriority level="noindex" />
|
<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}
|
### Send metrics {#send-metrics}
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@ import SearchPriority from '@site/src/components/SearchPriority';
|
|||||||
|
|
||||||
<SearchPriority level="noindex" />
|
<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}
|
### Client registration {#client-registration}
|
||||||
|
|
||||||
|
@ -37,11 +37,11 @@ The permissions of the API token you use with Terraform and your Unleash [plan](
|
|||||||
|
|
||||||
Example usage:
|
Example usage:
|
||||||
```hcl
|
```hcl
|
||||||
resource "unleash_api_token" "client_token" {
|
resource "unleash_api_token" "backend_token" {
|
||||||
token_name = "client_token"
|
token_name = "backend_token"
|
||||||
type = "client"
|
type = "client"
|
||||||
expires_at = "2024-12-31T23:59:59Z"
|
expires_at = "2024-12-31T23:59:59Z"
|
||||||
project = "default"
|
projects = ["default"]
|
||||||
environment = "development"
|
environment = "development"
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
@ -21,10 +21,10 @@ import {
|
|||||||
//
|
//
|
||||||
// type ReadmeData = Readme & { repoUrl: string };
|
// type ReadmeData = Readme & { repoUrl: string };
|
||||||
|
|
||||||
const CLIENT_SIDE_SDK = 'frontend';
|
const FRONTEND_SDKS = 'frontend';
|
||||||
const SERVER_SIDE_SDK = 'backend';
|
const BACKEND_SDKS = 'backend';
|
||||||
|
|
||||||
const serverSideSdks = {
|
const backendSdks = {
|
||||||
'unleash-go-sdk': {
|
'unleash-go-sdk': {
|
||||||
sidebarName: 'Go',
|
sidebarName: 'Go',
|
||||||
branch: 'v5',
|
branch: 'v5',
|
||||||
@ -53,7 +53,7 @@ const serverSideSdks = {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
const clientSideSdks = {
|
const frontendSdks = {
|
||||||
'unleash-android-proxy-sdk': {
|
'unleash-android-proxy-sdk': {
|
||||||
sidebarName: 'Android (legacy)',
|
sidebarName: 'Android (legacy)',
|
||||||
slugName: 'android-proxy-legacy',
|
slugName: 'android-proxy-legacy',
|
||||||
@ -89,11 +89,11 @@ const clientSideSdks = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const SDKS = (() => {
|
const SDKS = (() => {
|
||||||
const serverSide = Object.entries(serverSideSdks).map(
|
const serverSide = Object.entries(backendSdks).map(
|
||||||
enrichAdditional({ type: SERVER_SIDE_SDK }),
|
enrichAdditional({ type: BACKEND_SDKS }),
|
||||||
);
|
);
|
||||||
const clientSide = Object.entries(clientSideSdks).map(
|
const clientSide = Object.entries(frontendSdks).map(
|
||||||
enrichAdditional({ type: CLIENT_SIDE_SDK }),
|
enrichAdditional({ type: FRONTEND_SDKS }),
|
||||||
);
|
);
|
||||||
|
|
||||||
return Object.fromEntries(serverSide.concat(clientSide));
|
return Object.fromEntries(serverSide.concat(clientSide));
|
||||||
@ -101,8 +101,8 @@ const SDKS = (() => {
|
|||||||
|
|
||||||
const getAdmonitions = (sdk) => {
|
const getAdmonitions = (sdk) => {
|
||||||
const admonitions = {
|
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)).`,
|
[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)).`,
|
||||||
[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)).`,
|
[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:::`;
|
const wrap = (text) => `:::tip\n${text}\n:::`;
|
||||||
|
Loading…
Reference in New Issue
Block a user