katana

Automatic code( authorization code ) redemption using latest version of Katana DLLs in openId authorization code flow

百般思念 提交于 2020-02-07 01:58:10
问题 From the recent release and conversation below, it says that now Katana(4.1.0) supports code-flow with automatic code redemption(that meaning we do not have call tokenendpoint explicitly to redeem the code for idtoken, accesstoken etc) https://github.com/aspnet/AspNetKatana/pull/297 so, I've upgraded Katana dlls and have p Notifications = new OpenIdConnectAuthenticationNotifications() { RedirectToIdentityProvider = OnRedirectToIdentityProvider, //MessageReceived = OnMessageReceived, --

MVC5 OWIN ws-federation AuthenticationManager.GetExternalLoginInfoAsync() returns null

房东的猫 提交于 2020-01-24 04:37:46
问题 I'm trying to setup integrated OWIN WS-Federation (ADFS) authentication in a new MVC 5 project in Visual Studio 2013. WsFederation in Startup.Auth is configured as follows: app.UseWsFederationAuthentication(wtrealm: "MyRealm", metadataAddress: "https://myADFSInstanceHost/FederationMetadata/2007-06/FederationMetadata.xml"); Federation button at login page works fine. ADFS login page is achievable, i can log in there. Required cookies seems to being set properly. At least there is passed

MVC5 OWIN ws-federation AuthenticationManager.GetExternalLoginInfoAsync() returns null

社会主义新天地 提交于 2020-01-24 04:37:11
问题 I'm trying to setup integrated OWIN WS-Federation (ADFS) authentication in a new MVC 5 project in Visual Studio 2013. WsFederation in Startup.Auth is configured as follows: app.UseWsFederationAuthentication(wtrealm: "MyRealm", metadataAddress: "https://myADFSInstanceHost/FederationMetadata/2007-06/FederationMetadata.xml"); Federation button at login page works fine. ADFS login page is achievable, i can log in there. Required cookies seems to being set properly. At least there is passed

How to set default static web page for Katana/Owin self hosted app?

*爱你&永不变心* 提交于 2020-01-10 08:48:13
问题 I've set up a web site using an Owin self hosted console app. I'm serving static files with no problem, the 'root' of the static part of the site works properly, and the web API routes work fine also. If I browse to: http://localhost/index.html it presents everything like I expect. But I have not figured out how to set it so that browsing to: http://localhost presents index.html (as the default view). This Just Works under an IIS-style site. How do I make it work with Owin self host? 回答1: I

Is Owin/Katana supposed to replace Web API? [closed]

℡╲_俬逩灬. 提交于 2020-01-03 16:48:46
问题 Closed . This question is opinion-based. It is not currently accepting answers. Want to improve this question? Update the question so it can be answered with facts and citations by editing this post. Closed 3 years ago . When ASP.NET MVC came, Microsoft announced many times in many places that it wasn't supposed to replace ASP.NET Web Forms. In other words, it's just another technology that you might find useful, or you might use Web Forms in other scenarios. However, as companies enter into

Why the required Startup class does't need to implement an appropriate interface, like IStartup?

拥有回忆 提交于 2020-01-03 13:01:45
问题 Using katana, why does the Startup class should not implement a respective interface, like for example: interface IStartup { void Configuration(IAppBuilder app); } public class MyStartup : IStartup { public void Configuration(IAppBuilder app) { ... } } I think that it could be much more intuitive for the developers to understand what they should provide with to the WebApp.Start<T> method as the T argument instead of guessing and looking for examples, it should be more explicit: public void

How do I ask Owin/Katana to write headers to the output stream?

流过昼夜 提交于 2020-01-02 04:27:07
问题 When I write to the response, Katana skips sending out the Elapsed-Time response header. How can I have it set the headers for me before I write to the stream for the first time? Middleware #1 public override async Task Invoke(IOwinContext context) { var stopwatch = new Stopwatch(); stopwatch.Start(); await Next.Invoke(context); stopwatch.Stop(); context.Response.Headers.Add("Elapsed-Time", new[] {stopwatch.ElapsedMilliseconds.ToString()}); } Middleware #2 public override async Task Invoke

Web Api 2 HttpContext or HttpActionContext

牧云@^-^@ 提交于 2020-01-02 02:32:06
问题 What is the difference between the following two ways of accessing the principle via an AuthorizeAttribute implementation? Using HttpContext : protected override bool IsAuthorized(HttpActionContext actionContext) { return HttpContext.Current.User.IsInRole("DemoRole"); } Using HttpActionContext : protected override bool IsAuthorized(HttpActionContext actionContext) { return actionContext.RequestContext.Principal.IsInRole("DemoRole"); } 来源: https://stackoverflow.com/questions/28235979/web-api-2

Are Microsoft.Owin types like OwinMiddleware and IOwinContext incompatible with other Owin servers?

假如想象 提交于 2020-01-01 04:11:07
问题 If I build an OWIN middleware using Microsoft.Owin types like OwinMiddleware and IOwinContext, would my middleware work with non-Microsoft Owin hosts/servers? I'm looking at the middleware classes for Nancy and SignalR and they seem very different from the OwinMiddleware base class that middlewares like the Cookie authentication middleware and WebApi is based on. I'm reading the spec but I'm still not clear if a non-Microsoft Owin server could work with the OwinMiddleware and IOwinContext

Authentication / Authorization MVC 5 and Web API - Katana/Owin

纵然是瞬间 提交于 2019-12-31 10:46:58
问题 I'm having problems trying to decide on a route to take on a project I have. I've been reading up on OWIN specs and Katana implementation within .NET. The reason why I'd like to go with the Katana route is because of the owin components associated with ADFS and Token/Cookie generation. I have two projects, one for MVC 5 website, and one for Web API. They may rest of two separate servers in the future, but for now they are on the same. I know I will be using IIS, so the Owin pipeline isn't