-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FOS throws NotSupportedException when using Microsoft.Owin.Security middlewares #9
Comments
Committed possible change in d7e9575 |
Verified that I can now use MS Auth middlewares and all unit tests pass. |
This is really great! If you're willing to submit a Pull Request, I'll accept it right away! |
Have you had a chance to look at dbd5a64 that fixes #8? I know it is a bit heavier change because it takes a new dependency on Microsoft.Owin and ups the framework version. However, I needed webapi before I needed the auth, so I committed it first. Just need to know whether you want a pull request for both or if I need to branch. Thanks. |
I don't mind taking a dependency on Microsoft.Owin, but it upping the framework version really necessary? |
Unfortunately the last version of Microsoft.Owin that supported .Net 4 was 2.1.0 which is more than 4 years old and two major versions ago. Everything since then has required .Net 4.5. So, don't need to go all the way to 4.62, but probably should at least consider 4.5. I have not tested my changes with Microsoft.Owin 2.1.0. |
Sorry for taking so long to respond, I thought I already had replied to this. |
Wired up a test application with UseActiveDirectoryFederationServicesBearerAuthentication, and get the following exception:
System.NotSupportedException: The OWIN key 'server.OnSendingHeaders' is not available for this request.
at Microsoft.Owin.OwinResponse.OnSendingHeaders(Action
1 callback, Object state) at Microsoft.Owin.Security.Infrastructure.AuthenticationHandler.<BaseInitializeAsync>d__0.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.Owin.Security.Infrastructure.AuthenticationMiddleware
1.d__0.MoveNext()--- End of inner exception stack trace ---
---> (Inner Exception #0) System.NotSupportedException: The OWIN key 'server.OnSendingHeaders' is not available for this request.
at Microsoft.Owin.OwinResponse.OnSendingHeaders(Action
1 callback, Object state) at Microsoft.Owin.Security.Infrastructure.AuthenticationHandler.<BaseInitializeAsync>d__0.MoveNext() --- End of stack trace from previous location where exception was thrown ---<br /> at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at Microsoft.Owin.Security.Infrastructure.AuthenticationMiddleware
1.d__0.MoveNext()The FosRequest class would need to be able to handle the common key server.OnSendingHeaders (defined here: http://owin.org/spec/spec/CommonKeys.html#_6._Common_keys) in order to use these middlewares.
The text was updated successfully, but these errors were encountered: