fix: signin の資格情報が足りないだけの場合はエラーにせず200を返すように (#14700)
* fix: signin の資格情報が足りないだけの場合はエラーにせず200を返すように * run api extractor * fix * fix * fix test * /signin -> /signin-flow * fix * fix lint * rename * fix * fix
This commit is contained in:
@@ -3,8 +3,8 @@ import { UserDetailed } from './autogen/models.js';
|
||||
import { AdminRolesCreateRequest, AdminRolesCreateResponse, UsersShowRequest } from './autogen/entities.js';
|
||||
import {
|
||||
PartialRolePolicyOverride,
|
||||
SigninRequest,
|
||||
SigninResponse,
|
||||
SigninFlowRequest,
|
||||
SigninFlowResponse,
|
||||
SigninWithPasskeyInitResponse,
|
||||
SigninWithPasskeyRequest,
|
||||
SigninWithPasskeyResponse,
|
||||
@@ -81,9 +81,9 @@ export type Endpoints = Overwrite<
|
||||
res: SignupPendingResponse;
|
||||
},
|
||||
// api.jsonには載せないものなのでここで定義
|
||||
'signin': {
|
||||
req: SigninRequest;
|
||||
res: SigninResponse;
|
||||
'signin-flow': {
|
||||
req: SigninFlowRequest;
|
||||
res: SigninFlowResponse;
|
||||
},
|
||||
'signin-with-passkey': {
|
||||
req: SigninWithPasskeyRequest;
|
||||
|
@@ -267,7 +267,7 @@ export type SignupPendingResponse = {
|
||||
i: string,
|
||||
};
|
||||
|
||||
export type SigninRequest = {
|
||||
export type SigninFlowRequest = {
|
||||
username: string;
|
||||
password?: string;
|
||||
token?: string;
|
||||
@@ -278,6 +278,19 @@ export type SigninRequest = {
|
||||
'm-captcha-response'?: string | null;
|
||||
};
|
||||
|
||||
export type SigninFlowResponse = {
|
||||
finished: true;
|
||||
id: User['id'];
|
||||
i: string;
|
||||
} | {
|
||||
finished: false;
|
||||
next: 'captcha' | 'password' | 'totp';
|
||||
} | {
|
||||
finished: false;
|
||||
next: 'passkey';
|
||||
authRequest: PublicKeyCredentialRequestOptionsJSON;
|
||||
};
|
||||
|
||||
export type SigninWithPasskeyRequest = {
|
||||
credential?: AuthenticationResponseJSON;
|
||||
context?: string;
|
||||
@@ -289,12 +302,7 @@ export type SigninWithPasskeyInitResponse = {
|
||||
};
|
||||
|
||||
export type SigninWithPasskeyResponse = {
|
||||
signinResponse: SigninResponse;
|
||||
};
|
||||
|
||||
export type SigninResponse = {
|
||||
id: User['id'],
|
||||
i: string,
|
||||
signinResponse: SigninFlowResponse;
|
||||
};
|
||||
|
||||
type Values<T extends Record<PropertyKey, unknown>> = T[keyof T];
|
||||
|
Reference in New Issue
Block a user