Skip to content
This repository has been archived by the owner on Nov 20, 2018. It is now read-only.

OWIN: IHttpAuthenticationFeature.Handler is not implemented #87

Closed
borgdylan opened this issue Jun 28, 2014 · 12 comments
Closed

OWIN: IHttpAuthenticationFeature.Handler is not implemented #87

borgdylan opened this issue Jun 28, 2014 · 12 comments
Assignees
Milestone

Comments

@borgdylan
Copy link

This makes requests fail if using the cookie security middle-ware.This is the stack trace I get:

System.AggregateException: One or more errors occurred ---> System.NotImplementedException: The requested feature is not implemented.
  at Microsoft.AspNet.Owin.OwinFeatureCollection.Microsoft.AspNet.HttpFeature.Security.IHttpAuthenticationFeature.get_Handler () [0x00000] in <filename unknown>:0 
  at Microsoft.AspNet.Security.Infrastructure.AuthenticationHandler.RegisterAuthenticationHandler () [0x00000] in <filename unknown>:0 
  at Microsoft.AspNet.Security.Infrastructure.AuthenticationHandler+<BaseInitializeAsync>d__1.MoveNext () [0x00000] in <filename unknown>:0 
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x00000] in <filename unknown>:0 
  at System.Runtime.CompilerServices.TaskAwaiter.GetResult () [0x00000] in <filename unknown>:0 
  at Microsoft.AspNet.Security.Infrastructure.AuthenticationMiddleware`1+<Invoke>d__1[Microsoft.AspNet.Security.Cookies.CookieAuthenticationOptions].MoveNext () [0x00000] in <filename unknown>:0 
  --- End of inner exception stack trace ---
 --> (Inner exception 0) System.NotImplementedException: The requested feature is not implemented.
  at Microsoft.AspNet.Owin.OwinFeatureCollection.Microsoft.AspNet.HttpFeature.Security.IHttpAuthenticationFeature.get_Handler () [0x00000] in <filename unknown>:0 
  at Microsoft.AspNet.Security.Infrastructure.AuthenticationHandler.RegisterAuthenticationHandler () [0x00000] in <filename unknown>:0 
  at Microsoft.AspNet.Security.Infrastructure.AuthenticationHandler+<BaseInitializeAsync>d__1.MoveNext () [0x00000] in <filename unknown>:0 
--- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x00000] in <filename unknown>:0 
  at System.Runtime.CompilerServices.TaskAwaiter.GetResult () [0x00000] in <filename unknown>:0 
  at Microsoft.AspNet.Security.Infrastructure.AuthenticationMiddleware`1+<Invoke>d__1[Microsoft.AspNet.Security.Cookies.CookieAuthenticationOptions].MoveNext () [0x00000] in <filename unknown>:0 
@Tratcher
Copy link
Member

You encountered this running the Ms.A.S.Cookies middleware on an OWIN server, correct?

Note: an intermediate fix would be to remove the exception and have the property act as a normal get/set field. We can worry later about mapping the IAuthenticationHandler implementation to the OWIN security contracts.

@borgdylan
Copy link
Author

Yes I was using Nowin and Ms.A.Owin packages since Kestrel isn't on myget as of yet.

@Tratcher
Copy link
Member

FYI: this has been fixed.

@borgdylan
Copy link
Author

Will a handler implementation be available in the near future?

@Tratcher
Copy link
Member

Tratcher commented Jul 1, 2014

What pipeline setup are you trying to create? I want to make sure we prioritize the right functionality.

@borgdylan
Copy link
Author

I have mv6 + signalr3 + cookie middleware on nowin and wanted to able to do auth (in both mvc and signalr) using cookies. (I am managing identity via ASP.NET identity vCurrent + EF6.1.1)

@borgdylan
Copy link
Author

I am hosting on mono/Linux (ARM hard float) (should not make any difference)

@Tratcher
Copy link
Member

Tratcher commented Jul 1, 2014

@borgdylan I've filed #93 to track that work. It's not immediately scheduled. I think we need to port/implement a few security middleware on the new stack to confirm IAuthenticationHandler works well before we try to map it.

@borgdylan
Copy link
Author

in teh mean time. would it be possible for me to use Ms.A.Owin to put in the cookie middleware from katana as part of the vnext pipeline? (would that allow me to propagate the user identity up and down the pipeline?)

@borgdylan
Copy link
Author

Or would it be possible to wrap the katana IAuthenticationManager as an IHttpAuthenticationFeature handler and use that in the vnext pipeline?

@Tratcher
Copy link
Member

Tratcher commented Jul 1, 2014

Putting the Cookie v2 or v3 middleware into the vNext pipeline will be an interesting exercise. https://jabbr.net/#/rooms/owin would be a better place to discuss that.

@borgdylan
Copy link
Author

I found out that the Nowin wrapper I am using (based on @davidfowl 's Nowin.vNext) creates OwinFeatureCollection instances. If I were to set a wrapped owin auth handler there would it theoretically work?

@Tratcher Tratcher closed this as completed Jul 3, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants