如何减少密码重置链接MVC5的长度 [英] How to reduce length of password reset link MVC5

查看:98
本文介绍了如何减少密码重置链接MVC5的长度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用此方法生成密码重置链接。一切都很好,但回调URL有一个巨大的令牌。我被问到是否有办法减少URL的长度。

由于这是一个框架生成的代码,我做不了多少。

默认情况下你可以在任何MVC 5模板中找到这个实现。



等待UserManager.GeneratePasswordResetTokenAsync()





如果有任何方法可以使用相同的方法实现此目的,请分享您的意见。





提前感谢您的时间和精力。

I am using this method to generate a password reset link. Everything works great but the callback URL has a huge token. I was asked if there was a way to reduce the length of URL.
As this is a framework generated code, i could not do much.
You can find this implementation in any MVC 5 template by default.

await UserManager.GeneratePasswordResetTokenAsync()


Please share your opinions if there is any way to achieve this using still the same method.


Thanks in advance for your time and effort.

推荐答案

我想知道是否像TinyURL http://tinyurl.com/ [ ^ ]会有所帮助,但是,他们没有API



我想知道是否有任何'具有API'的服务 - 或者可以使用'以编程方式' - 也许屏幕抓到他们的网站,但你必须先检查条款和条件等



[更新]这里有关于SO的讨论*可能*提供更多选项[/ update] http://stackoverflow.com/questions/3671043/methods-of-reducing-url-size [ ^ ]
I was wondering if something like TinyURL http://tinyurl.com/[^] would help, but, they don't have an API

I wonder if there's any service 'like that' that has a API - or can be used 'programmatically' - maybe screen-scraping to their site, but you would have to heck the terms and conditions etc first

[update] there a discussion here on SO that *might* give some more options [/update] http://stackoverflow.com/questions/3671043/methods-of-reducing-url-size[^]


这篇关于如何减少密码重置链接MVC5的长度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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