我正在使用来自此 OWIN 项目http://www.asp.net/aspnet/overview/owin-and-katana/owin-oauth-20-authorization-server的示例代码 ,我没有部署解决方案。当我尝试从服务器获取授权令牌,我被重定向到登录页面,然后到授权页面,但是当我单击授予页面时,该页面并没有重定向我..检查代码是我应该创建重定向我自己使用访问令牌登录,或者我在这里缺少一些配置。
如果有熟悉这个项目的朋友可以告诉我。
if (!string.IsNullOrEmpty(Request.Form.Get("submit.Grant")))
{
identity = new ClaimsIdentity(identity.Claims, "Bearer", identity.NameClaimType, identity.RoleClaimType);
foreach (var scope in scopes)
{
identity.AddClaim(new Claim("urn:oauth:scope", scope));
}
authentication.SignIn(identity);