@@ -56,9 +56,15 @@ This feature is particularly useful for seamless redirection and integration sce
56
56
57
57
1 . Call the ` /login ` API to obtain the login token and related information.
58
58
59
- 2 . Manually add the username used during login (not included in the ` /login ` response).
59
+ ```
60
+ curl -X POST "http://127.0.0.1:18083/api/v5/login" \
61
+ -H 'accept: application/json' \
62
+ -H 'Content-Type: application/json' \
63
+ -d '{"username": "admin","password": "public"}'
64
+ {"license":{"edition":"ee"},"role":"administrator","token":"xxx.yyy.zzz","version":"5.6.1"}
65
+ ```
60
66
61
- 3 . Combine the data into a JSON structure:
67
+ 2 . Combine the data into a JSON structure. Manually add the username used during login (not included in the ` /login ` response).
62
68
63
69
``` json
64
70
{
@@ -67,14 +73,21 @@ This feature is particularly useful for seamless redirection and integration sce
67
73
},
68
74
"role" : " administrator" ,
69
75
"token" : " xxx.jwt.token" ,
70
- "version" : " 5.5.0 -g0fef19f8" ,
76
+ "version" : " 5.6.1 -g0fef19f8" ,
71
77
"username" : " admin"
72
78
}
73
79
```
74
80
75
- 4 . Convert the JSON string to Base64.
81
+ 3 . Convert the JSON string to Base64.
82
+
83
+ ```
84
+ curl -s -X POST "http://127.0.0.1:18083/api/v5/login" \
85
+ -H 'accept: application/json' \
86
+ -H 'Content-Type: application/json' \
87
+ -d '{"username": "admin","password": "public"}' | jq '.username = "admin"' | base64
88
+ ```
76
89
77
- 5 . Embed the encoded string in the ` login_meta ` query parameter of the Dashboard URL.
90
+ 4 . Embed the encoded string in the ` login_meta ` query parameter of the Dashboard URL.
78
91
79
92
#### Example URL
80
93
0 commit comments