Improved Session Storage
Improved session storage so that Turnstile works with more than just in-memory stores
- Subjects can auto-initialize from a Session via
Subject(turnstile:sessionID:)
- An empty struct,
Session
is a credential type forSubjects
initialized with a SessionID - Accounts now only have a
uniqueID
, which is an ID that needs to be unique within its realm. The Realm.type requirement has been dropped. SessionManager.getSubject(identifier:) throws -> Subject
is nowSessionManager.restoreAccount(fromSessionID:) throws -> Account
createSession(user:) -> String
is nowcreateSession(account:) -> String