Questions tagged [owin-middleware]

OWIN Middleware in the IIS integrated pipeline

266 questions
5
votes
1 answer

How do I integration test a ASP 5/Core Web API with [Authorize] Attributes

I currently have an ASP 5/ASP Core Web API that I need to integration test with the OWIN Test Server. The problem is that I use IdentityServer as the authorization server in production and I do not want to include the authorization as part of my…
Silthus
  • 1,679
  • 1
  • 23
  • 27
5
votes
2 answers

OwinMiddleware doesn't preserve culture change in .net 4.6.*

I have an owin culture middle ware running very nice. It just changes the culture according to the url. This works in 4.5.* perfectly. Now when the runtiome is changed to 4.6.1, the culture isn't preserved anymore and as a result it just doesn't…
Boas Enkler
  • 12,264
  • 16
  • 69
  • 143
5
votes
2 answers

No conversion available between HelloWorldComponent and System.Func`2[System.Collections.Generic.IDictionary`2 // Parameter name: signature

I am working through Scott Allen's MVC 5 Fundamentals course on Pluralsight I get an error at "using (WebApp.Start(uri)) " in the code below. The error is An unhandled exception of type 'System.ArgumentException' occurred in Microsoft.Owin.dll …
Kirsten
  • 15,730
  • 41
  • 179
  • 318
4
votes
1 answer

What Is The Alternate Of AuthenticationManager In .Net Core

I am working on .Net Core Project now I need AuthenticationManager for interface IAuthenticationManager According to Microsoft this has obsolote. To get ApplicationSignInManager I have this method private ApplicationSignInManager…
TAHA SULTAN TEMURI
  • 4,031
  • 2
  • 40
  • 66
4
votes
0 answers

IdentityServer/OWIN: Client not being redirected to Login page after Logout

I have a new IdP that implements IdentityServer4 (.NET Core). I am using it to provide SSO/Cookie authentication/authorization to an MVC5 client app. Since the client app is not .NET Core, I use the IdentityServer3 and Microsoft.Owin nugets in…
Ken
  • 1,830
  • 3
  • 20
  • 32
4
votes
0 answers

IdentityServer4 - HttpPost for LogOut in MVC Client

I'm using IdentityServer4 and one of my clients is a .NET 4.5 MVC application. Everything seems to be working as expected. However, I have a problem. Taking the following flow: User logs in and gets redirected to the Client application. User…
Charmander
  • 276
  • 3
  • 20
4
votes
2 answers

Owin authentication does not emit cookie

I have following action in Login controller. For testing purposes Im not using a login form in Index action. Instead I create the claims identity and sign in. This action is GET not POST. It creates a claims identity and use that for…
XPD
  • 1,121
  • 1
  • 13
  • 26
4
votes
0 answers

Multiple OpenID Providers

I have a C# project using MVC and OWIN. I am trying to allow the use of multiple OpenID providers. I've seen how people do it by passing the parameter string in using "RedirectToIdentityProvider" in the pipeline like in this article:…
4
votes
0 answers

How to process openid connect responses as fragment in Owin Middleware?

I'm developing a web endpoint protected by a legacy openid connect server, the configuration on the client website (startup.cs) is the following: app.UseOpenIdConnectAuthentication(new OpenIdConnectOptions { AuthenticationScheme = "oidc", …
4
votes
2 answers

How to redirect user from OWIN middleware?

I have middleware used for authentication purposes and need to distinguish users by the type if they are internal or external. After this I want to redirect external users to custom error page, because they should not have access to particular…
Qerts
  • 935
  • 1
  • 15
  • 29
4
votes
1 answer

OWIN CORS Issue in Web API

I am working with WebApi and trying to add token based authentication using OWIN. It is working fine when client and service are in the same port. But facing a problem when both are on different servers. I am using Jquery Ajax method to call the…
4
votes
2 answers

MVC error handling in Owin Middleware

When certain exceptions are thrown in controllers, I want to catch those exceptions and do some extra logic. I was able to achieve this with a custom IExceptionFilter that is added to the global filters list. However, I preffer to handle these…
Identity
  • 1,553
  • 1
  • 22
  • 44
4
votes
1 answer

Replacing Cookie by Token based authentication in ASP.NET OWIN OpenIdConnect code authorization flow

We have a web application written in ASP.NET that uses MVC for serving our Single Page Applications and Web API for ajax calls. The authentication uses Microsoft.Owin and OpenIdConnect with Azure AD for Authority. The OAUTH flow is server side code…
4
votes
1 answer

AspNet WebApi hosted with Owin.Host.SystemWeb exception middleware doesn't catch POST requests

I've got a project that uses AspNet WebApi 2 hosted in Owin using Microsoft.Owin.Host.SystemWeb which implements exception handing using both Owin middleware and adding a IExceptionHandler via the httpConfiguration as outlined in this post. In the…
4
votes
1 answer

Creating Owin Auth Provider that Exchanges a Custom Token for a .Net Auth Cookie

I am trying to create an SSO like solution between 2 .Net applications .Net app 1 has a custom token generator and endpoints to validate tokens that returns user information. .Net application 2 is protected using Owin and was a typical standalone…
Scott Lewis
  • 437
  • 4
  • 18
1 2
3
17 18