diff options
author | Harrison Healey <harrisonmhealey@gmail.com> | 2016-07-12 10:52:43 -0400 |
---|---|---|
committer | Harrison Healey <harrisonmhealey@gmail.com> | 2016-07-12 10:52:43 -0400 |
commit | 954e251188621563b3b10218f4072cc358149e84 (patch) | |
tree | 0fa41b4ecc7dcd5e9e73062ad6ebc7edd5343da0 /api/authentication.go | |
parent | ad343a0f4ad175053f7d0da12a0587bcbb396d1c (diff) | |
parent | c377605906fc7eeb9dcaf75e66732efd3b4fe7fc (diff) | |
download | chat-954e251188621563b3b10218f4072cc358149e84.tar.gz chat-954e251188621563b3b10218f4072cc358149e84.tar.bz2 chat-954e251188621563b3b10218f4072cc358149e84.zip |
Merged release-3.2 into master
Diffstat (limited to 'api/authentication.go')
-rw-r--r-- | api/authentication.go | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/api/authentication.go b/api/authentication.go index 8170f0a8e..fbfdb2cf4 100644 --- a/api/authentication.go +++ b/api/authentication.go @@ -13,11 +13,24 @@ import ( ) func checkPasswordAndAllCriteria(user *model.User, password string, mfaToken string) *model.AppError { + if err := checkUserAdditionalAuthenticationCriteria(user, mfaToken); err != nil { + return err + } + if err := checkUserPassword(user, password); err != nil { return err } - if err := checkUserAdditionalAuthenticationCriteria(user, mfaToken); err != nil { + return nil +} + +// This to be used for places we check the users password when they are already logged in +func doubleCheckPassword(user *model.User, password string) *model.AppError { + if err := checkUserLoginAttempts(user); err != nil { + return err + } + + if err := checkUserPassword(user, password); err != nil { return err } |