【问题标题】:Identity Server v3 Custom Page Reset PasswordIdentity Server v3 自定义页面重置密码
【发布时间】:2015-09-11 19:34:29
【问题描述】:

我想在登录页面上创建一个将重定向到http://server/resetpassword/ 的 URL,并且会有我的 cusotm 页面,从示例中创建 CustomViewServices,但没有示例如何添加您自己的页面

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

有什么想法吗?

【问题讨论】:

    标签: c# .net asp.net-mvc identityserver3


    【解决方案1】:

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

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

    在日志页面,有如下代码,

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

    More info here

    因此,在您的 AuthenticationOptions 中使用此自定义,这将添加一个指向您的自定义页面的链接。

    然后你需要在你的模板文件夹中添加一个resetpassword.html页面。

    【讨论】:

    • 有人有这方面的例子吗?它将通过什么模型来重置密码?
    • resetpassword.html 页面应该在哪里创建?模板文件夹,你能解释一下吗?
    猜你喜欢
    • 1970-01-01
    • 2016-07-17
    • 2016-10-22
    • 1970-01-01
    • 2022-07-06
    • 1970-01-01
    • 1970-01-01
    • 2013-10-31
    相关资源
    最近更新 更多