ASP.NET 5でOAuthAuthorizationServerMiddleware
andを登録するにはどうすればよいですか?OAuthBearerAuthenticationMiddleware
私は次のことを試しました:
app.UseMiddleware(typeof(OAuthAuthorizationServerMiddleware), OAuthServerOptions);
app.UseMiddleware(typeof(OAuthBearerAuthenticationMiddleware), new OAuthBearerAuthenticationOptions());
しかし、これは次のエラーをスローします:
System.Exception: TODO: unable to locate suitable constructor for Microsoft.Owin.Security.OAuth.OAuthBearerAuthenticationMiddleware. Ensure 'instanceType' is concrete and all parameters are accepted by a constructor.
この (ここをクリック) アプリケーションに実装されているトークンベースの認証を ASP.NET 5 に移植しようとしています。
ここで壁にぶつかり、OAuth サーバーミドルウェアと OAuth Bearer 認証を登録できませんでした。