Skip to content

Instantly share code, notes, and snippets.

@calebkleveter
Last active December 22, 2016 15:27
Show Gist options
  • Save calebkleveter/affc4dd5dd773fe1cf60bc5d59b3a71c to your computer and use it in GitHub Desktop.
Save calebkleveter/affc4dd5dd773fe1cf60bc5d59b3a71c to your computer and use it in GitHub Desktop.
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