'A helper method that returns an expiration date for the session
or ``None`` if the session is linked to the browser session.  The
default implementation returns now + the permanent session
lifetime configured on the application.'

def get_expiration_time(self, app, session):

    if session.permanent:
        return (datetime.utcnow() + app.permanent_session_lifetime)
