aboutsummaryrefslogtreecommitdiffhomepage
path: root/backend/api
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2025-03-04 23:39:26 +0900
committernsfisis <nsfisis@gmail.com>2025-03-04 23:39:26 +0900
commitefd34b970d0d1f88fa7d7e9d69e569f039867ca2 (patch)
treeba1e5a51e2fac9ecbe7b9b3e0e197bdb327f2a4e /backend/api
parentbd9c2e8b587c733059d44f642c53536eb7fe1ec9 (diff)
downloadiosdc-japan-2025-albatross-efd34b970d0d1f88fa7d7e9d69e569f039867ca2.tar.gz
iosdc-japan-2025-albatross-efd34b970d0d1f88fa7d7e9d69e569f039867ca2.tar.zst
iosdc-japan-2025-albatross-efd34b970d0d1f88fa7d7e9d69e569f039867ca2.zip
rm registration token
Diffstat (limited to 'backend/api')
-rw-r--r--backend/api/generated.go10
-rw-r--r--backend/api/handler.go9
2 files changed, 6 insertions, 13 deletions
diff --git a/backend/api/generated.go b/backend/api/generated.go
index 7eb5940..af716df 100644
--- a/backend/api/generated.go
+++ b/backend/api/generated.go
@@ -311,9 +311,8 @@ type GetGameParams struct {
// PostLoginJSONBody defines parameters for PostLogin.
type PostLoginJSONBody struct {
- Password string `json:"password"`
- RegistrationToken *string `json:"registration_token,omitempty"`
- Username string `json:"username"`
+ Password string `json:"password"`
+ Username string `json:"username"`
}
// GetTokenParams defines parameters for GetToken.
@@ -1186,9 +1185,8 @@ var swaggerSpec = []string{
"16CuzQbfGfc3vKwVWwa1PwdIb7dm7KPhcK+Br0uvHHqnoZmZUlaGZjUjJdmQBXeM/J5I5fG5ZyVSH50P",
"T5sg5D4P3OGzFjprFyrN6HWdTKIIi/UGQmY/9bNUDh6zsVjaltSecuq3yjm/2DgCB7plvibTnRJ9aUL8",
"zTKsJc7bJfKfariUuAbl4QywpgTlC1sNYy5rmHDDpXpvttjggFSvebh+Qj5iLOWKi3DrbTx7ejo6qyvb",
- "AhZEqmw+q/g/sHVBPmz9q9PxxArNNgcig1/PDPfnRGmvTG7y+6T0f3sLaJR0ofXEdj/zhNK1pykLTGmo",
- "G9buTXWHh7of8Cz5DA9z55oK0iez4TneMt9VXmx9kEsu1EtK7iH0sDHnWYBpmqb/BQAA//+vy4pZ5ycA",
- "AA==",
+ "T6yubEPmzHR9Vt2fAqW9slDxf2DrUn/Q/05K/7e3b0ZJF0pObOcyTyhde5puwJSGumHc3jR1OKTvcs8S",
+ "x3Aod66pmHwyG57jDfFd5cWebbnkQr2k5B5CDxtzngWYpmn6XwAAAP//wKRGKaMnAAA=",
}
// GetSwagger returns the content of the embedded swagger specification file
diff --git a/backend/api/handler.go b/backend/api/handler.go
index dafcf84..d16b731 100644
--- a/backend/api/handler.go
+++ b/backend/api/handler.go
@@ -27,16 +27,11 @@ type GameHubsInterface interface {
func (h *Handler) PostLogin(ctx context.Context, request PostLoginRequestObject) (PostLoginResponseObject, error) {
username := request.Body.Username
password := request.Body.Password
- registrationToken := request.Body.RegistrationToken
- userID, err := auth.Login(ctx, h.q, username, password, registrationToken)
+ userID, err := auth.Login(ctx, h.q, username, password)
if err != nil {
log.Printf("login failed: %v", err)
var msg string
- if errors.Is(err, auth.ErrInvalidRegistrationToken) {
- msg = "登録用 URL が無効です。イベントスタッフにお声がけください"
- } else if errors.Is(err, auth.ErrNoRegistrationToken) {
- msg = "登録用 URL からログインしてください。登録用 URL は Connpass のイベントページに記載しています"
- } else if errors.Is(err, auth.ErrForteeLoginTimeout) {
+ if errors.Is(err, auth.ErrForteeLoginTimeout) {
msg = "ログインに失敗しました"
} else {
msg = "ユーザー名またはパスワードが誤っています"