Skip to content

Conversation

ananis25
Copy link
Contributor

This change allows users to:

Changes

  • replace the redirect-cookie name string with the class attribute for it.
  • move out creation of the asig_redirect cookie so subclasses can implement it differently

@@ -276,7 +276,7 @@ def auth_from_scope(self, scope):
json.dumps(dict(auth, ts=int(time.time())), separators=(",", ":"))
)

redirect_to = cookies_from_scope(scope).get("asgi_auth_redirect") or "/"
redirect_to = cookies_from_scope(scope).get(self.redirect_cookie_name) or "/"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch

@simonw simonw merged commit f6a506c into simonw:master Oct 14, 2019
@simonw
Copy link
Owner

simonw commented Oct 14, 2019

@ananis25 ananis25 deleted the edit_redirection branch October 15, 2019 18:58
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