get5loader icon indicating copy to clipboard operation
get5loader copied to clipboard

ユーザーがIDとパスワードを使用して登録・ログイン出来るようにする

Open FlowingSPDG opened this issue 2 years ago • 1 comments

FlowingSPDG avatar Aug 13 '23 23:08 FlowingSPDG

登録API: 以下のエンドポイントにJSONを投げるとjwtが返ってくる エンドポイント:http://localhost:8080/api/v1/register リクエスト:

{
  "name": "なまえ", // 名前
  "steamid": 76561198072054549, // SteamID64、現状は特に認証をかけていない
  "password": "password" // パスワード
}

ログインAPI: 以下のエンドポイントにJSONを投げるとjwtが返ってくる エンドポイント:http://localhost:8080/api/v1/login リクエスト:

{
  "steamid": 76561198072054549, // SteamID64
  "password": "password" // パスワード
}

共通レスポンス:

{
"token": "eyJhbGciOiJIUzI1NiIsInR5xxxxxx.xxxxxxxxxxxxxxxx.d2Sek9yBYuhNH8QVet6xxxxxxxxxx" // こいつがJWT
}

image

FlowingSPDG avatar Aug 14 '23 08:08 FlowingSPDG