claims-based-identity

Implementing custom claim with extended MVC Core Identity user

痴心易碎 提交于 2019-12-04 20:38:51
问题 How can I create a custom authorize claim in MVC Core 2.0 (using AspNetCore.identity) to verify a custom user boolean property? I have extended the IdentityUser (ApplicationUser) to include a boolean value "IsDeveloper". I am using claims based authentication and would like to add a custom claim, but am not certain where to start. How can I create a custom claim that will: Find the current (customized) Core.Identity user. Evaluate the a custom identity user bool value? I understand the core

C# Owin login results in identity=null on production system

时光怂恿深爱的人放手 提交于 2019-12-04 19:44:28
I've got an asp.net MVC 5 web project which is running fine on my development system. But for some reason, the login using Microsoft Owin with Facebook stops working as soon as I deploy the solution on my production system. The callback always retrieves ....error=access_denied as parameter and I tracked it back to the fact that owin returns null for my identity. Any clue whats going on here? UPDATE I implemented log4net in my Owin code and was able to dive deeper: Response status code does not indicate success: 400 (Bad Request). Stack trace: at System.Net.Http.HttpResponseMessage

Custom Claims with Geneva framework and how to “synch” users whitin your app

喜欢而已 提交于 2019-12-04 19:31:51
Maybe this question highlights how little I know about claims identity management, but here it goes. If using WIF within an application that uses a third party STS for Identity and that uses custom claims for authorization ( something pertinent and specificto the application like CanCreateFooBar ) 1) How do I manage the users? Ie, the users from say AD or other membership provider can be identified, but internally in my system i need to know about them and have more user information that has nothing to do with Identity ( so it woulndt really make sense to have this info available outside the

Exclude specific path from WIF authorization in a ASP.NET MVC 4 project

坚强是说给别人听的谎言 提交于 2019-12-04 18:05:15
问题 We have successfully configured windows identity foundation (WIF) in our ASP.NET 4.5 MVC 4 project with the help of the Identity and Access... extension for Visual Studio 2012. But are unable to exclude a specific path from authorization to allow anonymous access. When we access our default route (i.e. /Home ), the passive redirection will redirect us to the configured issuer Uri. This is currect. But now assume we want to exclude Path /Guest from STS Authentication so that everybody can

How to mix WIF and non-WIF endpoints in a single WCF <service>?

痴心易碎 提交于 2019-12-04 15:53:33
A WIF-based WCF service needs to call method FederatedServiceCredentials.ConfigureServiceHost() , or put the equivalent element <federatedServiceHostConfiguration> in the web.config file, to work. This is a setting on the service level, in other words it applies for all endpoints. According to the method documentation, the ServiceHostBase instance is modified in several WIF-specific ways. For example, the authorization is replaced by a WIF-based authorization class. Now I'd like to have a single <service> (inside <system.serviceModel><services> ) with multiple <endpoint> s, where one endpoint

Restricting access to records. Is claim-based permissions a good idea

本秂侑毒 提交于 2019-12-04 14:01:09
问题 in .net Claim-based identity framework If i wanted to restrict users to do an operation (view or edit) on let's say an account, a particular account #123456.(i am talking about business entity, like a bank account.) Is it a good idea to create a claim for each account they can view or edit? Any disadvantages of having a lot of claims in a set? a system admin might have access to all accounts in the system thus creating hundreds of claims (maybe more than one for each account) 回答1: The most

Apache CXF client for claims-mode xRM (Microsoft Dynamics CRM 2011)?

雨燕双飞 提交于 2019-12-04 12:27:12
问题 I'm trying to create an Apache CXF (2.7.5) client for the Microsoft Dynamics CRM 2011 ("xRM") web services (which I understood to be based on WCF 4) where CRM is in claims mode, so that the WSDL for this web service points to an STS (in my case AD FS 2.0). My main question: Are there any tutorial, suggestions, blog posts to help me out (either describing how to send claims, or how to avoid them and instead use Windows authentication)? Below is a description of what I've done until now. I

Facebook MVC 5 ASP.NET Identity - Email is null for certain users

允我心安 提交于 2019-12-04 11:56:06
问题 This is a problem i am trying to solve for a month now. (tried any possible article/code out there). In ExternalLoginCallback action, AuthenticationManager.GetExternalLoginInfoAsync() returns a valid object (with all the provider details) but email is null for certain Facebook users . For the large majority of Facebook login email is presetnt. But for about 30% of logins I get an exception down the process because the email is null. Luckily sometime ago I've created a Facebook user which

Security, Thread.CurrentPrincipal, and ConfigureAwait(false)

点点圈 提交于 2019-12-04 11:20:43
问题 Would using Thread.CurrentPrincipal's claims in a referenced library that uses ConfigureAwait(false) pose any problems or will the flowing of ExecutionContext's logical call context take care of me there? (my reading and testing so far indicates that it will). Example WebAPI Controller Action: [CustomAuthorizeThatSetsCurrentUsersClaimsToThreadCurrentContextAndHttpContextCurrentUser] public async Task<Order> Get(int orderId) { return await _orderBusinessLogicLibrary.LoadAsync(orderId); //

Message: ID4243: Could not create a SecurityToken. A token was not found in the token cache and no cookie was found in the context

喜你入骨 提交于 2019-12-04 09:51:33
问题 We're getting the exact same error as in this thread ... in our production environment. [WIF Security Token Caching Does anybody have a fix to this error ? Message: ID4243: Could not create a SecurityToken. A token was not found in the token cache and no cookie was found in the context. Here is some info about our setup: • We‘re using built-in Windows Identity Framework with .NET Framework 4.5.1 • The problem is almost always associated with changing from RelyingParty#X over to RelyingParty#Y