Xsolla-logo
  • 文档
  • 创建帐户

通过用户名和密码进行认证Client-side

post/login

通过指定的用户名/电子邮箱和密码对用户进行认证。

Request
query Parameters
projectId
required
string <uuid>

发布商帐户中的登录管理器项目ID。

login_url
string

URL to redirect the user to after account confirmation, successful authentication, two-factor authentication configuration, or password reset confirmation. Must be identical to the Callback URL specified in the URL block of Publisher Account. For the scenario of a login error, the value should be identical to the the Error callback URL specified in the URL block of Publisher Account. To find the settings, go to Login > your Login project and select the Callback URLs section in the upper block. Required if there are several Callback URLs.

payload
string

Your custom data. The value of the parameter will be returned in the payload claim of the user JWT. Recommended maximum length less than 500 characters. Note, that this parameter is only available if you use a custom user data storage.

with_logout
string
Default: "0"

显示是否停用现有用户JWT值并激活此调用生成的值。可以是以下值:

  • 1,停用现有值并激活新值;
  • 0,保持现有值的激活状态。
Request Body schema: application/json
username
required
string

用户名或邮箱地址。

password
required
string

用户密码。

remember_me
boolean

用户是否同意保存认证数据。默认为false

Responses
200

确定

400

错误的请求

401

未授权

404

未授权

422

无法处理的实体

429

请求过多

Request samples
application/json
{
  • "password": "password123",
  • "remember_me": false,
  • "username": "John"
}
Response samples
application/json