Method: flask.sessions.SessionInterface.get_expiration_time
Calls: 43, Exceptions: 0, Paths: 2Back
Path 1: 32 calls (0.74)
Flask (30) test_session_dynamic_cookie_name.
SecureCookieSession (32)
None (32)
1def get_expiration_time(self, app: Flask, session: SessionMixin) -> datetime | None:
2 """A helper method that returns an expiration date for the session
3 or ``None`` if the session is linked to the browser session. The
4 default implementation returns now + the permanent session
5 lifetime configured on the application.
6 """
7 if session.permanent:
8 return datetime.now(timezone.utc) + app.permanent_session_lifetime
9 return None
Path 2: 11 calls (0.26)
Flask (11)
SecureCookieSession (11)
datetime (11)
1def get_expiration_time(self, app: Flask, session: SessionMixin) -> datetime | None:
2 """A helper method that returns an expiration date for the session
3 or ``None`` if the session is linked to the browser session. The
4 default implementation returns now + the permanent session
5 lifetime configured on the application.
6 """
7 if session.permanent:
8 return datetime.now(timezone.utc) + app.permanent_session_lifetime
9 return None