Questions tagged [owin-middleware]

OWIN Middleware in the IIS integrated pipeline

266 questions
0
votes
1 answer

Access-Control-Allow-Origin header not found error, when cors is enabled in ASP.NET web api identity

I am using Angular 6 @ localhost:4200 & Asp.net Web Api Identity - Individual User Account @ localhost:57310 Now, I enabled cors like this, in my webapiconfig.cs file :- EnableCorsAttribute cors = new EnableCorsAttribute("*", "*",…
0
votes
0 answers

Implement OpenID connect Authetication in asp.net WEB API

This is the Project Structure This is the access_token I am getting in My Angular Client Application. { "nbf": 1529181048, "exp": 1529184648, "iss": "https://localhost:44381", "aud": [ "https://localhost:44381/resources", …
0
votes
1 answer

Send a custom parameter to an external identity provider

Is it possible to send a custom parameter to an external login provider/custom owin middleware I have an Identity Server 3 who handles my authentication, and I have an external identity provider middleware which handles the signing in of the…
Florian K
  • 602
  • 9
  • 30
0
votes
2 answers

How to register services in scoped lifestyle behaving like PerWebRequest using castle windsor?

I am working on self-hosted web api using OWIN and I need to register a service per scope lifestyle using Castle Windsor. I know that using HttpContext I can achieve that using PerWebRequest or HybridPerWebRequestPerThread lifestyle but in my case I…
Simple Code
  • 2,354
  • 2
  • 27
  • 56
0
votes
1 answer

Return custom type with Bearer Tokens using Owin in WebApi2

I have a requirement to implement OWIN authentication in my web api project. I am able to do the same, and i am also able to return multiple Claims. But i want to return UserDetails type values after successfully login where i am struggling. public…
radhey_mishra
  • 137
  • 3
  • 18
0
votes
2 answers

OWIN Signin not working

User.Identity.IsAuthenticated is always false. I've been googling for hours and I cannot get this to work. I have a set of claims and I'm creating the identity and signing in with it using OWIN, but for some reason, IsAuthenticated is always…
0
votes
1 answer

Disadvantages of OWIN middleware ASP.net web apis (.Net Framework 4.6.1)

I have already working ASP.net Web API (.Net Framework 4.6.1) Application, And already have some "DelegatingHandler"s and "ActionFilterAttribute"s working on it to handle Authentication, and Validation filters. I need to change Some error Messages…
Tarek El-Mallah
  • 4,015
  • 1
  • 31
  • 46
0
votes
0 answers

Implement GZIP OwinMiddleware

I'm trying to implement API Gzip Compration OwinMiddleware component. public class ApiResponseCompression : OwinMiddleware { private const string AcceptEncodingHeader = "Accept-Encoding"; private const string…
AllmanTool
  • 1,384
  • 1
  • 16
  • 26
0
votes
1 answer

404 not found Gets response when using Asp.net Core Middleware with .map

Below is code snippet in which i have wrote a Middleware which receives api request and validate it and send response. But when ever the request is valid at that time it does not call API , it show 404 Not Found Error. Middleware code snippet …
Saineshwar Bageri - MVP
  • 3,851
  • 7
  • 41
  • 47
0
votes
1 answer

Owin token call from angular 4 No 'Access-Control-Allow-Origin' header is present on the requested resource

I am using owin to generate oAuth token in asp.net webapi and I have added the UserCors as the 1st line in Configuration in Statrup.cs public void Configuration(IAppBuilder app) { app.UseCors(Microsoft.Owin.Cors.CorsOptions.AllowAll); …
bomaboom
  • 190
  • 1
  • 14
0
votes
0 answers

Catch ASP.NET Core Middleware Timeout

I have an ASP.NET Core middleware component that is timing out within its public async Task Invoke(HttpContext context) method. After requesting the middleware and waiting about two minutes, the site sends this message: "HTTP Error 502.3 - Bad…
0
votes
1 answer

MVC Web app to get Outlook mail failing with unable to resolve remote name 'login.microsoftonline.com'

I created the example app of this tutorial It works fine when I am not connected to a vpn or work related network. Once I login it fails with the following error: I guess this has to do with the SSL certificates. I do have cert installed for the…
Erik
  • 26
  • 4
0
votes
1 answer

How can I refresh an expired access token when it’s stored in a claim in a cookie?

Using Identity Server 4 server. In client’s Startup.Auth.cs : private static void ConfigureAuth(IAppBuilder app) { ISettingsReader settingsReader = Services.Resolve(); app.UseCookieAuthentication(new…
mb345345
  • 165
  • 6
0
votes
1 answer

Why isnt my middleware working?

I've tried to add my own middleware, it does not work :-) public partial class Startup { public void Configuration(IAppBuilder app) { System.Diagnostics.Debug.WriteLine("OWIN IS WORKING"); app.Use(); …
fUrious
  • 434
  • 5
  • 14
0
votes
1 answer

How to fetch email in web api 2 which is secured by WAAD

I am using MVC 5 client which is secured by "UseOpenIdConnectAuthentication" and getting all user details in Claims object, this client is calling WAAD secured Web Api by "Bearer" authentication token. I need to fetch username or email in the web…
Saurabh
  • 5,661
  • 2
  • 26
  • 32