-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Step up v2 #135
Step up v2 #135
Conversation
…ks. Showing claims on hello world to show which claims the user has.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #135 +/- ##
==========================================
- Coverage 60.40% 60.31% -0.10%
==========================================
Files 43 43
Lines 639 640 +1
Branches 55 55
==========================================
Hits 386 386
- Misses 248 249 +1
Partials 5 5 ☔ View full report in Codecov by Sentry. |
tests/Passwordless.AspNetCore.Tests/OldTests/PasswordlessServiceTests.cs
Outdated
Show resolved
Hide resolved
examples/Passwordless.AspNetIdentity.Example/Authorization/StepUpAuthorizationHandler.cs
Outdated
Show resolved
Hide resolved
examples/Passwordless.AspNetIdentity.Example/Pages/Account/Recovery.cshtml.cs
Outdated
Show resolved
Hide resolved
|
||
public class StepUpAuthorizationHandler(StepUpPurpose stepUpPurpose, TimeProvider timeProvider) : AuthorizationHandler<IStepUpAuthorizationRequirement> | ||
{ | ||
protected override Task HandleRequirementAsync(AuthorizationHandlerContext context, IStepUpAuthorizationRequirement requirement) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might not be correct, usually you want a specific permission here that is required, and do the step up procedure separately to add the claim to your token which then validates afterwards if you have a specific claim I think.
This will add Purpose to the Verify User model to be used with sign in and step up. It also adds functionality to the sample app for step up, magic links, and manually generated tokens.