public HttpResponseMessage Post([FromBody] string nameID)
        {
            if (String.IsNullOrEmpty(nameID))
            {
                ModelState.AddModelError("nameID", "Invalid nameID");
                return Request.CreateErrorResponse(HttpStatusCode.BadRequest, ModelState);
            }

            var item = new AuthorizationServer.Models.AuthorizationServerAdministrator { NameID = nameID };
            this.config.GlobalConfiguration.Administrators.Add(item);
            this.config.SaveChanges();

            return Request.CreateResponse(HttpStatusCode.OK, item);
        }
        public HttpResponseMessage Post([FromBody] string nameID)
        {
            if (String.IsNullOrEmpty(nameID))
            {
                ModelState.AddModelError("nameID", "Invalid nameID");
                return(Request.CreateResponse(HttpStatusCode.BadRequest, ModelState.GetErrors()));
            }

            if (this.config.GlobalConfiguration.Administrators.Any(x => x.NameID == nameID))
            {
                ModelState.AddModelError("", "That user is already an administrator.");
                return(Request.CreateResponse(HttpStatusCode.BadRequest, ModelState.GetErrors()));
            }

            var item = new AuthorizationServer.Models.AuthorizationServerAdministrator {
                NameID = nameID
            };

            this.config.GlobalConfiguration.Administrators.Add(item);
            this.config.SaveChanges();

            return(Request.CreateResponse(HttpStatusCode.OK, item));
        }