Questions tagged [owin-middleware]

OWIN Middleware in the IIS integrated pipeline

266 questions
0
votes
0 answers

WebApi: decide authentication scheme based on request header

I am developing an ASP.NET Web API and want to allow different authentication schemes, the authentication method should be decided per request and by a request header. Example If the request contains the header "Bearer" I want to verify the token…
MatiasK
  • 686
  • 1
  • 7
  • 20
0
votes
1 answer

Azure AD API (REST or Library) to access Acess or SAML token timeout

I have implemented WSFed authentication mixed up with Cookie based authentication. I want to set cookie expiration time to the SAML token timeout. Is there any Azure AD API (REST or Configuration) I can use to access SAML token timeout? One way is…
0
votes
0 answers

login to an custom oauth2.0 server using the same tokens issued by the auth server

I have implemented a simple authorization server with C# using the following guide. This works fine for my other applications that I built. The problem arises when I want to login to the Auth server itself to manage user settings like 'change…
Lars Celie
  • 622
  • 5
  • 17
0
votes
1 answer

How UseWindowsAzureActiveDirectoryBearerAuthentication validates the Azure Active directory Bearer token?

I'm working on AzureAD authentication in web API. Every thing is working fine for me. I'm curious, how below piece of code validates the Azure Active directory Token. app.UseWindowsAzureActiveDirectoryBearerAuthentication( new…
0
votes
2 answers

How to Manage Two Kind of User with seprate Table in asp.net mvc?

I'm working on project using ASP.Net MVC 5 that have two type of user Type1 and Type2 the username of each user Type is his phone number one person should be able to sign up as both Type1 and Type2 user it mean each type should have separate…
0
votes
1 answer

Is it possible to login in ASP.NET WebApi application with Individual account , Microsoft account and Azure AD account

We are working on a Saas Application where UI part is an MVC application and it communicates with a Web API for authentication and data. Currently, We have implemented login with individual accounts with ASP.NET Identity. Now we are looking to add…
0
votes
0 answers

Programmatically redirect unauthorized users using Microsoft.Owin.Security.OpenIdConnect

When I first started developing my MVC app (which requires authorization, to selectively render a SPA, which in turn does it's own authorization via ADAL.js) I simply decorated the HomeController's Index method with [Authorize] like thus, …
bkwdesign
  • 1,953
  • 2
  • 28
  • 50
0
votes
3 answers

.Net Core 2 - How to add and use Authentication service (Jwt endpoint)

I am using .Net Core 2. I need to add a simple token endpoint. I was following this article but found that the below method is obsolete in .Net Core 2 app.UseJwtBearerAuthentication(); Quoting the second link: Configure(): UseXyzAuthentication()…
Mohsin
  • 692
  • 1
  • 7
  • 15
0
votes
1 answer

Microsoft Owin, unable to reach Azure B2C from comporate network

I have ASP.NET MVC web application running on server that is behind firewall. "Forms authenticate" is about to be replaced by Azure B2C. I used Microsoft's OWIN library. I used following tutorial to get started with Azure B2C…
0
votes
1 answer

OwinMiddleware implementation in Resource Server suppresses Token validation

I have set up my Resource Server (Web Api 2) to validate JWT token for incoming requests. The JWT token is issued by Auth0 and my client pass it to my web api. This all works fine and raises 401 response if Issuer, Audience or Expiry date is not…
0
votes
1 answer

Kentor Owin middleware in .Net webform GetExternalLoginInfo() return null

I am using Kentor Owin middleware in .Net webform and I can see Idp returning SAML with assertions but the code below always return null. var loginInfo = Context.GetOwinContext().Authentication.GetExternalLoginInfo(); I can see…
0
votes
1 answer

ASP.NET Web API HttpContext Response is sent back before IOwinContext Response

We are using Owin middleware in an ASP.NET Web API 2 project hosted in IIS. I am currently experiencing a strange phenomenon where the IOwinContext.Response.Body is not being written to, and actually, even when I have a break point set in the…
Blacky Wolf
  • 429
  • 6
  • 12
0
votes
1 answer

How can I use OWIN Authentication with Microsoft account?

Currently I am using OWIN authentication in my application. I am using Tenant as common. So, it is authenticating any user from azure active directory as well as Microsoft account. I want to restrict user only for Microsoft account. Below is my…
Ashutosh B Bodake
  • 1,304
  • 1
  • 19
  • 31
0
votes
1 answer

OWIN Katana middleware: How to block an user if claims returned doesn't have a specific role in them?

I am successfully authenticating the user at the Identity Server and getting back the claims (along with roles as claims). All is well when I do not consider roles. I want to restrict the user unless he has a specific role and redirect him to a…
TejSoft
  • 3,213
  • 6
  • 34
  • 58
0
votes
1 answer

Owin test server how to add a header before executing middleware

I am using OWIN middleware and I am trying to set a header that is getting set on a controller. For unit testing I am trying to set the header in the test to no avail. What is the best way to set this header? [TestMethod] public async Task…
bdawg
  • 343
  • 3
  • 13