Disallow bindings from other sources on optional claim binding.
See original GitHub issueSo i want to bind the role from claim like this:
[FromClaim(claimType: ClaimTypes.Role, false)]
public string? Role { get; set; }
My goal is to do something role related if you have one. In the swagger document i got this: I dont want to bind the role from quary or other source, but i want it to be optional (some users dont have any role), thus the request returns a 400. I found this on the documantation: Is there a way to disable higher priority binding soruces for this property? Link: https://fast-endpoints.com/docs/model-binding#from-user-claims
Issue Analytics
- State:
- Created a year ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
Azure AD v2.0-specific optional claims missing from ID Token
I've tried different code examples using the claims principal to try and get the values out, but nothing is working for me. Hoping...
Read more >Redirecting Assembly Versions - .NET Framework
Redirect compile-time binding references to different versions of .NET assemblies, third-party assemblies, or your own app's assemblies.
Read more >Issue #2 · tc39/proposal-optional-catch-binding
But I am not doing some other possibly-throwing operation in the same try block. I'm not trying to claim we should always discard...
Read more >Bind serial issues
If deselected, no bound volume will be created upon binding of the binding unit. Local Holding Record – Determines where the bound volume...
Read more >Selector-Label Volume Binding - Configuring Persistent Storage
This guide provides the steps necessary to enable binding of persistent volume claims (PVCs) to persistent volumes (PVs) via selector and label attributes....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
since swagger is a different universe, you’re gonna need a custom operation processor like this:
register it at startup like this:
I did almost the same thing with RequestBinder. I already started seaching a config to add request binder globally. Binding modifier is exactly what im looking for. Ty 😃