resume method

Future<bool> resume(
  1. Request req
)

Invoked when a session is resumed.

This method is invoked when the session is restored to a HTTP request.

If it returns true, the session is associated with the HTTP request. Otherwise, the session is treated as no longer being valid and is terminated.

The base implementation does nothing and always returns true.

Note: this method is only automatically invoked when the session is automatically restored to a HTTP request. If the handler associates a session to the Request, this method is not automatically invoked. For example, when a new session is created and associated with the Request because a user has logged in. In that situation, if this method needs to be invoked, the handler should explicitly invoke it.

This instance method is intended to be overridden by subclasses of the Session class.

Implementation

Future<bool> resume(Request req) async => true;