Merge pull request #1202 from DEVTomatoCake/fix/password-mfacode-schemas
Fixes for password, mfa code & email validation schemas
This commit is contained in:
commit
3a63ae89cc
Binary file not shown.
Binary file not shown.
@ -1,17 +1,17 @@
|
||||
/*
|
||||
Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
|
||||
Copyright (C) 2023 Spacebar and Spacebar Contributors
|
||||
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published
|
||||
by the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
@ -21,5 +21,9 @@ export interface ApplicationAuthorizeSchema {
|
||||
guild_id: string;
|
||||
permissions: string;
|
||||
captcha_key?: string;
|
||||
/**
|
||||
* @minLength 6
|
||||
* @maxLength 6
|
||||
*/
|
||||
code?: string; // 2fa code
|
||||
}
|
||||
|
||||
@ -1,21 +1,25 @@
|
||||
/*
|
||||
Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
|
||||
Copyright (C) 2023 Spacebar and Spacebar Contributors
|
||||
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published
|
||||
by the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
export interface BackupCodesChallengeSchema {
|
||||
/**
|
||||
* @minLength 1
|
||||
* @maxLength 72
|
||||
*/
|
||||
password: string;
|
||||
}
|
||||
|
||||
@ -1,23 +1,27 @@
|
||||
/*
|
||||
Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
|
||||
Copyright (C) 2023 Spacebar and Spacebar Contributors
|
||||
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published
|
||||
by the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
export interface LoginSchema {
|
||||
login: string;
|
||||
/**
|
||||
* @minLength 1
|
||||
* @maxLength 72
|
||||
*/
|
||||
password: string;
|
||||
undelete?: boolean;
|
||||
captcha_key?: string;
|
||||
|
||||
@ -1,22 +1,26 @@
|
||||
/*
|
||||
Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
|
||||
Copyright (C) 2023 Spacebar and Spacebar Contributors
|
||||
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published
|
||||
by the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
export interface MfaCodesSchema {
|
||||
/**
|
||||
* @minLength 1
|
||||
* @maxLength 72
|
||||
*/
|
||||
password: string;
|
||||
regenerate?: boolean;
|
||||
}
|
||||
|
||||
@ -1,22 +1,26 @@
|
||||
/*
|
||||
Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
|
||||
Copyright (C) 2023 Spacebar and Spacebar Contributors
|
||||
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published
|
||||
by the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
export interface PasswordResetSchema {
|
||||
/**
|
||||
* @minLength 1
|
||||
* @maxLength 72
|
||||
*/
|
||||
password: string;
|
||||
token: string;
|
||||
}
|
||||
|
||||
@ -1,21 +1,25 @@
|
||||
/*
|
||||
Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
|
||||
Copyright (C) 2023 Spacebar and Spacebar Contributors
|
||||
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published
|
||||
by the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
export interface TotpDisableSchema {
|
||||
/**
|
||||
* @minLength 6
|
||||
* @maxLength 6
|
||||
*/
|
||||
code: string;
|
||||
}
|
||||
|
||||
@ -1,23 +1,31 @@
|
||||
/*
|
||||
Spacebar: A FOSS re-implementation and extension of the Discord.com backend.
|
||||
Copyright (C) 2023 Spacebar and Spacebar Contributors
|
||||
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as published
|
||||
by the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU Affero General Public License for more details.
|
||||
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
export interface TotpEnableSchema {
|
||||
/**
|
||||
* @minLength 1
|
||||
* @maxLength 72
|
||||
*/
|
||||
password: string;
|
||||
/**
|
||||
* @minLength 6
|
||||
* @maxLength 6
|
||||
*/
|
||||
code?: string;
|
||||
secret?: string;
|
||||
}
|
||||
|
||||
@ -25,9 +25,24 @@ export interface UserModifySchema {
|
||||
bio?: string;
|
||||
accent_color?: number;
|
||||
banner?: string | null;
|
||||
/**
|
||||
* @minLength 1
|
||||
* @maxLength 72
|
||||
*/
|
||||
password?: string;
|
||||
/**
|
||||
* @minLength 1
|
||||
* @maxLength 72
|
||||
*/
|
||||
new_password?: string;
|
||||
/**
|
||||
* @minLength 6
|
||||
* @maxLength 6
|
||||
*/
|
||||
code?: string;
|
||||
/**
|
||||
* @TJS-format email
|
||||
*/
|
||||
email?: string;
|
||||
/**
|
||||
* @minLength 4
|
||||
|
||||
Reference in New Issue
Block a user