Exemplo n.º 1
0
        protected void InitAuthentication(HttpCookie authCookie)
        {
            FormsAuthenticationTicket ticket = FormsAuthentication.Decrypt(authCookie.Value);
            string fsAuthorization           = AuthenticationWebService.ExtractAuthorizationString(ticket.UserData);

            if (string.IsNullOrEmpty(fsAuthorization))
            {
                return;
            }

            fsWebService.Authorization = fsAuthorization;
            publishWebService          = GeneratePublishService();
        }
Exemplo n.º 2
0
        public WebServiceCollection(WebServiceContext ctx)
        {
            if (ctx == null)
            {
                throw new ArgumentNullException(nameof(ctx));
            }

            _ctx = ctx;

            _services = new List <BaseWebService>();
            _hosts    = new List <ServiceHost>();

            _applicationService    = new ApplicationWebService(_ctx);
            _authenticationService = new AuthenticationWebService(_ctx);
            _relationshipService   = new RelationshipWebService(_ctx);
            _userService           = new UserWebService(_ctx);
            _shopService           = new ShopWebService(_ctx);

            _services.Add(_applicationService);
            _services.Add(_authenticationService);
            _services.Add(_relationshipService);
            _services.Add(_userService);
            _services.Add(_shopService);
        }