POST /auth/logout
通过作废用户的全部刷新令牌来结束会话。须在请求头中携带有效的访问令牌。请求头
string
必填
Bearer 令牌。格式:
Bearer YOUR_ACCESS_TOKEN响应
boolean
退出是否成功。
string
确认信息。
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
curl -X POST https://api.llmgenerator.com/api/v1/auth/logout \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
const response = await fetch('https://api.llmgenerator.com/api/v1/auth/logout', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_ACCESS_TOKEN'
}
});
const data = await response.json();
{
"success": true,
"message": "Logout successful. All refresh tokens have been revoked."
}
{
"message": "Authorization header required"
}
撤销当前用户的访问与刷新令牌会话。
curl -X POST https://api.llmgenerator.com/api/v1/auth/logout \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
const response = await fetch('https://api.llmgenerator.com/api/v1/auth/logout', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_ACCESS_TOKEN'
}
});
const data = await response.json();
{
"success": true,
"message": "Logout successful. All refresh tokens have been revoked."
}
{
"message": "Authorization header required"
}
Bearer YOUR_ACCESS_TOKENcurl -X POST https://api.llmgenerator.com/api/v1/auth/logout \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
const response = await fetch('https://api.llmgenerator.com/api/v1/auth/logout', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_ACCESS_TOKEN'
}
});
const data = await response.json();
{
"success": true,
"message": "Logout successful. All refresh tokens have been revoked."
}
{
"message": "Authorization header required"
}
此页面对您有帮助吗?