CorvusModelTokenAuthenticatable
public protocol CorvusModelTokenAuthenticatable : CorvusModel, Authenticatable
A protocol that defines bearer authentication tokens, similar to
ModelTokenAuthenticatable.
-
The
Usertype the token belongs to.Declaration
Swift
associatedtype User : CorvusModel, Authenticatable -
The
Stringvalue of the token.Declaration
Swift
var value: String { get set } -
A boolean that deletes tokens if they’re not in use.
Declaration
Swift
var isValid: Bool { get } -
authenticator(database:Extension method) Provides a
Vaporauthenticator defined below.Declaration
Swift
public static func authenticator( database: DatabaseID? = nil ) -> CorvusModelTokenAuthenticator<Self>Parameters
databaseThe database to authenticate.
Return Value
CorvusModelTokenAuthenticatable Protocol Reference