Questions tagged [owin.security]

14 questions
8
votes
6 answers

Authorization_code grant flow on Owin.Security.OAuth: returns invalid_grant

I am trying to setup my authentication using the authorization_code grant flow. I had it previously working with grant_type=password, so I kind of know how the stuff is supposed to work. But when using grant_type=authorization_code, I couldn't make…
dgn
  • 1,213
  • 2
  • 13
  • 20
6
votes
3 answers

Microsoft.Owin.Security.IAuthenticationManager doesn't redirect to login page

I'm using Microsoft.Owin.Security in my application (ASP.NET MVC v 5.2.0 on .NET 4.5). But just the security part of OWIN nothing else. When a user wants to access to a protected URL, in local, the request get redirected to the login page. But when…
amiry jd
  • 27,021
  • 30
  • 116
  • 215
5
votes
0 answers

How to step into a OWIN middleware in a package?

I have the following stack in my ASPNET 5 app startup: appBuilder.UseIdentityServerBearerTokenAuthentication(); // That calls app.UseValidationEndpoint(); // That calls app.UseOAuthBearerAuthentication(); // That…
4
votes
1 answer

OpenID Connect AllowedRedirectUris empty resulting in "invalid redirect_uri" on IdentityServer4

I have a running IdentityServer4 on a .NET Core project, and I'm trying to make an existing .NET Framework web application a client of that server. The project is using Microsoft.Owin.Security, and in the Startup.cs I setup the authentication…
Mason
  • 1,007
  • 1
  • 13
  • 31
2
votes
0 answers

OWIN Authorization Code flow always resturns "invalid_request" (400 Bad Request)

I'm trying to add authorization code flow to my OWIN based application. My setup is: Startup.cs // Enable JWT OAuth Authorization Server var opt = new OAuthAuthorizationServerOptions() { TokenEndpointPath = new PathString("/oauth/token"), …
silentman.it
  • 361
  • 5
  • 18
2
votes
1 answer

Azure AD B2C domain cookie

I have a web app which runs under service.domain.de. For authentication in this app I use Azure AD B2C. In the azure security cookie is for the domain service.domain.de . What can I do to get the security cookie for the domain .domain.de? So with…
Stefan
  • 555
  • 5
  • 18
2
votes
1 answer

ThinkTecture IdentityServer3 vs Microsoft.Owin.Security.OAuth2

We are planning to build an OAuth2 authorization server in our company, and we're trying to figure out what to be the correct solution to implement it upon. Currently we're considering using the ThinkTecture IdentityServer3 or the plain…
jakubkwa
  • 21
  • 1
2
votes
0 answers

AuthenticationManager.SignOut() fails IE only

I am working with a strange credit card payment gateway where I send encrypted transaction info to the bank website. There the user enters the card info. I have set up two URLs with the bank (PaymentSuccess and PaymentFailure) where they return…
Ungaro
  • 522
  • 6
  • 15
1
vote
1 answer

Change the domain in a cookie (ASP.Net and Microsoft.Owin.Security)

I use the libraries Microsoft.Owin.Security, Microsoft.Owin.Security.OpenIDConnect and Microsoft.Owin.Security.Cookies. It works fine and I can create a security cookie. But in the security cookie is the domain AAA.de. How I can change the domain…
Stefan
  • 555
  • 5
  • 18
1
vote
1 answer

Is it right way to use Owin.Security.ActiveDirectory library with AAD B2C

We have two Application registered in the same AAD B2C tenant via "New" and "Old" portal. Authentication with "Old" Application credentials works correct. With "New" Application credentials - error appears: IDX10500: Signature validation failed.…
1
vote
2 answers

Is this a good idea to use owin.security without identity?

I have an app that uses my own membership system. It uses ASP.NET MVC 3 which I'm updating to ASP.NET MVC 5. It's not possible to change the membership to use a new one like ASP.NET Identity. But, for the authentication side, do you think it is a…
amiry jd
  • 27,021
  • 30
  • 116
  • 215
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
0 answers

access_token issue by webapi service1 is accepted by other webapi service

I am implementing the token based authentication in web api service by referring this link https://www.codeproject.com/Articles/1187872/Token-Based-Authentication-for-Web-API-where-Legac For testing purpose I have created two webapi service with…
0
votes
1 answer

Access Protected Resource API gives “401 Unauthorized” error

I want to add authorization to my project based on this tutorial. I've got the part of retrieving an access token working. But when using the token to access a protected resource API I get a 401 unauthorized error. The request has an authorization…
xerves
  • 65
  • 1
  • 2
  • 9