Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class UserAuthenticationEvent(pymongo_basemodel.core.Model):
- pymongo_collection = api.app.db.authentication_events
- def __init__(self, type_, ip_address, user = None, identifier = None, success = True):
- self.pymongo_collection.insert_one({
- "type": type_,
- "ip_address": ip_address,
- "user": user,
- "identifier": identifier,
- "success": success,
- "created": datetime.datetime.today()
- })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement