CorvusModelAuthenticatable
public protocol CorvusModelAuthenticatable : CorvusModel, Authenticatable
A protocol that defines bearer authentication tokens, similar to
ModelAuthenticatable.
-
The name of the user.
Declaration
Swift
var username: String { get set } -
The hashed password of the user.
Declaration
Swift
var password: String { get set } -
A function to verify a given password against the user’s.
Declaration
Swift
func verify(password: String) throws -> Bool -
authenticator(database:Extension method) Provides a
Vaporauthenticator defined below.Declaration
Swift
public static func authenticator( database: DatabaseID? = nil ) -> CorvusModelAuthenticator<Self>Parameters
databaseThe database to authenticate.
Return Value
CorvusModelAuthenticatable Protocol Reference