Questions tagged [claims-authentication]
43 questions
0
votes
0 answers
How to allow all resources to one role in claims authorization without the need to add it to all the Web api Authorize attribute
I have implemented claims based role authorization in my .net Core application.
Everything is working fine. I decorate my web api's like this and they work perfectly
[Authorize(Roles = "Admin, GlobalEditor, RegionalEditor")]
The only problem is…

Pawan Nogariya
- 8,330
- 12
- 52
- 105
0
votes
0 answers
How to grant access to all pages in the site according to its user role?
My requirement is admin user can grant other users to access number of pages in the site.
Users and their assigned page stores in database like following format.
ID
User ID
ClaimType
Page
1
1
Test
Test.cshtml
I'm trying to achieve this…

sarang lad
- 25
- 4
0
votes
1 answer
Problem with saving Claim in Blazor Server
I have a problem with storing Claims when I use @context.User.Identity.Name to retrieve the value but it cannot be found. I have tried every method but it remains the same. I don't know where I went wrong. This code generates a Jwt Token in the…

Ongarj
- 1
- 2
0
votes
1 answer
element not showing in UI: Azure AD B2C custom policy
I am trying to customize the signin page.
My problem is the follwoing. In the sign in page, I need to have a dropdown so the user can select the preferred MFA method.
However, as you can see, there is no dropdown, and when the user introduces…

myself
- 103
- 7
0
votes
0 answers
Retrieving claim value for current logged in user
I have an ASP.Net web form application that users can register to. In the registration process, some user details are stored as claims, the MemberApproved variable is used to check the approval status of a user, it is set to "No" when the user is…

AM_MA
- 37
- 7
0
votes
1 answer
Azure AD Directory Extensions claims missing
I have added about 18 extension claims to my access token. Based on the application state you may get different claims from this list. I'm sure that those claims have some values assigned. But for some reason, I'm not receiving all of them as part…

Oleksandr Humeniuk
- 11
- 1
0
votes
0 answers
automatically fill SecurityContext from Authorization header from Spring security authorization
I have this filter to read the token from the http header and set the security context :
public class AuthorizationFilter extends OncePerRequestFilter {
@Override
protected void doFilterInternal(HttpServletRequest request,…

Fahimeh Rahmatipoor
- 93
- 1
- 10
0
votes
1 answer
Firebase custom claims returns Object is possibly 'undefined'
I am trying to read the user's custom claims and I would like to return the values of the claims to the client individually.
This code has worked for months. However, all of a sudden it returns the error "Object is possibly undefined".
This code…

devOP1
- 295
- 3
- 13
0
votes
2 answers
How to dynamically loaded claims for a client, not user, IdentityServer?
I am wondering if/how I can dynamically loaded claims for a client (instead of a user) under IdentityServer4. For my MVC client apps, I can use IdentityServer4's IProfileService API to dynamically load claims for a user, and that works great. But I…

Alexu
- 1,015
- 2
- 12
- 32
0
votes
1 answer
How to set path for authentication cookie
In ASP.NET Core 6 MVC multi-tenant application tenants have different path base like /tenant1 and /tenant2.
Middleware sets HttpContext PathBase from request url.
SignInAsync method always sets authentication cookie path to the root path /.
I'm…

Andrus
- 26,339
- 60
- 204
- 378
0
votes
0 answers
How to manually generate authentication cookie in asp.net core?
I want to manually generate the authentication cookie string on the server side, that is generated by ASP .NET core when you have setup cookie authentication middleware and you sign-in the user using SignInAsync(this HttpContext context, string?…

devanalyst
- 1,348
- 4
- 28
- 55
0
votes
0 answers
can someone please explain to me the main role of claim in .net core in details and how to get information from claim?
I created a policy and I need to check data in my handler,
for example userId and companyId ...
so from the claim principal named user, I need to get information from it so please how can I do that
addscraningHandler :
public class…

junior
- 1
- 5
0
votes
1 answer
I need all users details from ADFS using c# in single outgoing claim
hi I created the custom claim for that so please check the below claim which is created by me:
c:[Type == "http://schemas.microsoft.com/ws/2008/06/identity/claims/windowsaccountname", Issuer == "AD AUTHORITY"] =] issue(store = "Active Directory",…

Bhavdip
- 44
- 1
- 9
0
votes
0 answers
Postman + NTLM Authentication + Authorization with claims + ASP.NET Core API = 403 Forbidden
We have an ASP.NET Core API that uses Windows Authentication and Claim based identity.
The API has one Controller with multiple Actions. The Actions have different authorization policies.
[Authorize(Policy = "Read")]
[HttpGet]
public async…

Martijn
- 739
- 9
- 26
0
votes
2 answers
WIF Based Authentication Does Not Contact STS Issuer
I am attempting to build an asp.net 4.7 (v4.5 WIF) using claims based authentication against our internal STS server. We have older working .Net apps (< 4.5) that can successfully get claims.
The issue is that the new app never contacts the STS…

ΩmegaMan
- 29,542
- 12
- 100
- 122