public static Token GetToken(HttpServer server, HttpRequest request)
        {
            SecurityController <SecSettings> ctrl = new SecurityController <SecSettings>();

            ctrl.Init(server, request);

            return(ctrl.GetToken());
        }
        public virtual Token GetToken()
        {
            SecurityUser user  = Request.GetDataObject <SecurityUser>();
            Token        token = SecurityController <SecSettings> .GetToken(Request, user);

            if (!Settings.SendUserData)
            {
                return new Token()
                       {
                           AccessToken  = token.AccessToken,
                           RefreshToken = token.RefreshToken,
                           Duration     = token.Duration
                       }
            }
            ;
            else
            {
                return(token);
            }
        }