Last active
December 22, 2016 15:27
-
-
Save calebkleveter/affc4dd5dd773fe1cf60bc5d59b3a71c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if try BCrypt.verify(password: usernamePassword.password, matchesHash: user.password) { | |
return user | |
} else { | |
throw Abort.custom(status: .networkAuthenticationRequired, message: "Invalid user name or password.") | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment