Questions tagged [owin]

Open Web Interface for .NET that describes how components in a HTTP pipeline should communicate.

0
votes
0answers
16 views

ASP.NET OWIN OpenID Connect not creating user authentication

I have an ASP.NET 4.6 web app that I'm trying to add OpenId Connect using OWIN. I added my Owin startup class and everything appears to be configured correctly, but the problem I'm having is the ASP ...
-1
votes
0answers
16 views

WebApi 2 Enable CORS gives 401 Unauthourized after token issued

I am trying to build a Angular 7 Client application to use WebAPI 2, OWIN middleware configured with OAuth Authentication and enabled CORS. I could not make this work for last 3 weeks. Really a tough ...
0
votes
0answers
13 views

How i can change table name which is generated by identity framework in database like “AspNetUsers”,“AspNetUserRoles”,“AspNetUserLogin” [duplicate]

protected override void OnModelCreating(DbModelBuilder modelBuilder) { //Map entity to table modelBuilder.Entity<AspNetUsers>().ToTable("StudentInfo"); ...
0
votes
2answers
21 views

OWIN Mixed Authentication IIS Issue

I have a project where Windows Authentication and Forms login are required. I came across OWIN Mixed Authentication which seems to meet my requirements. Before implementing into my own project I ...
0
votes
0answers
14 views

How to configure multiple ADFS endpoints with OWIN at runtime?

I want to configure ADFS endpoints in my asp.net app at runtime. There is a problem: if I declare single callback method for multiple endpoints then I have exception: Microsoft.IdentityModel.Tokens....
2
votes
1answer
34 views

Azure Active Directory with .Net Core

The Microsoft Default Identity did not fit my project needs so i had to write a custom filter to handle authentication. I do allow users to use Azure Active Directory, by storing a reference table ...
0
votes
0answers
29 views

Keycloak REST API called with C#

I need an easy and simple way to consume the Keycloak REST APIs from https://www.keycloak.org/docs-api/5.0/rest-api/index.html with ASP.NET Core C#. I tried using the https://github.com/mattmorg55/...
0
votes
1answer
57 views

.NET Core and JSON Web Tokens, still need Owin?

first time doing this in .net core, I've set up JWT auth / ASP Identity database using these tutorials, both of which are quite good: https://www.youtube.com/watch?v=yH4GhmTPf68 https://www.youtube....
0
votes
0answers
13 views

How hangfire start schedule job with Corn Expression

The testing code is to check how many times the Cron.Minutely schedule jobs have been run in the background after 5 seconds and 1 mins later check again. My question is once the jobs have been ...
0
votes
0answers
13 views

Change to Owin Authentication with Startup.cs from custom Authorization Attributes

I am new to Owin Authentication and Authorization in Mvc Web Api. Previously, the application was having custom Authorization Attributes for both the Rest calls and the Views in the MVC. Rest ...
1
vote
0answers
25 views

Self hosted Owin ASP.NET web api only accepting localhost connections

I am trying to get a self hosted owin console application listening to remote access, and not only localhost. Code looks like this: //Start API in main() string domainAddress ="http://10.17.5.42:...
1
vote
1answer
54 views

How do I update my cookie, having got a new access_token?

Having used a refresh token to get a new access token, I want to update my client side cookie with that access token. My client is able to sign in and call my REST API using ajax, however when that ...
0
votes
0answers
19 views

SetAuthCookie with ASP.NET Identity Owin middleware

In process of replacing current form authentication with asp.net identity owin middleware. Currently, once user details are validated on internal user database, we initialize the form auth cookie per ...
0
votes
0answers
33 views

Is session expired check using asp.net identity owin middleware

We are in process of replacing the form authentication with asp.net identity owin middle-ware. Currently we have IsSessionExpired function which basically checks if user session has expired. ...
1
vote
1answer
19 views

SAML2 - SustainSys - Change the Root URI Of \LogoutNameIdentifier and \SessionIndex?

i have successfully integrated the SAML sustainsys solution with the IdP initiated Service Provider Flow. (awesome tool, many thanks) however, in the SAML response i am seeing the following claims: ...
0
votes
1answer
17 views

get OWIN bearer token before returning the response

I have implemented the authentication with OWIN and bearer token and it works fine when the user login. When \Token URL is called and username/password is passed to it, that gives token in response....
0
votes
0answers
7 views

MVC owin - how to parse and get value of id_token

as part of MVC Owin integration with Azure AD B2C we get claims embedded within id_token. Is there any easy way to parse this id_token and extract the claims as .NET Type. Wonder if Owin provides ...
1
vote
2answers
33 views

Testing a webapi controller using “Moq”

I'm learning about unit tests using Moq, and I have a very simple Webapi Controller that only returns status OK. public class TestController : ApiController { [HttpGet] [Route("api/v1/test")] ...
2
votes
1answer
72 views

How should I exchange my refresh token for a new access token?

Before authorization expires I want to get a new access token in exchange for my refresh token. Right now I get a cookie which I believe has all the tokens I've asked for (I do not know how to ...
0
votes
0answers
7 views

asp.net MVC OWIN - How to retrieve azure b2c custom attributes as part of claims

I've configured few custom attributes on azure b2c portal which will be sent as part of claims. I'm quiet new to OWIN, I can get the id_token after logged in. However I'm not quiet sure on whether ...
0
votes
0answers
8 views

How to achieve google Oauth2.0 Server flow using asp.net MVC OWIN authentication

We are using asp.net MVC (not .netcore) where we have handcoded the Google OAuth2.0 Server flow. Now we have requirements to add more identity providers such as FB, Azure AD B2C .. etc. Had a look at ...
0
votes
0answers
50 views

ASP.NET WebAPI RefreshTokenProvider Expiration Time is Wrong

After spending some very good hours on trying to fix this issue, I decided to call for help - maybe someone knows where I'm doing something wrong. First of all, I'm having an ASP.NET WebAPI (.NET 4.7....
1
vote
1answer
41 views

How to validate id_token received by asp.net mvc OWIN from azure AD B2C

We have a security requirement that we must validate the id token we receive from Azure AD B2C. We need to validate these at the minimum customSecurityLevel, audience, not before and "expiration time"...
0
votes
0answers
10 views

WebAPI to serve static files issue: Microsoft.AspNetWebApi incompatible with Microsoft.Owin.StaticFiles package

I have a Self Hosting webApi that I need to add functionality to serve static html files. So I followed this example, but installation of Microsoft.Owin.Static files makes the App Server unable to ...
0
votes
0answers
19 views

base.IsAuthorized(actionContext) is returning 401 multiple times in custom filter

we have a mvc web api where we have implemented token based security for api consumers and token is generated using Microsoft.Owin.Security.AuthenticationTicket and then we have a custom attribute ...
0
votes
0answers
56 views

Is there a way to clear server side OWIN / authentication data?

After a recent security scan, the info sec team said they do not like the fact they can save the .AspNet.ApplicationCookie value, and use it again afterwards allowing the user access to the site. ...
1
vote
0answers
53 views

IIS web requests are hanging indefinitely - OWIN module

A web app (ASP .NET MVC - C#) works on a windows machine and it is hosted already on IIS 8.5. The app uses Membership along with .NET framework 4.5. Recently, it went down twice upon the total ...
0
votes
0answers
14 views

MediaTypeFormatter being hit for unsupported media types

I'm using Owin/WebAPI. I have a custom CSV formatter defined and I only want this formatter being used if the expected request payload is specified and the resource type is explicitly supported in ...
0
votes
0answers
20 views

return context.setError doesn't work in server

We are writing method for authorization with Microsoft.Owin.Security. When we return token method works. When we enter incorrect password method must return error message (context.setError("...
0
votes
0answers
27 views

How to refresh token in Angular 6 and web api using jwt?

I have used jwt tokens for my angular 6 project with Web API. I can login to my session by generating token , but when it expires lets say after 10 min. I want to show a popup, which would say, your ...
0
votes
0answers
21 views

AuthorizationServerProvider and RefreshTokenProvider could not be found

I am trying to learn Owin token. While implementing I am using AuthorizationServerProvider() and RefreshTokenProvider() and have included the namespace Microsoft.Owin.Security.OAuth. But getting ...
0
votes
0answers
15 views

How to update OAuthGrantResourceOwnerCredentialsContext after a user has signed in?

I use Owin token-based authentication in my app (asp.net web api) and have a question about the OAuthGrantResourceOwnerCredentialsContext. I wonder if you can access and update the context after a ...
1
vote
1answer
39 views

OAuth2.0 integration with Xamarin

We build our own "OWIN OAuth 2.0 Authorization Server" using "Microsoft.AspNet.Identity.Owin" and "Microsoft.Owin" framework. Ref: https://docs.microsoft.com/en-us/aspnet/aspnet/overview/owin-and-...
0
votes
0answers
27 views

OWIN Middleware - response HTTP status code not set when Content-Length header is added

I am running WebAPI with just one Middleware and NOT able to set response HTTP status code when I add Content-Length header. Status code defaults to 200 OK with Content-Length header (irrespective of ...
0
votes
0answers
5 views

Error Owin.Loader.DefaultLoader.SearchForStartupAttribute Could not load XenoCode.User.Attributes.AssemblyAttributes.ProcessedByXenoCode

Nie można załadować typu 'XenoCode.User.Attributes.AssemblyAttributes.ProcessedByXenoCode' z zestawu 'obout_Postback, Version=1.2.0.0, Culture=neutral, PublicKeyToken=e4e77ca82105cd12', ponieważ ...
1
vote
0answers
28 views

Unity Lifetime Mangers for OWIN self hosted Web API

Im migrating a Web API from IIS to self hosting with OWIN and The UNITY lifetime managers are giving me problems. I keep getting "A second operation started on this context before a previous operation ...
0
votes
0answers
11 views

How OpenIdConnect middleware works under PASSIVE mode

Our service uses several authentication methods. So I set AuthentationMode of OpenId Connect middleware to PASSIVE, so it doesn't trap 401 responses intended for other authenticators. But looks like ...
1
vote
1answer
41 views

OWIN Middleware not able to set http status code

I am running WebAPI with just one Middleware and not able to set response HTTP status code. I am using OnSendingHeaders() and able to add headers and set response body, but status code is not ...
0
votes
1answer
27 views

How trurn on/off authrization of a controller based on some condition

We have an requirement to turn on/off authorization attribute based on some configuration and requirement by different sites. For starters let's say , the configuration comes from config file. I ...
2
votes
2answers
101 views

Web API - Issues with HttpContext.Current in owin for integration testing using moq

I am building a Web API application which will be hosted in an IIS environment. In order to perform end to end integration testing of my service(no mocking), I am using OWIN. The problem is deep down ...
0
votes
1answer
71 views

C# REST API Controller: same route with 2 different actions

When using the following routes: config.Routes.MapHttpRoute( name: "new_device", routeTemplate: "api/v1/devices", defaults: new { controller ="Devices", ...
0
votes
0answers
13 views

C# Identity cookie causing network related issues

I have a login cookie for when users login, and it lasts for 5 hours. The cookie upon which user logs in and it's logic are like following: public void Configuration(IAppBuilder app) { ...
1
vote
1answer
39 views

Force API Controller implementation

I would like to have an implementation for a specific API controller, that will be implemented with Microsoft.AspNetCore.Owin, for creating a rest api with .net core. I would like to give others the ...
0
votes
0answers
21 views

SignalR javascript client event never raise

I'm trying to insert SignalR into an ASPNET MVC application. I've done all the preliminary steps listed below in a small project. The problem I'm encountering is that events are not forwarded to the ...
1
vote
1answer
43 views

Sharing legacy FormsAuthentication cookie in OWIN

We have upgraded two ASP.NET MVC4 web apps to MVC5 and in order to use SignalR 2.x, we had to use OWIN in the updated app. The two apps shared the same machinekey and authentication sections in web....
0
votes
2answers
46 views

Asp.net UseOpenIdConnectAuthentication not working in Azure

I am using UseOpenIdConnectAuthentication to authenticate users. My application code works fine locally. But, when I run it on Azure, the SecurityTokenValidated event is never fired. Consequently, ...
1
vote
0answers
22 views

Identity Server and Accessing state values in MVC Controller?

I am setting a custom state paramter value in OnRedirectToIdentityProvider and able to access it in OnMessageReceived. This custom state value can be accessed in MVC Controller but the value is in an ...
2
votes
1answer
27 views

Create table from model

I use OWIN and identity for authorization and authentication in my project after first hit the tables created. Now I need to add some additional tables. so I created my custom model called Author. ...
0
votes
0answers
13 views

Single sign on using Owin.Security.Saml in Asp.net MVC

We need integrate single sign on using Owin.Security.saml in Asp.net Mvc Please help us for this. currently we have login with normal and social media. but also need to single sign on with intranet ...
1
vote
1answer
37 views

Is is possible to use Owin.Security.OpenIdConnect.Server in .NET Framework 4.5

While using Owin.Security.OpenIdConnect.Server in 4.5 framework facing the below error : error CS1061: 'IAppBuilder' does not contain a definition for 'UseOpenIdConnectServer' and no accessible ...

http://mssss.yulina-kosm.ru