/*--------------------------------------------------------------------------------------------*/
        /// <summary />
        public static IFabricSessionContainer FromCookies(
            IFabricClient pClient, HttpCookieCollection pCookies)
        {
            var ps = new PersonSession(pClient.Config, pClient.Services.Oauth);

            if (!ps.LoadFromCookies(pCookies))
            {
                return(null);
            }

            return(new FabricSessionContainer {
                Person = ps
            });
        }
        ////////////////////////////////////////////////////////////////////////////////////////////////
        /*--------------------------------------------------------------------------------------------*/
        /// <summary />
        public static IFabricSessionContainer FromValues(IFabricClient pClient, string pSessionId,
                                                         string pGrantCode, string pBearerToken, string pRefreshToken, DateTime pExpriration)
        {
            var ps = new PersonSession(pClient.Config, pClient.Services.Oauth);

            ps.SessionId    = pSessionId;
            ps.GrantCode    = pGrantCode;
            ps.BearerToken  = pBearerToken;
            ps.RefreshToken = pRefreshToken;
            ps.Expiration   = pExpriration;

            return(new FabricSessionContainer {
                Person = ps
            });
        }