Xsolla-logo
  • 문서화
  • 계정 생성

사용자 정의 ID로 인증

post/users/login/server_custom_id

특정 사용자 정의 ID로 사용자를 인증합니다. 사용자가 없으면 사용자를 생성합니다.

SecurityServer
Request
query Parameters
projectId
string <uuid>

게시자 계정의 로그인 프로젝트 ID입니다. 이 항목을 지정하지 않으면 지정한 publisher_project_id 매개변수에 섀도우 로그인을 사용하게 됩니다.

섀도우 로그인 ID는 이 호출에 전달할 필요가 없습니다.

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.

publisher_project_id
integer

요청한 게시자 계정의 프로젝트 ID입니다.

이 항목을 지정하고 project_id 매개변수를 지정하지 않으면 서비스가 project_id에 연결됩니다. project_idpublisher_project_id에 연결하려면 고객 성공 매니저에게 문의해야 합니다.

with_logout
string
Default: "0"

기존 사용자 JWT 값을 비활성화하고 이 호출로 생성한 값을 활성화할지 여부를 표시합니다. 사용 가능한 값:

  • '1'은 기존 값을 비활성화하고 새 값을 활성화합니다.
  • '0'은 기존 값을 활성화 상태로 유지합니다.
Request Body schema: application/json
server_custom_id
required
string <= 256 characters

Custom ID that already exists on your server. Note: It is not the same ID as the Xsolla Login user ID.

Array of objects

User attributes that are updated or created on authduring authentication.

Array
key
required
string <= 256 characters [A-Za-z0-9_]+

사용자의 특성을 식별하는 데 사용하는 특성의 이름입니다. 사용자별로 고유해야 합니다.

value
required
any
attr_type
required
string

Definition of user’s access level to service attributes:

  • client - A user-editable attribute. The values for this type of attributes are entered by a user or specified according to the in-game logics on the client side. For example, the name and character stats, game difficulty level, etc.
  • server - A read-only attribute. The values for this type of attributes are entered and edited on the server side of your application. We recommend that you use them for configuration of game character stats or user parameters that shouldn’t change regularly. For example, chance to get a bonus, game character key parameters, user categories, etc.
Enum: "client" "server"
permission
required
string

다른 사용자의 특성에 대한 사용자의 액세스 수준 정의입니다.

Enum: "private" "public"
read_only
boolean
object

User social profile.

user_id
required
string

소셜 서비스 제공업체에서 가져온 사용자 ID입니다.

platform
required
string

Name of the social provider.

Responses
200

확인

400

잘못된 요청

401

인증되지 않음

404

찾을 수 없음

422

처리할 수 없는 엔터티

429

요청이 너무 많음

Request samples
application/json
{
  • "attributes": [
    ],
  • "server_custom_id": "1234567890asdfghjkl",
  • "social_profile": {
    }
}
Response samples
application/json
{
  • "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6IiIsImV4cCI6MTY1MzEyMzk5MCwiZ3JvdXBzIjpbXSwiaWF0IjoxNjUzMDM3NTkwLCJpc3MiOiJodHRwczovL2xvZ2luLnhzb2xsYS5jb20iLCJwdWJsaXNoZXJfaWQiOjMsInNlcnZlcl9jdXN0b21faWQiOiJteS1jdXN0b20taWQtbm90LWxpbmtlZCIsInN1YiI6IjI0MTBkNmMzLWFhZDEtNGY0OS04ODNlLTQ2Y2FkM2ZiMmJjMiIsInR5cGUiOiJzZXJ2ZXJfY3VzdG9tX2lkIiwidXNlcm5hbWUiOm51bGwsInhzb2xsYV9sb2dpbl9hY2Nlc3Nfa2V5IjoiSFhzTVZSWmRtd2tuZXNZMG1pNEpUMVhJUm43bVM4ZU5oc1FxaTU4bmtCayIsInhzb2xsYV9sb2dpbl9wcm9qZWN0X2lkIjoiMTM3NTkyM2ItODdmMy00YTIwLWFjMmItZDBhMjg3MzBlNDIwIn0.D8dFMN5Bmgnpejq1EhZUZQP_D5iFhpO_RXnVyE03qUI"
}