You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: en_US/dashboard/introduction.md
+13-35Lines changed: 13 additions & 35 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -54,31 +54,9 @@ This feature is particularly useful for seamless redirection and integration sce
54
54
55
55
#### How To Use This Login Method
56
56
57
-
1.Call the `/login`API to obtain the login token and related information.
57
+
1.Use the `/login`endpoint to obtain an authentication token. Since the response does not include the username, you will need to manually add it before encoding the full JSON payload.
58
58
59
-
```
60
-
curl -X POST "http://127.0.0.1:18083/api/v5/login" \
2. Combine the data into a JSON structure. Manually add the username used during login (not included in the `/login` response).
68
-
69
-
```json
70
-
{
71
-
"license": {
72
-
"edition": "ee"
73
-
},
74
-
"role": "administrator",
75
-
"token": "xxx.jwt.token",
76
-
"version": "5.6.1-g0fef19f8",
77
-
"username": "admin"
78
-
}
79
-
```
80
-
81
-
3. Convert the JSON string to Base64. Below is an example on how to get base64-encoded authentication string in one call:
59
+
You can perform all steps, including requesting the token, injecting the username, and encoding the result in Base64, in a single command, as shown below:
82
60
83
61
```
84
62
curl -s -X POST "http://127.0.0.1:18083/api/v5/login" \
@@ -87,23 +65,23 @@ This feature is particularly useful for seamless redirection and integration sce
This allows specifying the target page after login.
107
85
108
86
This method provides a smooth, pre-authenticated user experience for accessing the EMQX Dashboard. Make sure to handle the token securely and ensure it has appropriate expiration and scope limits.
0 commit comments