Cookies Can';t使用CookieJWT对资源服务器进行身份验证

Cookies Can';t使用CookieJWT对资源服务器进行身份验证,cookies,asp.net-web-api,jwt,Cookies,Asp.net Web Api,Jwt,在我的服务器上,我已使用成功添加了一个仅限HTTP的cookie app.UseCookieAUthentication(...) app.UseOAuthAuthorizationServer(...) 用户通过/oauth2/token对服务器进行身份验证,该服务器将在响应头中返回一个集Cookie,用户通过此调用执行此操作 context.Request.Context.Authentication.SignIn(props, identity); 但是,在资源(客户机)上,客户机正在

在我的服务器上,我已使用成功添加了一个仅限HTTP的cookie

app.UseCookieAUthentication(...)
app.UseOAuthAuthorizationServer(...)
用户通过/oauth2/token对服务器进行身份验证,该服务器将在响应头中返回一个集Cookie,用户通过此调用执行此操作

context.Request.Context.Authentication.SignIn(props, identity);
但是,在资源(客户机)上,客户机正在接收标头,但未经授权

 app.UseJwtBearerAuthentication(
                new JwtBearerAuthenticationOptions
                {
                    AllowedAudiences = new[] { audience },
                    IssuerSecurityTokenProviders = new IIssuerSecurityTokenProvider[]
                    {
                        new SymmetricKeyIssuerSecurityTokenProvider(issuer, secret)
                    },
                    Provider = new CookieOAuthBearerProvider("authCookie")
                });

        }



public class MyAuthorize : AuthorizeAttribute
{
    protected override bool IsAuthorized(HttpActionContext actionContext)
    {
        bool authenticated = actionContext.ControllerContext.RequestContext.Principal.Identity.IsAuthenticated;//always false!! and there are no claims...


        return base.IsAuthorized(actionContext);
    }
}
authenticated
变量始终为false,并且没有声明我做错了什么

谢谢