Skip to content

Expose IsNew() access method to return value from gorilla/sessions IsNew#20

Open
watercraft wants to merge 1 commit intomartini-contrib:masterfrom
watercraft:expose-isnew
Open

Expose IsNew() access method to return value from gorilla/sessions IsNew#20
watercraft wants to merge 1 commit intomartini-contrib:masterfrom
watercraft:expose-isnew

Conversation

@watercraft
Copy link
Copy Markdown

This change is needed to avoid returning true from IsAuthenticated() on the first API access after a session is expired.
This was tested using yosssi/boltstore for session cookies, which correctly return the flag IsNew true from New() for an expired session.
However, it takes another round of middleware access for IsAuthenticated() to fail with the code before this change.
martini-contrib/sessionauth#22

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants