Module: Perfect-Turnstile-SQLite
global var tokenStore: AccessTokenStore?
public var that houses the Token object
class AuthHandlersJSON
The class that holds all the JSON Authentication handlers
class AuthHandlersWeb
The class that holds all the Web-oriented Authentication handlers
func makeJSONAuthRoutes(_ root: String = "/api/v1") -> Routes
Defines and returns the JSON API Authentication routes
class AuthRealm : Realm
The "Turnstile Realm" that holds the main routing functionality for request filters
var random: Random = URandom()
A container for the Random object fromTurnstile Crypto
func authenticate(credentials: Credentials) throws -> Account
Used when a "Credentials" onject is passed to the authenticate function. Returns an Account object.
func authenticate(credentials: AccessToken) throws -> Account
Used when an "AccessToken" onject is passed to the authenticate function. Returns an Account object.
func func authenticate(credentials: UsernamePassword) throws -> Account
Used when a "UsernamePassword" onject is passed to the authenticate function. Returns an Account object.
func func register(credentials: Credentials) throws -> Account
Registers PasswordCredentials against the AuthRealm.
func makeWebAuthRoutes() -> Routes
Defines and returns the Web Authentication routes