login method

Auth login(
  1. Map<String, dynamic> user, [
  2. bool basic = false
])

Set the current user from a given user object.

The object is expected to contain at least the id key.

The user object will be stored in the _user map with the key being the current guard.

Returns the current instance of the Auth class.

Implementation

Auth login(Map<String, dynamic> user, [bool basic = false]) {
  _user[_userGuard] = user;
  if (basic) {
    _updateSession();
  }
  return this;
}