Esempio n. 1
0
		private void Receive(AssignCertificateRequest request)
		{
			SignUp.AssignCertificate(request.SubscriptionId, request.IdentityId);
		}
Esempio n. 2
0
        public ActionResult OwnSubscription(AzureSubscriptionModel model)
        {
            //TODO: check the azuer subscription id if has been already added to db

            Subscription subscription = new Core.Repository.Subscription
                {
                    AzureSubscriptionId = model.AzureSubscriptionId,
                    BlobStorageKey = "", // will be deleted in next iteration
                    BlobStorageName= "", // will be deleted in next iteration
                    Certificate = new byte[0],
                    CertificateKey = "pending",
                    Name = model.SubscriptionName
                };

            CreateSubscriptionIdentityMap(subscription, UnitOfWork.CurrentIdentity.IdentityId);

            //TODO: figure out what to do with this
            //CustomClaimsAuthenticationManager.PersistUserSubscription(subscription.SubscriptionId);

            //now send message to back-end to create a certificate and send it by email,
            //and assign it to the subscription
            AssignCertificateRequest assignCertificate = new AssignCertificateRequest
            {
                IdentityId = UnitOfWork.CurrentIdentity.IdentityId,
                SubscriptionId = subscription.SubscriptionId
            };

            Messaging.Send(assignCertificate);

            return View("Done", SignUpTypeEnum.OwnSubscription);
        }