{
  "tags": [
    "身份认证"
  ],
  "description": "按账号查询登录时需要使用的验证码策略，以及该账号已脱敏的邮箱和手机号。账号可为已启用用户的用户名、邮箱或手机号；接口不需要登录。",
  "operationId": "public_get_v1_user_login_policy",
  "security": [],
  "responses": {
    "200": {
      "description": "请求已被处理。成功时返回登录验证码设置及脱敏联系方式；未提供账号或账号不存在时仍返回 HTTP 200。",
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "required": [
              "code",
              "msg",
              "data"
            ],
            "properties": {
              "code": {
                "type": "integer",
                "description": "业务状态码；成功为 0。",
                "example": 0
              },
              "msg": {
                "type": "string",
                "description": "处理结果说明。",
                "example": "获取成功!"
              },
              "data": {
                "type": "object",
                "required": [
                  "login_captcha",
                  "email",
                  "phone"
                ],
                "description": "账号的登录策略和脱敏联系方式。",
                "properties": {
                  "login_captcha": {
                    "type": "integer",
                    "description": "登录是否需要验证码的账号设置值。",
                    "example": 1
                  },
                  "email": {
                    "type": "string",
                    "nullable": true,
                    "description": "脱敏后的邮箱地址：邮箱用户名仅保留前两个字符，其余以四个星号替代。",
                    "example": "de****@example.invalid"
                  },
                  "phone": {
                    "type": "string",
                    "nullable": true,
                    "description": "脱敏后的手机号：保留前 3 位和后 4 位，中间以四个星号替代。",
                    "example": "138****1234"
                  }
                }
              }
            }
          },
          "examples": {
            "success": {
              "summary": "查询成功",
              "value": {
                "code": 0,
                "msg": "获取成功!",
                "data": {
                  "login_captcha": 1,
                  "email": "de****@example.invalid",
                  "phone": "138****1234"
                }
              }
            },
            "missingAccount": {
              "summary": "缺少账号",
              "value": {
                "code": "user_login_policy-1",
                "msg": "请提供帐号名",
                "data": ""
              }
            },
            "notFound": {
              "summary": "账号不存在",
              "value": {
                "code": "user_login_policy-2",
                "msg": "帐号不存在",
                "data": ""
              }
            }
          },
          "example": {
            "code": 0,
            "msg": "获取成功!",
            "data": {
              "login_captcha": 1,
              "email": "de****@example.invalid",
              "phone": "138****1234"
            }
          }
        }
      }
    }
  },
  "x-python-handler": "user.UserloginPolicyAPI",
  "x-python-route-line": 221,
  "x-audience": "user",
  "x-auth": "public",
  "x-reviewed": true,
  "parameters": [
    {
      "name": "account",
      "in": "query",
      "required": true,
      "schema": {
        "type": "string",
        "minLength": 1,
        "example": "demo"
      },
      "description": "必填。登录账号，可填写用户名、邮箱或手机号；必须对应已启用用户。"
    }
  ],
  "x-itecdn-source-reviewed": true,
  "extensions": [
    {
      "key": "x-python-handler",
      "value": "user.UserloginPolicyAPI"
    },
    {
      "key": "x-python-route-line",
      "value": 221
    },
    {
      "key": "x-audience",
      "value": "user"
    },
    {
      "key": "x-auth",
      "value": "public"
    },
    {
      "key": "x-reviewed",
      "value": true
    },
    {
      "key": "x-itecdn-source-reviewed",
      "value": true
    }
  ],
  "method": "get",
  "path": "/v1/user/login-policy",
  "servers": [
    {
      "url": "https://master.example.invalid",
      "description": "不可调用的示例地址；复制示例后替换为自己的主控域名。"
    }
  ],
  "securitySchemes": {
    "AccessToken": {
      "type": "apiKey",
      "in": "header",
      "name": "access-token",
      "description": "通过登录接口获得的短期访问令牌。"
    },
    "ApiKey": {
      "type": "apiKey",
      "in": "header",
      "name": "api-key",
      "description": "API Key；必须和 api-secret 同时发送。"
    },
    "ApiSecret": {
      "type": "apiKey",
      "in": "header",
      "name": "api-secret",
      "description": "API Secret；必须和 api-key 同时发送。"
    }
  },
  "info": {
    "title": "itecdn v5 用户 API",
    "version": "5.x",
    "description": "itecdn v5.x Python 主控用户 API。本文档不适用于 v6 或其它实现。"
  },
  "postman": {
    "name": "查询账号登录策略",
    "description": {
      "content": "按账号查询登录时需要使用的验证码策略，以及该账号已脱敏的邮箱和手机号。账号可为已启用用户的用户名、邮箱或手机号；接口不需要登录。",
      "type": "text/plain"
    },
    "url": {
      "path": [
        "v1",
        "user",
        "login-policy"
      ],
      "host": [
        "{{baseUrl}}"
      ],
      "query": [
        {
          "disabled": false,
          "description": {
            "content": "(Required) 必填。登录账号，可填写用户名、邮箱或手机号；必须对应已启用用户。",
            "type": "text/plain"
          },
          "key": "account",
          "value": ""
        }
      ],
      "variable": []
    },
    "header": [
      {
        "key": "Accept",
        "value": "application/json"
      }
    ],
    "method": "GET"
  }
}