This repository has been archived by the owner on Nov 17, 2023. It is now read-only.
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.
[Question] How WebMVC calls Identity.API ? #1043
Closed
Description
Hey!
First of all GREAT JOB. You can learn a lot from this fabulous project.
Back to question. I am playing around with the solution and there is something which I cannot understand.
How WebMVC project calls methods from Identity.API.Controllers.AccountController.cs (I guess that there is some configuration somewhere.)?
Here is an example:
How from here (_LoginPartial.cshtml):
<section class="col-lg-4 col-md-5 col-xs-12">
<div class="esh-identity">
<section class="esh-identity-section">
<div class="esh-identity-item">
<a asp-area="" asp-controller="Account" asp-action="SignIn" class="esh-identity-name esh-identity-name--upper">
Login
</a>
</div>
</section>
</div>
</section>
We automaticaly have been redirected to (Identity.API.Controllers.AccountController):
[HttpGet]
public async Task<IActionResult> Login(string returnUrl)
{
var context = await _interaction.GetAuthorizationContextAsync(returnUrl);
if (context?.IdP != null)
{
throw new NotImplementedException("External login is not implemented!");
}
var vm = await BuildLoginViewModelAsync(returnUrl, context);
ViewData["ReturnUrl"] = returnUrl;
return View(vm);
}
For the rest of the services its clear (we do a simple HTTP call and Ocelot redirect us to corresponding API point).
Cheers!
Metadata
Assignees
Labels
No labels