owin - Registering OAuth authorization service middleware -
how can register oauthauthorizationservermiddleware
, oauthbearerauthenticationmiddleware
in asp.net 5?
i tried following:
app.usemiddleware(typeof(oauthauthorizationservermiddleware), oauthserveroptions); app.usemiddleware(typeof(oauthbearerauthenticationmiddleware), new oauthbearerauthenticationoptions());
but throws next error:
system.exception: todo: unable locate suitable constructor microsoft.owin.security.oauth.oauthbearerauthenticationmiddleware. ensure 'instancetype' concrete , parameters accepted constructor.
i'm trying port token based authentication implemented in (click here) application asp.net 5.
i've nail wall here, not beingness able register oauth server middleware , oauth bearer authentication.
you cannot utilize middlewares katana project usemiddleware method in asp.net vnext project. can seek useowin method provided here: https://github.com/aspnet/httpabstractions/blob/335895d9b49042312eca12a089340adf3ca0a219/src/microsoft.aspnet.owin/owinextensions.cs i'm not sure how it's going work.
the wisest decision here port stuff new world. can find oauth server middleware implementations here: https://github.com/aspnet/security/tree/dev/src/microsoft.aspnet.security.oauth
owin asp.net-core katana
No comments:
Post a Comment