【发布时间】:2013-10-17 20:39:40
【问题描述】:
我有一个使用 ServiceStack 的用于 Web 服务、Android 应用程序等的 API。我目前使用在客户端看起来像这样的用户名/密码组合进行身份验证:
var authResponse = authService.Authenticate(new Auth {
provider = "credentials",
UserName = user.user_id,
Password = user.password,
RememberMe = true
});
我想做这样的事情:
var authResponse = authService.Authenticate(new Auth {
provider = "credentials",
UserName = user.user_id,
Password = user.password,
ClientCode = user.clientCode <=====
RememberMe = true
});
此时我需要发送客户端代码以及用户名/密码。另一方面,我将使用该客户端代码来确定我应该针对哪个数据库进行身份验证。
由于目前似乎无法扩展 Auth 类,我想知道是否有更简单的起点。
谢谢
【问题讨论】:
标签: asp.net-mvc authentication mono servicestack