How to enter OWIN middleware in a package?

I have the following stack in my ASPNET 5 application startup:

appBuilder.UseIdentityServerBearerTokenAuthentication();
// That calls
app.UseValidationEndpoint();
// That calls
app.UseOAuthBearerAuthentication();
// That calls
app.Use(typeof(OAuthBearerAuthenticationMiddleware), app, options);

The last call adds OAuthBearerAuthenticationMiddlewareto the middleware pipeline, this class overrides the method CreateHandler()that returns a new instance of the class OAuthBearerAuthenticationHandler.

OAuthBearerAuthenticationHandlerclass is a class that deals with the carrier token and what I'm trying to get into. The problem is that I can set a breakpoint in the method Startup.Configure(), and this method only starts once when the application starts.

Even in this circutsnace, I entered to switch to OAuthBearerAuthenticationHandlerusing the Katana source code, which I downloaded from CodePlex and downloaded the corresponding characters, but for some reason the characters will not give me class information OAuthBearerAuthenticationHandler.

, , AuthenticateCoreAsync(), , Startup.Configure() , , -. , , :)

+4

Source: https://habr.com/ru/post/1589447/


All Articles