From d579670080914854d28ac27edcef7c591dd5c228 Mon Sep 17 00:00:00 2001 From: yostyle Date: Wed, 1 Sep 2021 10:09:04 +0200 Subject: [PATCH] Add password matrix errors --- changelog.d/3927.feature | 1 + .../android/sdk/api/failure/MatrixError.kt | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 changelog.d/3927.feature diff --git a/changelog.d/3927.feature b/changelog.d/3927.feature new file mode 100644 index 0000000000..86091b6422 --- /dev/null +++ b/changelog.d/3927.feature @@ -0,0 +1 @@ +Add password errors in the matrix SDK \ No newline at end of file diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/failure/MatrixError.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/failure/MatrixError.kt index e0230e6dff..1bc8636103 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/failure/MatrixError.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/api/failure/MatrixError.kt @@ -182,6 +182,24 @@ data class MatrixError( /** (Not documented yet) */ const val M_WEAK_PASSWORD = "M_WEAK_PASSWORD" + /** The provided password's length is shorter than the minimum length required by the server. */ + const val M_PASSWORD_TOO_SHORT = "M_PASSWORD_TOO_SHORT" + + /** The password doesn't contain any digit but the server requires at least one. */ + const val M_PASSWORD_NO_DIGIT = "M_PASSWORD_NO_DIGIT" + + /** The password doesn't contain any uppercase letter but the server requires at least one. */ + const val M_PASSWORD_NO_UPPERCASE = "M_PASSWORD_NO_UPPERCASE" + + /** The password doesn't contain any lowercase letter but the server requires at least one. */ + const val M_PASSWORD_NO_LOWERCASE = "M_PASSWORD_NO_LOWERCASE" + + /** The password doesn't contain any symbol but the server requires at least one. */ + const val M_PASSWORD_NO_SYMBOL = "M_PASSWORD_NO_SYMBOL" + + /** The password was found in a dictionary, and is not acceptable. */ + const val M_PASSWORD_IN_DICTIONARY = "M_PASSWORD_IN_DICTIONARY" + const val M_TERMS_NOT_SIGNED = "M_TERMS_NOT_SIGNED" // For identity service