Skip to content

Add formTenantResolveContributor#5214

Merged
hikalkan merged 5 commits intorel-3.1from
liangshiwei/tenantlogin
Sep 16, 2020
Merged

Add formTenantResolveContributor#5214
hikalkan merged 5 commits intorel-3.1from
liangshiwei/tenantlogin

Conversation

@realLiangshiwei
Copy link
Copy Markdown
Contributor

Resolve #5213

return null;
}

return httpContext.Request.Form[context.GetAbpAspNetCoreMultiTenancyOptions().TenantKey];
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use the async method to get value from the form will be better.
Maybe we should make ITenantResolver support async.

var form = await HttpRequest.ReadAsFormAsync();
return form["context.GetAbpAspNetCoreMultiTenancyOptions().TenantKey"];

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree. May resolve tenants from JSON, asynchronous is better. But this is a breaking change. @hikalkan What do you think?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't want to introduce such a breaking change now.

@maliming maliming requested a review from hikalkan August 31, 2020 06:18
@hikalkan hikalkan merged commit e2a8f64 into rel-3.1 Sep 16, 2020
@hikalkan hikalkan deleted the liangshiwei/tenantlogin branch September 16, 2020 06:50
@hikalkan
Copy link
Copy Markdown
Member

Thanks for the development and explanations ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants