CorvusToken
public final class CorvusToken : CorvusModel
extension CorvusToken: CorvusModelTokenAuthenticatable
A default implementation of a bearer token.
-
The corresponding database schema.
Declaration
Swift
public static let schema: String -
The unique identifier of the model in the database.
Declaration
Swift
@CorvusToken .ID public var id: UUID? { get set } -
The string value of the token.
Declaration
Swift
@CorvusToken .Field public var value: String { get set } -
The
CorvusUserthat the token belongs to.Declaration
Swift
@CorvusToken .Parent public var user: CorvusUser { get set } -
Empty initializer to create without args.
Declaration
Swift
public init() -
Initializes
CorvusTokenwith arguments.Declaration
Swift
public init(id: UUID? = nil, value: String, userID: CorvusUser.IDValue)Parameters
idThe id of the
CorvusToken.valueThe
stringvalue of theCorvusToken.userIDThe id of the
CorvusUsertheCorvusTokenbelongs to. -
Prevents tokens from being deleted after authentication.
Declaration
Swift
public var isValid: Bool { get }
CorvusToken Class Reference