Security & Authentication
What to keep in mind when safe-guarding your applications.
Authentication
from sockpuppet.reflex import Reflex
class ExampleReflex(Reflex):
def check_auth(self):
user = self.request.user
if user.is_authenticated:
# Here you could add a variable that shows that the user is
# authenticated, or perform other lookups or whatever need be.
else if user.is_anonymous:
# Based on this case you could take other measures that changes
# the context.Security
Last updated