internal void Authenticate(ISession session, IServiceFactory serviceFactory) { if (serviceFactory == null) throw new ArgumentNullException("serviceFactory"); IsAuthenticated = false; var clientAuthentication = serviceFactory.CreateClientAuthentication(); clientAuthentication.Authenticate(this, session); IsAuthenticated = true; }