claims-based-identity

What is the purpose of nameidentifier claim?

风格不统一 提交于 2019-11-28 17:42:30
What the claim of type http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier should be used for? This is the main question, and here are additional ones. How does it differ from http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name claim? Is it permanent for particular user as opposed to name claim? Is it globally-scoped or IdP-scoped? EBarr Name , is just that a name. If we're talking person, think "Eric"; a server "file01". A NameIdentifier is the ID for an object. Turning back to our person object, Eric's UserID might be 435 in your database. For the server the

Adding Claims-based authorization to MVC 3

僤鯓⒐⒋嵵緔 提交于 2019-11-28 17:18:38
I have an MVC app that I would like to add claims-based authorization to. In the near future we will use ADFS2 for federated identity but for now we will used forms auth locally. Has anyone seen a tutorial or blog post about the best way to use WIF without an external identity provider? I have seen the following but it is a year old now and I think there should be an easier solution: http://geekswithblogs.net/shahed/archive/2010/02/05/137795.aspx You can use WIF in MVC without an STS. I used the default MVC2 template, but it should work with MVC 3 too. You need to: 1- Plug WIF 's

Best Practices for Roles vs. Claims in ASP.NET Identity

左心房为你撑大大i 提交于 2019-11-28 13:56:43
问题 I am completely new to the use of claims in ASP.NETIdentity and want to get an idea of best practices in the use of Roles and/or Claims . After all this reading, I still have questions like... Q: Do we no longer use Roles? Q: If so, why are Roles still offered? Q: Should we only use Claims? Q: Should we use Roles & Claims together? My initial thought is that we "should" use them together. I see Claims as sub-categories to the Roles they support. FOR EXAMPLE: Role: Accounting Claims :

Transforming / Modifying claims in asp.net identity 2

泪湿孤枕 提交于 2019-11-28 05:13:37
问题 In Windows Identity Framework (WIF) you could implement a ClaimsAuthenticationManager in order to modify the claims on the principal or add new claims to it. The claims authentication manager provides an extensibility point in the application’s claims processing pipeline that you can use to validate, filter, modify, incoming claims or inject new claims into the set of claims presented by a ClaimsPrincipal before the RP application code is executed. Does ASP.net Identity 2 have any sort of

ASP.NET MVC 2 and authentication using WIF (Windows Identity Foundation)

夙愿已清 提交于 2019-11-28 04:33:13
Are there any decent examples of the following available: Looking through the WIF SDK , there are examples of using WIF in conjunction with ASP.NET using the WSFederationAuthenticationModule (FAM) to redirect to an ASP.NET site thin skin on top of a Security Token Service (STS) that user uses to authenticate (via supplying a username and password). If I understand WIF and claims-based access correctly, I would like my application to provide its own login screen where users provide their username and password and let this delegate to an STS for authentication, sending the login details to an

Anti-forgery token issue (MVC 5)

爱⌒轻易说出口 提交于 2019-11-28 02:58:31
I am having an issue with the anti-forgery token :( I have created my own User class which worked fine but now I am getting an error whenever I go to the /Account/Register page. The error is: A claim of type ' http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier ' or ' http://schemas.microsoft.com/accesscontrolservice/2010/07/claims/identityprovider ' was not present on the provided ClaimsIdentity. To enable anti-forgery token support with claims-based authentication, please verify that the configured claims provider is providing both of these claims on the ClaimsIdentity

Map tables using fluent api in asp.net MVC5 EF6?

一个人想着一个人 提交于 2019-11-27 23:33:45
问题 I am trying to add profile/Membership information into my MVC5 application and adding configuration mappings. I get the following error message: my.Models.IdentityUserLogin: : EntityType 'IdentityUserLogin' has no key defined. Define the key for this EntityType. my.Models.IdentityUserRole: : EntityType 'IdentityUserRole' has no key defined. Define the key for this EntityType. IdentityUserLogins: EntityType: EntitySet 'IdentityUserLogins' is based on type 'IdentityUserLogin' that has no keys

Embedded statement cannot be a declaration or labeled statement

吃可爱长大的小学妹 提交于 2019-11-27 20:59:37
I am trying to create a user using claim identity asp.net I get this error while creating claims identity user. ApplicationUser user = new ApplicationUser { EmailConfirmed = true, UserName = model.myUser.Email, Email = model.myUser.Email , PhoneNumber = model.myUser.PhoneNumber, PhoneNumberConfirmed = true, UserImagePath = model.myUser.UserImagePath, FirstName= model.myUser.FirstName, LastName = model.myUser.LastName, DateOfBirth = model.myUser.DateOfBirth, Culture = model.myUser.Culture, Role = model.myUser.Role }; but when the code was var user= new ApplicationUser { UserName = model.myUser

MVC 5 - Roles - IsUserInRole and Adding user to role

柔情痞子 提交于 2019-11-27 16:50:49
问题 In MVC4 i used Roles.IsUserInRole to check if a given user is in some role. However, with MVC5 i can't do it anymore... At first, it asked me to enable RoleManager at the web.config but then i discovered that microsoft moved away from Web.Security to Microsoft.AspNet.Identity. My question now is, with Microsoft.AspNet.Identity how do i do an action similar to Roles.IsUserInRole? And/or create a relation between the Role and the User. By the way, i'm still trying to understand the new

Explain “claims-based authentication” to a 5-year-old

一个人想着一个人 提交于 2019-11-27 16:37:35
Well, not exactly to a 5-year-old, but please avoid buzzword and enterprisespeak if possible. Claims-based authentication seems to be all the rage now, but I could not find a simple and down-to-earth explanation of what it actually is, how is it different from what we have now (I assume "what we have now" to be role-based authentication), what are the benefits of using it, etc. @Marnix has a pretty good answer, but to step away from the technical aspect of it: Claims Based Authentication is about defining who you trust to give you accurate information about identity, and only ever using that