protected override WSFederationMessage BuildSignInMessage(AuthorizationContext context, Uri replyUrl)
        {
            var fam    = FederatedAuthentication.WSFederationAuthenticationModule;
            var signIn = new SignInRequestMessage(new Uri(fam.Issuer), fam.Realm)
            {
                Context   = AuthenticateAndAuthorizeRoleAttribute.GetReturnUrl(context.RequestContext, RequestAppendAttribute.RawUrl, null).ToString(),
                HomeRealm = Tailspin.Federation.HomeRealm,
                Reply     = replyUrl.ToString()
            };

            return(signIn);
        }
Exemplo n.º 2
0
        protected override WSFederationMessage BuildSignInMessage(AuthorizationContext context, Uri replyUrl)
        {
            var tenant = (context.Controller as TenantController).Tenant;

            var fam    = FederatedAuthentication.WSFederationAuthenticationModule;
            var signIn = new SignInRequestMessage(new Uri(fam.Issuer), fam.Realm)
            {
                Context   = AuthenticateAndAuthorizeRoleAttribute.GetReturnUrl(context.RequestContext, RequestAppendAttribute.RawUrl, null).ToString(),
                HomeRealm = SubscriptionKind.Premium.Equals(tenant.SubscriptionKind)
                    ? tenant.IssuerIdentifier ?? Tailspin.Federation.HomeRealm + "/" + (context.Controller as TenantController).Tenant.Name
                    : Tailspin.Federation.HomeRealm + "/" + (context.Controller as TenantController).Tenant.Name,
                Reply = replyUrl.ToString()
            };

            return(signIn);
        }