为用户重新生成身份验证令牌

PUT

此 API 用于在 PAM360 中为用户重新生成身份验证令牌。响应将确认已生成新的 AUTHTOKEN,该令牌可用于后续的 API 请求。

请求 URL

https://<PAM360 服务器的主机名或 IP 地址>:<端口>/restapi/json/v1/user/regenerateAuthtoken

标头参数

{
    "AUTHTOKEN":"<<由 PAM360 生成的认证令牌>>",
    "orgName"  :"<<组织显示名称>>"
}

参数 描述

AUTHTOKEN

用户用于授权 API 请求的身份验证令牌。
类型:字符串
必填:是

默认值:不适用

orgName

PAM360 中可用的组织名称。
类型:字符串
必填:否

默认值: 用户所属的组织

请求示例

cURL Python PowerShell
curl -X PUT -H "AUTHTOKEN:<<由PAM360生成的认证令牌>>" -H "Content-Type: application/x-www-form-urlencoded" "https://<PAM360服务器的主机名或IP地址>:<端口>/restapi/json/v1/user/regenerateAuthtoken"
import requests

# API 端点
url= "https://<PAM360 服务器的主机名或 IP 地址>:<端口>/restapi/json/v1/user/regenerateAuthtoken"

# 请求头
headers = {
    "AUTHTOKEN":"<<由 PAM360 生成的认证令牌>>",
    "Content-Type": "application/x-www-form-urlencoded"
}

# 无正文的 PUT 请求(仅包含表单编码的头部)
response = requests.put(
    url,
    headers=headers,
    verify=True
)

# 打印响应
print(response.text)
# API 端点
$Url= "https://<PAM360 服务器的主机名或 IP 地址>:<端口>/restapi/json/v1/user/regenerateAuthtoken"

# 请求头
$Headers = @{
    "AUTHTOKEN"  ="<<由 PAM360 生成的 Authtoken>>"
    "Content-Type" = "application/x-www-form-urlencoded"
}

# 发送 PUT 请求
$response = Invoke-RestMethod `
    -Uri $Url `
    -Headers $Headers `
    -Method Put `
# 显示响应
$response | ConvertTo-Json -Depth 5

响应示例

{
  "operation": {
    "result": {
      "message":"身份验证令牌已成功重新生成。",
      "status":"true",
      "statusCode":20000
    },
    "Details": {
      "AUTHTOKEN":"<<由PAM360生成的认证令牌>>"
    },
    "name":"REGENERATE_AUTHTOKEN"
  }
}



Top