Silverlight 覆盖身份验证请求
我想在我的 silveright 应用程序中提供硬编码的用户名和密码,这样即使我的软件的笨用户做了一些笨事,比如删除所有用户,仍然有一种方法可以登录到该应用程序。所以我正在寻找某种方法来拦截身份验证请求。 AuthenticationBase 中是否有一些方法可以被重写来执行此操作(我看不到任何明显的东西)?或者其他方式?
I want to provide a hard coded user name and password in my silveright app so that even when the halfwit users of my software go and do something halfwitted like deleting all users there is still a way to login to the app. So I am looking for some way to intercept the authentication request. Is there some method in AuthenticationBase that can be overriden to do this (nothing obvious that I could see)? Or some other way?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
覆盖 AuthenticationBase.ValidateUser。
Override AuthenticationBase.ValidateUser.
在 AuthenticationService Login 方法中,首先检查硬编码的密码,如果失败则执行其他方法。
In the AuthenticationService Login method, check for the hard coded pw first, if that fails do the other method.