Skip to content
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

Merged
merged 22 commits into from
Jun 27, 2024
Merged

Step up v2 #135

merged 22 commits into from
Jun 27, 2024

Conversation

jrmccannon
Copy link
Contributor

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.

@jrmccannon jrmccannon requested a review from a team as a code owner June 18, 2024 18:44
Copy link

codecov bot commented Jun 18, 2024

Codecov Report

Attention: Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.

Project coverage is 60.31%. Comparing base (7311cc9) to head (e1dd0ad).

Files Patch % Lines
src/Passwordless/Models/VerifiedUser.cs 0.00% 2 Missing ⚠️
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.
📢 Have feedback on the report? Share it here.

@jrmccannon jrmccannon requested review from jonashendrickx and a team June 25, 2024 15:16

public class StepUpAuthorizationHandler(StepUpPurpose stepUpPurpose, TimeProvider timeProvider) : AuthorizationHandler<IStepUpAuthorizationRequirement>
{
protected override Task HandleRequirementAsync(AuthorizationHandlerContext context, IStepUpAuthorizationRequirement requirement)
Copy link
Member

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.

@jrmccannon jrmccannon merged commit 3efd092 into main Jun 27, 2024
7 checks passed
@jrmccannon jrmccannon deleted the step-up-v2 branch June 27, 2024 19:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants