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 = Kirnau.Federation.HomeRealm,
                Reply     = replyUrl.ToString()
            };

            return(signIn);
        }
        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 ?? Kirnau.Federation.HomeRealm + "/" + (context.Controller as TenantController).Tenant.Name
                    : Kirnau.Federation.HomeRealm + "/" + (context.Controller as TenantController).Tenant.Name,
                Reply = replyUrl.ToString()
            };

            return(signIn);
        }