public void SetToken(ISessionManager sessionManager, string token) { if (token == null) { // Session expired throw new SessionExpiredException(); } this._token = token; Contributor contributor = sessionManager.Retrieve<Contributor>(token, "CurrentContributor"); if (contributor == null) { // Session expired throw new SessionExpiredException(); } _companyId = contributor.Department.Company.Id; _contributorId = contributor.Id; }