Xsolla-logo

ユーザー名とパスワードによる認証

post/oauth2/login

指定されたユーザー名/メールアドレスおよびパスワードによってユーザーを認証します。ユーザー認証を完了するには、JWTを生成するリクエストを送信してユーザーJWTを取得します。

Request
query Parameters
response_type
required
string

OAuth 2.0プロトコルが有効なプロジェクトで使用されるグラントタイプ応答に含まれるユーザー認証コードを取得するためにcodeである必要があります。受け取ったコードはJWTを生成するのコールによってJWTに交換され、ユーザー認証が完了する必要があります。

client_id
required
integer

アプリケーションID。OAuth 2.0クライアントを作成した後で取得します。

state
required
string

追加のユーザー認証に使用される値。CSRF攻撃を軽減するためによく使用されます。この値は応答で返されます。8文字以上の文字列である必要があります。

audience
string

Identification parameter of the application the token was issued for. Parameter value will be passed in the aud JWT field.

scope
string

スコープは、ユーザーのアカウントへのアプリケーションのアクセスを制限するOAuth2.0のメカニズムです。

以下の値を指定できます:

上記以外のscopeパラメータ値を独自に処理する場合、このコールを使用する際に設定することができます。エクソラログインサーバーはこれらの値を処理しませんが、受信したJWTで返します。

redirect_uri
string

URL to redirect the user to after account confirmation, successful authentication, or password reset confirmation. To set up this parameter, contact your Customer Success Manager or email to csm@xsolla.com.

Notice
The parameter is required if you have more than one redirect URI in your project settings.
Request Body schema: application/json
username
required
string

ユーザー名またはメールアドレス。

password
required
string

ユーザーパスワード。

Responses
200

OK

400

無効なリクエスト

401

未認証

404

見つかりません

422

処理不可能なエンティティー

429

リクエストの回数が多すぎます

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