假开放ID提供用于测试目的 [英] Fake Open ID provider for testing purposes

查看:92
本文介绍了假开放ID提供用于测试目的的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

像这样,我要去取决于许多开放ID供应商提供用户身份验证,我会用我自己的授权方法。但我仍处于发展阶段,并且不希望现在,我可以用什么方法来测试我的用户及其活动的网站(W / O TDD),模拟实际用户的但不是真正的OpenID提供商合作真正使用Open ID提供商。

Like SO, I am gonna depend on many Open ID providers to provide user authentication and I will use my own authorization methods. but I'm still in development phase, and don't want to work with real OpenID providers currently, what approach can I use to test my users and their activities in the website (w/o TDD), to emulate real users but not really use Open ID providers.

没有必要让自动转移的用户转化为现实的OpenID服务器(移动到生产模式时),因为目前用户只是用于测试目的,单元测试code。

No need to make auto-transfer of users into real OpenID servers (when moving to production mode) since the current users are just for testing purposes and Unit-test code.

我想,我需要一个用户服务层,它提供了一个抽象的higly方式来处理用户,因此,此举的真正开放ID提供商能够在未来平滑,不影响我已经写逻辑code。

I guess, I need a User Service layer which provides a higly abstracted way to deal with users, so that the move to the real Open ID providers can be smooth in the future and doesn't affect the logic of my already written code.

使用C#.NET 4,ASP.Net MVC 3,Ninject

Using C#.Net 4, ASP.Net MVC 3, Ninject

推荐答案

DotNetOpenAuth 提供服务器和客户端部分OpenID和可用于运行本地测试自己的OpenID提供商。

DotNetOpenAuth provides both server and client portions of OpenID and can be used to run your own OpenID provider for local testing.


      
  • 给你的网站成员自己的OpenID的提供者支持包括在这个库中。

  • Give your site members their own OpenIDs with the provider support included in this library.

样品依赖方和提供者的网站告诉你是如何做到这一点。

Sample relying party and provider web sites show you just how to do it.

这篇关于假开放ID提供用于测试目的的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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