ServiceStack.ServiceStackHost.OnSessionFilter C# (CSharp) Метод

OnSessionFilter() публичный Метод

Inspect or modify ever new UserSession created or resolved from cache. return null if Session is invalid to create new Session.
public OnSessionFilter ( IAuthSession session, string withSessionId ) : IAuthSession
session IAuthSession
withSessionId string
Результат IAuthSession
        public virtual IAuthSession OnSessionFilter(IAuthSession session, string withSessionId)
        {
            if (session == null || !SessionFeature.VerifyCachedSessionId)
                return session;

            if (session.Id == withSessionId)
                return session;

            if (Log.IsDebugEnabled)
            {
                Log.Debug($"ignoring cached sessionId '{session.Id}' which is different to request '{withSessionId}'");
            }
            return null;
        }