我是使用总部基地的新手。这里给出的大多数示例都与分层模板无关。只是使用非分层的标准模板。但我需要分层结构。谁能给我一个解决方案,如何在url,https://docs.abp.io/en/abp/latest/How-To/Customize-SignIn-Manager上实现名为“如何自定义总部基地应用程序的SignIn管理器”的解决方案,请使用覆盖"SignInAsync“方法的分层架构?我应该在哪个项目中找到名为"CustomSignInManager“的类,以及我应该在哪里(在哪个项目中)注册依赖注入;
PreConfigure<IdentityBuilder>(identityBuilder =>
{
identityBuilder.AddSignInManager<CustomSignInManager>();
});我无法让我的CustomSignInManager工作。内置的signInManager总是覆盖我的自定义类。
提前谢谢。
发布于 2020-09-19 07:22:06
在分层应用程序中,您将被重定向到IdentityServer项目进行登录,因此您需要在此处配置CustomSignInManager。
编辑:在你的MyProjectIdentityServerModule,覆盖PreConfigureServices中,如下所示;
public override void PreConfigureServices(ServiceConfigurationContext context)
{
PreConfigure<IdentityBuilder>(identityBuilder =>
{
identityBuilder.AddSignInManager<MyCustomSignInManager>();
});
}你可以关注this article。
https://stackoverflow.com/questions/63010991
复制相似问题