Questions tagged [claims]

Claims were introduced in .NET4.5 to build Claims based authentication into the framework in the form of ClaimsIdentity and ClaimsPrincipal in the System.Security.Claims namespace.

Claims were introduced in .NET4.5 to build Claims based authentication into the framework in the form of ClaimsIdentity and ClaimsPrincipal in the System.Security.Claims namespace.

556 questions
12
votes
2 answers

Reuse Claim in regenerateIdentityCallback in Owin Identity in MVC5

I am using MVC5 with Owin identity. I am struggling to reuse any custom Claims in regenerateIdentityCallback. I have in Startup this configuration (as provided in the standard Template for new MVC project) app.UseCookieAuthentication(new…
Lukas K
  • 6,037
  • 4
  • 23
  • 31
12
votes
4 answers

Is there any way I can mock a Claims Principal in my ASP.NET MVC web application?

I've got some ASP.NET MVC controller code that checks if a user is authenticated and if so, it checks to see if it has a specific claim. Works fine. I've got some unit tests and I need to mock out an IPrincipal (which is easy to do) ... but I'm not…
Pure.Krome
  • 84,693
  • 113
  • 396
  • 647
11
votes
1 answer

Redirect loop with .Net MVC Authorize attribute with ADFS Claims

I have a problem configuring ADFS with my .Net MVC 5 app. I have configured my project in VS 2015 to use claims and it works ok, but I have an issue. I can sign in, ussing ADFS, I can check user roles etc. The problem occures when i try to use…
bunny1985
  • 762
  • 6
  • 21
10
votes
2 answers

(ClaimsIdentity) duplicate custom claims

From brockallen's article, He says that the "AuthenticateAsync() might be invoked multiple times" which could be the reason why the TransformAsync() is being called more than once (twice on my app). What I don't get is: When I construct…
jysummers
  • 649
  • 4
  • 16
10
votes
1 answer

Complex claims in JWT

The JWT RFC does not seem to have any problem containing complex arrays such as: { "email": "test@test.com", "businesses": [ { "businessId": "1", "businessName": "One", "roles": [ …
diegosasw
  • 13,734
  • 16
  • 95
  • 159
10
votes
1 answer

Claims Based Authentication - SharePoint and generally

All, I've been doing a lot of reading around Claims Based Authentication and am still a bit confused. I'm trying to solidify my understanding, specifically relating to SharePoint 2010/2013, but also generally (i.e. ASP.NET). My understanding of…
Michael Taylor
  • 103
  • 1
  • 7
10
votes
2 answers

Using ClaimsAuthenticationManager in a console application

I was playing around with new stuff in 4.5 and wrote a simple console application that is supposed to check a few things in new claims based security model. I've created custom implementations of ClaimsAuthorizationManager and…
emdzej
  • 165
  • 1
  • 8
9
votes
3 answers

Windows Azure Access Control & WPF?

Anyone has worked with Windows Azure Access Control & WPF Client? I like authentication of Zune Client with Live ID. I need authenticate with Windows Live ID in my WPF app. I have a Website that works with Windows Azure Acces Control , I use claims…
Ricardo Pons
  • 249
  • 1
  • 2
  • 8
9
votes
1 answer

Is claims based authorization appropriate for individual resources

I understand the usage of claims for things I would commonly refer to as "roles" or "permissions". I know that claims are more general, but from what I have seen in practice, it usually boils down to this: If user has this set of claims they can…
BlakeH
  • 3,354
  • 2
  • 21
  • 31
9
votes
2 answers

MVC 5 - Add a claim to a user

I am developing a MVC 5 internet application and am using Identity 2.1. How can I add a claim to a user, after the user has logged in, where I knows the username? Here is what I have: public void AddClaimToUser(string userName, string type, string…
Simon
  • 7,991
  • 21
  • 83
  • 163
8
votes
2 answers

Can NameIdentifier and IdentityProvider (WIF) claims be used to uniquely identify any user?

Thinking of using Access Control Service (ACS) and Windows Identity Foundation (WIF) to secure my WCF Data Services Web API application. How can I use claims to uniquely identify a user? My idea is to use the combination of the standard claim…
noopman
  • 660
  • 1
  • 4
  • 15
8
votes
1 answer

ASP.Net Identity and IdentityServer4 Claims

I'm using IdentityServer4 as an OIDC provider and ASP.NET Core 2.0. I have gone through several posts to ensure that the claims issued by IdentityServer end up in the ClaimsPrincipal (ie Auth Cookie), and have managed to get this working with…
Simon
  • 136
  • 1
  • 3
8
votes
2 answers

Is ASP.NET Core Identity needed for Intranet app using Windows Authentication

Using Windows Authentication in an Intranet web application I want to achieve the following: Gather additional attributes from AD (name, employee number) Gather additional attributes from a database table (working hours, pay) Authorize based on…
7
votes
3 answers

Additional Claims Missing in asp.net core Identity after 30 minutes

I am adding claims to the Claims Principal Identity and signing the user in. On subsequent requests, the added claims are available in the Claims Principal anywhere in the application, but only for 25 minutes. I haven't tested between 25 and 30…
7
votes
4 answers

How to deal with concurrency failure on IdentityUser update?

I have a method to update user claims within our app. I am logged as an admin user who can edit other users. I am trying to remove existing claims of one user and assign new ones. When removing claims using UserManger I am getting ConcurrencyFailure…
1
2
3
37 38