fix: password hash update and add missing i18n (#6285)

This commit is contained in:
Livio Spring 2023-07-28 09:09:15 +02:00 committed by GitHub
parent 31ec1d83b9
commit 789dcd8615
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
27 changed files with 63 additions and 5 deletions

View File

@ -391,6 +391,7 @@ Errors:
InvalidAndLocked: >-
Паролата е невалидна и потребителят е заключен, свържете се с вашия
администратор.
NotChanged: Паролата не е променена
UsernameOrPassword:
Invalid: Потребителското име или паролата са невалидни
PasswordComplexityPolicy:

View File

@ -399,6 +399,7 @@ Errors:
Empty: Passwort ist leer
Invalid: Passwort ungültig
InvalidAndLocked: Password ist ungültig und Benutzer wurde gesperrt, melden Sie sich bei ihrem Administrator.
NotChanged: Passwort nicht geändert
UsernameOrPassword:
Invalid: Username oder Passwort ist ungültig
PasswordComplexityPolicy:

View File

@ -399,6 +399,7 @@ Errors:
Empty: Password is empty
Invalid: Password is invalid
InvalidAndLocked: Password is invalid and user is locked, contact your administrator.
NotChanged: Password not changed
UsernameOrPassword:
Invalid: Username or Password is invalid
PasswordComplexityPolicy:

View File

@ -381,6 +381,7 @@ Errors:
Empty: La contraseña está vacía
Invalid: La contraseña no es válida
InvalidAndLocked: La contraseña no es válida y el usuario está bloqueado, contacta con tu administrador.
NotChanged: Contraseña no modificada
UsernameOrPassword:
Invalid: El nombre de usuario o la contraseña no son válidos
PasswordComplexityPolicy:

View File

@ -399,6 +399,7 @@ Errors:
Empty: Le mot de passe est vide
Invalid: Le mot de passe n'est pas valide
InvalidAndLocked: Le mot de passe n'est pas valide et l'utilisateur est verrouillé, contactez votre administrateur.
NotChanged: Mot de passe non modifié
UsernameOrPassword:
Invalid: Le nom d'utilisateur ou le mot de passe n'est pas valide
PasswordComplexityPolicy:

View File

@ -399,6 +399,7 @@ Errors:
Empty: La password è vuota
Invalid: La password non è valida
InvalidAndLocked: La password non è valida e l'utente è bloccato, contatta il tuo amministratore.
NotChanged: Password non modificata
UsernameOrPassword:
Invalid: Il nome utente o la password non sono validi
PasswordComplexityPolicy:

View File

@ -362,6 +362,7 @@ Errors:
Empty: パスワードが空です
Invalid: 無効なパスワードです
InvalidAndLocked: パスワードが無効かつユーザーがロックされているため、管理者に連絡してください。
NotChanged: パスワードは変更されていません
UsernameOrPassword:
Invalid: ユーザー名またはパスワードは無効です
PasswordComplexityPolicy:

View File

@ -401,6 +401,7 @@ Errors:
Empty: Лозинката е празна
Invalid: Лозинката не е валидна
InvalidAndLocked: Лозинката не е валидна и корисникот е заклучен, контактирајте со вашиот администратор.
NotChanged: Лозинката не е променета
UsernameOrPassword:
Invalid: Корисничкото име и/или лозинката не се валидни
PasswordComplexityPolicy:

View File

@ -399,6 +399,7 @@ Errors:
Empty: Hasło jest puste
Invalid: Hasło jest niepoprawne
InvalidAndLocked: Hasło jest niepoprawne i użytkownik jest zablokowany, skontaktuj się z administratorem.
NotChanged: Hasło nie zostało zmienione
UsernameOrPassword:
Invalid: Nazwa użytkownika lub hasło jest niepoprawne
PasswordComplexityPolicy:

View File

@ -397,6 +397,7 @@ Errors:
Empty: A senha está vazia
Invalid: A senha é inválida
InvalidAndLocked: A senha é inválida e o usuário está bloqueado, entre em contato com o administrador.
NotChanged: Senha não alterada
UsernameOrPassword:
Invalid: Nome de usuário ou senha inválidos
PasswordComplexityPolicy:

View File

@ -399,6 +399,7 @@ Errors:
Empty: 密码为空
Invalid: 密码无效
InvalidAndLocked: 密码无效且用户被锁定,请联系您的管理员。
NotChanged: 密码未更改
UsernameOrPassword:
Invalid: 用户名或密码无效
PasswordComplexityPolicy:

View File

@ -90,6 +90,7 @@ func (wm *HumanPasswordWriteModel) Query() *eventstore.SearchQueryBuilder {
user.HumanEmailVerifiedType,
user.HumanPasswordCheckFailedType,
user.HumanPasswordCheckSucceededType,
user.HumanPasswordHashUpdatedType,
user.UserRemovedType,
user.UserUnlockedType,
user.UserV1AddedType,
@ -101,7 +102,7 @@ func (wm *HumanPasswordWriteModel) Query() *eventstore.SearchQueryBuilder {
user.UserV1EmailVerifiedType,
user.UserV1PasswordCheckFailedType,
user.UserV1PasswordCheckSucceededType,
user.UserV1PasswordHashUpdatedType).
).
Builder()
if wm.ResourceOwner != "" {

View File

@ -126,6 +126,7 @@ func (wm *HumanPasswordReadModel) Query() *eventstore.SearchQueryBuilder {
user.HumanEmailVerifiedType,
user.HumanPasswordCheckFailedType,
user.HumanPasswordCheckSucceededType,
user.HumanPasswordHashUpdatedType,
user.UserRemovedType,
user.UserUnlockedType,
user.UserV1AddedType,
@ -137,7 +138,7 @@ func (wm *HumanPasswordReadModel) Query() *eventstore.SearchQueryBuilder {
user.UserV1EmailVerifiedType,
user.UserV1PasswordCheckFailedType,
user.UserV1PasswordCheckSucceededType,
user.UserV1PasswordHashUpdatedType).
).
Builder()
if wm.ResourceOwner != "" {

View File

@ -17,7 +17,6 @@ func RegisterEventMappers(es *eventstore.Eventstore) {
RegisterFilterEventMapper(AggregateType, UserV1PasswordCodeSentType, HumanPasswordCodeSentEventMapper).
RegisterFilterEventMapper(AggregateType, UserV1PasswordCheckSucceededType, HumanPasswordCheckSucceededEventMapper).
RegisterFilterEventMapper(AggregateType, UserV1PasswordCheckFailedType, HumanPasswordCheckFailedEventMapper).
RegisterFilterEventMapper(AggregateType, UserV1PasswordHashUpdatedType, eventstore.GenericEventMapper[HumanPasswordHashUpdatedEvent]).
RegisterFilterEventMapper(AggregateType, UserV1EmailChangedType, HumanEmailChangedEventMapper).
RegisterFilterEventMapper(AggregateType, UserV1EmailVerifiedType, HumanEmailVerifiedEventMapper).
RegisterFilterEventMapper(AggregateType, UserV1EmailVerificationFailedType, HumanEmailVerificationFailedEventMapper).
@ -63,6 +62,7 @@ func RegisterEventMappers(es *eventstore.Eventstore) {
RegisterFilterEventMapper(AggregateType, HumanPasswordChangeSentType, HumanPasswordChangeSentEventMapper).
RegisterFilterEventMapper(AggregateType, HumanPasswordCheckSucceededType, HumanPasswordCheckSucceededEventMapper).
RegisterFilterEventMapper(AggregateType, HumanPasswordCheckFailedType, HumanPasswordCheckFailedEventMapper).
RegisterFilterEventMapper(AggregateType, HumanPasswordHashUpdatedType, eventstore.GenericEventMapper[HumanPasswordHashUpdatedEvent]).
RegisterFilterEventMapper(AggregateType, UserIDPLinkAddedType, UserIDPLinkAddedEventMapper).
RegisterFilterEventMapper(AggregateType, UserIDPLinkRemovedType, UserIDPLinkRemovedEventMapper).
RegisterFilterEventMapper(AggregateType, UserIDPLinkCascadeRemovedType, UserIDPLinkCascadeRemovedEventMapper).

View File

@ -21,6 +21,7 @@ const (
HumanPasswordCodeSentType = passwordEventPrefix + "code.sent"
HumanPasswordCheckSucceededType = passwordEventPrefix + "check.succeeded"
HumanPasswordCheckFailedType = passwordEventPrefix + "check.failed"
HumanPasswordHashUpdatedType = passwordEventPrefix + "hash.updated"
)
type HumanPasswordChangedEvent struct {
@ -298,7 +299,7 @@ func NewHumanPasswordHashUpdatedEvent(
BaseEvent: *eventstore.NewBaseEventForPush(
ctx,
aggregate,
HumanPasswordCheckFailedType,
HumanPasswordHashUpdatedType,
),
EncodedHash: encoded,
}

View File

@ -15,7 +15,6 @@ const (
UserV1PasswordCodeSentType = userV1PasswordEventTypePrefix + "code.sent"
UserV1PasswordCheckSucceededType = userV1PasswordEventTypePrefix + "check.succeeded"
UserV1PasswordCheckFailedType = userV1PasswordEventTypePrefix + "check.failed"
UserV1PasswordHashUpdatedType = userV1PasswordEventTypePrefix + "hash.updated"
userV1EmailEventTypePrefix = userEventTypePrefix + "email."
UserV1EmailChangedType = userV1EmailEventTypePrefix + "changed"

View File

@ -682,6 +682,10 @@ EventTypes:
check:
succeeded: Проверката на паролата е успешна
failed: Проверката на паролата е неуспешна
change:
sent: Промяната на паролата е изпратена
hash:
updated: Хешът на паролата е актуализиран
phone:
changed: Телефонният номер е променен
verified: Телефонният номер е потвърден

View File

@ -583,6 +583,10 @@ EventTypes:
check:
succeeded: Passwortvalidierung erfolgreich
failed: Passwortvalidierung fehlgeschlagen
change:
sent: Passwordänderung versendet
hash:
updated: Passwort Hash geändert
externallogin:
check:
succeeded: Externer login erfolgreich durchgeführt

View File

@ -583,6 +583,10 @@ EventTypes:
check:
succeeded: Password check succeeded
failed: Password check failed
change:
sent: Password change sent
hash:
updated: Password hash updated
externallogin:
check:
succeeded: External login succeeded

View File

@ -583,6 +583,10 @@ EventTypes:
check:
succeeded: Comprobación exitosa de la contraseña
failed: Fallo en la comprobación de la contraseña
change:
sent: Cambio de contraseña enviado
hash:
updated: Hash de contraseña actualizado
externallogin:
check:
succeeded: Inicio de sesión externo con éxito

View File

@ -581,6 +581,10 @@ EventTypes:
check:
succeeded: Vérification du mot de passe réussie
failed: La vérification du mot de passe a échoué
change:
sent: Changement de mot de passe envoyé
hash:
updated: Hachage du mot de passe mis à jour
externallogin:
check:
succeeded: Connexion externe réussie

View File

@ -581,6 +581,10 @@ EventTypes:
check:
succeeded: Controllo della password riuscito
failed: Controllo della password fallito
change:
sent: Cambio password inviato
hash:
updated: Hash della password aggiornato
externallogin:
check:
succeeded: Accesso esterno riuscito

View File

@ -655,6 +655,10 @@ EventTypes:
check:
succeeded: パスワードチェックの成功
failed: パスワードチェックの失敗
change:
sent: パスワード変更を送信しました
hash:
updated: パスワードハッシュが更新されました
phone:
changed: 電話番号の変更
verified: 電話番号の検証

View File

@ -666,6 +666,10 @@ EventTypes:
check:
succeeded: Проверката на лозинката е успешна
failed: Проверката на лозинката е неуспешна
change:
sent: Промената на лозинката е испратена
hash:
updated: Хашот на лозинката е ажуриран
phone:
changed: Бројот на телефонот е променет
verified: Бројот на телефонот е верифициран

View File

@ -583,6 +583,10 @@ EventTypes:
check:
succeeded: Sprawdzenie hasła zakończone powodzeniem
failed: Sprawdzenie hasła nie powiodło się
change:
sent: Wysłano zmianę hasła
hash:
updated: Zaktualizowano skrót hasła
externallogin:
check:
succeeded: Zewnętrzne logowanie zakończone powodzeniem

View File

@ -120,6 +120,7 @@ Errors:
Empty: Senha está vazia
Invalid: Senha é inválida
NotSet: O usuário não definiu uma senha
NotChanged: Senha não alterada
PasswordComplexityPolicy:
NotFound: Política de complexidade de senha não encontrada
MinLength: A senha é muito curta
@ -660,6 +661,10 @@ EventTypes:
check:
succeeded: Verificação de senha bem-sucedida
failed: Verificação de senha falhou
change:
sent: Alteração de senha enviada
hash:
updated: Hash da senha atualizado
phone:
changed: Número de telefone alterado
verified: Número de telefone verificado

View File

@ -664,6 +664,10 @@ EventTypes:
check:
succeeded: 密码检查成功
failed: 密码检查失败
change:
sent: 密码更改已发送
hash:
updated: 密码哈希已更新
phone:
changed: 更改手机号码
verified: 验证手机号码