身份服务器v3的自定义页面重置密码 [英] Identity Server v3 Custom Page Reset Password

查看:140
本文介绍了身份服务器v3的自定义页面重置密码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想要登录页面上,将重定向到 HTTP的URL://服务器/ resetpassword / 有将是我cusotm页,从制作样品CustomViewServices,但没有例子,如何添加自己的页面

I want to make on login page a URL that will redirect to http://server/resetpassword/ and there will be my cusotm page, made CustomViewServices from samples, but there is not example how to add your own page

https://github.com/IdentityServer/IdentityServer3.Samples/tree/master/source/CustomViewService

任何想法?

推荐答案

这是没有必要创建一个CustomViewService,可以应对这种情况下,添加以下代码在你AuthenticationOptions(在你的启动类)

It's not necessary to create a CustomViewService, you can deal with this scenario adding the following code in your AuthenticationOptions (in your startup class)

LoginPageLinks = new List<LoginPageLink>()
                {
                   new LoginPageLink()
                   {
                       Href = "resetpassword",
                       Text = "Reset Your Password",
                       Type = "resetPassword"
                   }
                }

在登录页面中,有下面的代码,

in the logging page, there is the following code,

 <ul class="list-unstyled">
            <li ng-repeat="link in model.additionalLinks"><a ng-href="{{link.href}}">{{link.text}}</a></li>
        </ul>

更多信息这里

因此,在您AuthenticationOptions使用此定制,这将链接添加到您的自定义页面。

So using this customisation in your AuthenticationOptions, this will add a link to your custom page.

然后,你需要在你的模板文件夹添加resetpassword.html页。

Then you need to add a resetpassword.html page in your the template folder.

这篇关于身份服务器v3的自定义页面重置密码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆