inversion of control - OWIN, IoC, Bootstraping Providers and Preserving Lifestyles -


Through OWIN I am unable to wrap my head around the provider (Oath and Refresh Token) defined in the IOC container (Windsor).

Bootstraping (startup class) and provider life style (PerWebRequest) are respected. I have a problem with the provider only, who have a scored lifestyle, are working perfectly.

I know that it can never work .... but on the following:

  Public Zero ConfigurationAuth (IAppBuilder App, Windsor CONTAnainer Container) { OAuthAuthorizationServerOptions OAuthServerOptions = New OAuthAuthorizationServerOptions () {AllowInsecureHttp = true, TokenEndpointPath = New PathString ("/ Token"), AccessTokenExpireTimeSpan = TimeSpan.FromMinutes (30), Provider = Container. Resolve & lt; IOAuthAuthorizationServerProvider & gt; (), RefreshTokenProvider = container.Resolve & lt; IAuthenticationTokenProvider & gt; ()}; // token generation app. USOuth Authority Server (Oath Server Options); App.UseOAuthBearerAuthentication (new OAuthBearerAuthenticationOptions ()); }   

Provider and Refresh Talking Provider will be set only once during the startup. I need them PerWebRequest because the built-in implementation uses a UserManager, UserStore and DBContext which is going out of the time with DB changes as it is never settling because

is not sure whether the answer OwinMiddleware or CreatePerOwinContext () is in ... Any help I've been trying to work correctly with the IoC provider has gone into circles would be greatly appreciated.

It is quite certain to me:



Comments

Popular posts from this blog

java - ImportError: No module named py4j.java_gateway -

python - Receiving "KeyError" after decoding json result from url -

.net - Creating a new Queue Manager and Queue in Websphere MQ (using C#) -