-
-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Get rid of LoginCache in favour of a stored property for an identity #67
Get rid of LoginCache in favour of a stored property for an identity #67
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, outside a couple of minor things. Makes me wonder if we should change the name of some of the other symbols that use User
to Identity
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nearly there. Is it worth merging both this and the session middleware at the same time. I'm pretty sure they will have clashes.
Sources/HummingbirdAuth/Authenticator/ClosureAuthenticator.swift
Outdated
Show resolved
Hide resolved
Sources/HummingbirdAuth/Middleware/IsAuthenticatedMiddleware.swift
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Can we have a sibling PR which implements this across all the examples.
Right, I changed 1 signature after running the tests :| |
Swift format? |
There also a number of documentation updates to make. |
Isn't the documentation part of a different package? |
The errors are most likely in the function comment headers. If you check the output you can see the issues. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We are good. Need a PR in examples fixing the examples up. Hopefully that'll also show up any issues with the changes if there are any.
* SessionMiddleware storing session in context * sessions should be a let * Fix up BasicSessionRequestContext * Add expiration date * Add SessionMiddleware.init that takes persist storage directly * Comments * Make SessionContext.init public * fixup documentation * More comments * Delete session and updating tests * Shouldn't be required to set an expiresIn value when updating session * Make SessionStorage generic over the session type * Fix the unit tests * Get rid of LoginCache in favour of a stored property for an identity (#67) * Get rid of LoginCache in favour of a stored property for an identity that's optional * Remove the Authenticatable protocol * Simplify usage of generics constraints * Fix the use of the IsAuthenticatedMiddleware init * Formatting * Clean up docs * A bit lighter on nested generics by moving them to the middleware --------- Co-authored-by: Joannis Orlandos <[email protected]>
…that's optional