Questions tagged [owin-middleware]

OWIN Middleware in the IIS integrated pipeline

266 questions
0
votes
0 answers

How to get localhost name from OWIN startup class

I have tried to get host name from OWIN Startup class by using below code in ASP.NET web forms. I am getting http://127.0.0.1 host name instead of http://localhsot:portnumber. Also I am not able to get real host name i.e., www.testsite.com. Is there…
RGS
  • 5,131
  • 6
  • 37
  • 65
0
votes
0 answers

Microsoft Owin token and refresh token expires shortly

I'm using WebAPI to answer android and my angular UI requests. for authentication purpose I've utilized the OWIN library. I've set the token expiration time to 1 day and refresh token expiration time to 7 days but my tokens expire after 2 hours and…
0
votes
0 answers

How to host Multiple .Net-Core WebApi using OWIN Under the same URL and all API use the same Middleware pipeline

I have a requirement where Multiple WebAPI services(i.e. WebAPI1,WebAPI2,WebAPI3 etc.) work for the same product and as per requirement we need to use single Middleware to Authenticate the request for All WebAPI services(i.e. WebAPI1,WebAPI2,WebAPI3…
0
votes
3 answers

Exclude Controller from Middleware

I have wrote a Middleware which checks if Authorization Token is included in the header and based on that request are executed or returns error if token is missing. Now it is working fine for other Controllers. But What should I do for…
Shabir jan
  • 2,295
  • 2
  • 23
  • 37
0
votes
1 answer

Different between Microsoft.Owin.Security.Facebook and Facebook SDK for Javascript Oauth2

In Asp.Net MVC we can Use to authenticate Login with Social Media (like Facebook,Google,Linkedin) to using OWIN middleware Library what are the benefits to use this library instead of the javaScript SDK provided by social media??? Or Both Are…
0
votes
1 answer

Response body unchanged after being processed by middleware

I am trying to write a middleware that calls the next middleware and then whatever the response body of that middleware is, it will be changed by my middleware. This is what the Configuration() method in the Startup class looks like: public void…
Stoatman
  • 758
  • 3
  • 9
  • 22
0
votes
1 answer

OpenID Connect obtain claims in MVC Session

I need to store a unique identifier for a user in an SQL database. My application uses OpenID Connect via OWIN to authenticate users against Azure AD and is based on the MVC 5 Framework. I can access the ObjectId of the user via the…
0
votes
1 answer

Owin Oauth occasional too many redirects only on load balanced environment

I have a weird issue which occurs on my asp.net MVC app with Owin Oauth authentication/authorization, while it's load balanced. This application acts an Oauth endpoint , our client applications connects using Dotnetopenauth. A single server…
user1597990
  • 181
  • 3
  • 13
0
votes
1 answer

Why isn't ASP.NET Middleware validating token?

I am trying to validate a JWT token being passed onto a C# application. I confirmed that the token is being sent with every request. If I decode it manually everything works fine (I see the claims). However when I enable Authorization I get a 404…
Rilcon42
  • 9,584
  • 18
  • 83
  • 167
0
votes
1 answer

Azure Active Directory | Roles based authorization

I have tried various authentication scenarios of Azure Active Directory across internet. All examples are focused only on Authorization by Authentication. I was looking for Authorizing the user based on Roles from my AAD App Registration. Auth()…
Ashokan Sivapragasam
  • 2,033
  • 2
  • 18
  • 39
0
votes
1 answer

Correct method of authorizing scopes against Web Api and Mvc .NET 4 Applications

I'm using identity server 4 as an authentication server, and have successfully demonstrated authenticating clients for access to my MVC web application and my Web API application, both running on IIS under .NET 4.7. The problem I'm having is finding…
0
votes
1 answer

OWIN middleware: signout without redirecting to IdP when IdTokenHint is not available

Is there anyway to signout using OWIN middleware without redirecting to IdP? Everytime i call Authentication.SignOut(), my MVC application is redirecting to IdP. It's fine if the identity token is available. However I don't want user to get stuck on…
h2chch
  • 21
  • 5
0
votes
1 answer

Owin.Security.Providers - OpenIDAuthenticationMiddlewareBase derived class claims a FieldNotFoundException

Using Nuget packages Owin.Security.Providers.OpenIDBase 2.1.1 and Owin.Security.Provides.OpenID 2.24.0 - DLLs version 2.0.0.0. I'm deriving my own provider - i.e. MyOwnAuthenticationMiddleware :…
oflahero
  • 1,268
  • 10
  • 17
0
votes
1 answer

OAuth Bearer Token - Use XML format

I am using OWIN middleware to issue access token for my ASP.NET WebApi project. The token issued is always in Json format despite removing the Json formatter from the formatter collection. I tried setting the XML formatter to be at the top of the…
Aarav
  • 5
  • 4
0
votes
1 answer

Infinite loop/redirect simple ASP.NET OWIN Azure AD Web solution when changing PCs

I have a very simple ASP.NET Web solution (WebForms) which has a boilerplate implementation of Azure AD authentication via OWIN. It was working fine when tested locally on my PC. I have literally hopped in bed on my Windows laptop, and pulled down…
JamesMatson
  • 2,522
  • 2
  • 37
  • 86