Questions tagged [owin-middleware]

OWIN Middleware in the IIS integrated pipeline

266 questions
0
votes
1 answer

AspNetCore.Http 'HttpRequest' does not contain a definition for 'GetOwinContext'

we are using AspNetCore.Http with MyController : Controller. How do I get Get OwinContext this.Request.GetOwinContext(); doesnt work. 'HttpRequest' does not contain a definition for 'GetOwinContext' and the best extension method overload…
user1324887
  • 632
  • 3
  • 11
  • 32
0
votes
0 answers

IdentityServer4 mixing .NET Core Clients and OWIN Clients - looping

Im migrating several applications from Identity to IdentityServer4 Some are .net core 3.1 and are set up like the…
0
votes
1 answer

Identity Server 4 with .NET MVC 4.8, the length of the query string for this query is greater than the configured maxQueryStringLength value Error

I have a website that is hosted in Local IIS witch is configured as a client in Identity server 4 , my problem is that i'm getting this message The length of the query string for this query is greater than the configured maxQueryStringLength value.…
0
votes
1 answer

dot net core setting redirect_uri for OpenIdConnect is not same like dot net framework?

On a .Net When i create a Open ID connect Authentication Options I have a property to set the RedirectUri this is even defined as recommended on the documentation but no such property exists on the AspNetCore it is automatically set to the current…
0
votes
0 answers

user identity username saving

i'm trying to save HttpContext.Current.User = new System.Security.Principal.GenericPrincipal(new GenericIdentity(user.UserName), new string[] { /* fill roles if any */ }); string f = HttpContext.Current.User.Identity.Name; //here…
j osh
  • 36
  • 2
0
votes
1 answer

Microsoft Owin CookieAuthenticationOptions SlidingExpiration = false expiration is still updating

I for the life of me cannot figure out why my application cookie expiration is incrementing to now+15 min every request when i have sliding set to false. I am also updating a claim on this…
Ricardo Saracino
  • 1,345
  • 2
  • 16
  • 37
0
votes
1 answer

How is OWIN OpenID Connect Login called?

Using OWIN and OpenID Connect and I am having a hard time understanding how my code works. I got this from a sample on the web. This is a .Net 4.7.2 application. Relevant OWIN Startup code: app.UseOpenIdConnectAuthentication(new…
Derek R
  • 95
  • 1
  • 1
  • 8
0
votes
1 answer

.net OWIN oauth2 AuthenticateCoreAsync() not being called after reidrect from provider with auth code

I am implementing oauth with OWIN in .net. I am able to successfully login to my provider, and get redirected to my app with the auth code in the url. Everything seems good at this point, however the method AuthenticateCoreAsync() does not seem to…
Luke
  • 11
  • 2
0
votes
0 answers

.net how to set OAuth2 token length

I am using Microsoft.Owin.Security.OAuth.OAuthAuthorizationServerOptions to work with OAuth2 tokens. currently the token length is 256 characters, my client want it to be only 36 characters. is there a way to do this?
Tzuriel Yamin
  • 73
  • 1
  • 12
0
votes
1 answer

how to retrieve actual error message in case of Bad Request using OwinContext middleware in .Net Web Api 2?

When .Net web API returns Badrequest("this is an example of Badrequest".), IOwinContext object in my middleware only contains context.Response.StatusCode 400 and context.Response.ReasonPhrase as "Bad Request". I want actual error message so that I…
0
votes
1 answer

User.identity.Name is null - configure name with azure authentication .net 4.7

I have an application that is in .net 4.7 and i am wanting to bring authentication over to use Azure AD from windows authentication. I have this working but i want to use User.Identity.Name which is currently null I have seen that i can configure…
0
votes
1 answer

IdentityServer4 Authentication in .NET Framework WebApi Owin UseOpenIdConnectAuthentication

So, I have IdentityServer4 setup in a separate app that will be referenced in the code by WebConfigurationManager.AppSettings["IdentityServer:Authority"]. I have a .NET Framework 4.6.1 WebApi app that needs to hit this app to authenticate requests. …
ScubaSteve
  • 7,724
  • 8
  • 52
  • 65
0
votes
1 answer

How does the openid connect owin validate the token from Azure AD?

I've developed an asp.net web application that is protected by Azure AD. The OpenId connect owin middleware takes care of validating the JWT token from Azure AD. How does the openid connect owin software actually validate the token? As I have…
rgullhaug
  • 1,065
  • 2
  • 10
  • 19
0
votes
2 answers

How to get AD access token and pass it to web api controller?

How to get AD access token from login.microsoftonline.com and pass access token to web api controller? as I need "access token" as such to pass on to another partner company website url via post request. Below code doing AAD authentication as…
0
votes
0 answers

MVC5 ADFS Not Authenticated

I am struggling with ADFS UseOpenIdConnectAuthentication for more than a week now. It is frustrating. Here is my Startup.Auth.cs code . the variable "dero" is false => not authenticated. Why? using System; using System.Configuration; using…
Cătălin Rădoi
  • 1,804
  • 23
  • 43