Esempio n. 1
0
        public Blogger.BlogInfo[] blogger_getUsersBlogs(string appKey, string username, string password)
        {
            if (!dasBlogSettings.SiteConfiguration.EnableBloggerApi)
            {
                throw new ServiceDisabledException();
            }

            if (!VerifyLogin(username, password))
            {
                throw new SecurityException();
            }

            Blogger.BlogInfo[] blogs = new Blogger.BlogInfo[1];
            Blogger.BlogInfo   blog  = new Blogger.BlogInfo();
            blog.blogid   = "0";
            blog.blogName = NoNull(dasBlogSettings.SiteConfiguration.Title);
            blog.url      = NoNull(dasBlogSettings.SiteConfiguration.Root);
            blogs[0]      = blog;
            return(blogs);
        }
Esempio n. 2
0
        public Blogger.BlogInfo[] blogger_getUsersBlogs(string appKey, string username, string password)
        {
            if (!_dasBlogSettings.SiteConfiguration.EnableBloggerApi)
            {
                throw new ServiceDisabledException();
            }
            UserToken token = _siteSecurity.Login(username, password);

            if (token == null)
            {
                throw new System.Security.SecurityException();
            }

            Blogger.BlogInfo[] blogs = new Blogger.BlogInfo[1];
            Blogger.BlogInfo   blog  = new Blogger.BlogInfo();
            blog.blogid   = "0";
            blog.blogName = NoNull(_dasBlogSettings.SiteConfiguration.Title);
            blog.url      = NoNull(_dasBlogSettings.SiteConfiguration.Root);
            blogs[0]      = blog;
            return(blogs);
        }