This example demonstrates the integration Stormpath's Turnstile authentication system with Perfect and a SQLite ORM.
The library can be found at https://github.com/PerfectlySoft/Perfect-Turnstile-SQLite
This package builds with Swift Package Manager and is part of the Perfect project.
Ensure you have installed Xcode 8.0 or later.
- Check out or download the project;
- In terminal, navigate to the directory and execute
swift package generate-xcodeproj
- Open
PerfectTurnstileSQLiteDemo.xcodeproj
To run this project from Xcode, edit the Scheme, Under "Options" for "run", check "Use custom working directory" and choose the project's working directory. After doing this, the project can be run from within Xcode.
- Check out or download the project;
- In terminal, navigate to the directory
- Execute
swift build
- Once the project has compiled, execute
./.build/debug/PerfectTurnstileSQLiteDemo
[INFO] Starting HTTP server on 0.0.0.0:8181 with document root ./webroot
The framework includes certain basic routes:
POST /api/v1/login (with username & password form elements)
POST /api/v1/register (with username & password form elements)
GET /api/v1/logout
The following routes are available for browser testing:
http://localhost:8181
http://localhost:8181/login
http://localhost:8181/register
These routes are using Mustache files in the webroot directory.