Trying to apply Vapor Doc Security -> Authentication when adding the snippet:
extension User: ModelAuthenticatable {
static let usernameKey = \User.$email
static let passwordHashKey = \User.$passwordHash
func verify(password: String) throws -> Bool {
try Bcrypt.verify(password, created: self.passwordHash)
}
}
I get the message from Xcode:
Is it safe to Add stubs for conformance ?
If so, what exactly should be the code to be added in the closures ?
static var usernameKey: KeyPath<User, FluentKit.FieldProperty<User, String>> {
<#code#>
}
static var passwordHashKey: KeyPath<User, FluentKit.FieldProperty<User, String>> {
<#code#>
}
Sorry I am too new in Vapor to find out by myself ! Thanks for helping.



