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

Bug/273 #291

Merged
merged 7 commits into from
Dec 23, 2020
Merged

Bug/273 #291

merged 7 commits into from
Dec 23, 2020

Conversation

egil
Copy link
Member

@egil egil commented Dec 19, 2020

Pull request description

Fixes #273

PR meta checklist

  • Pull request is targeting at DEV branch.
  • Pull request is linked to all related issues, if any.
  • I have read the CONTRIBUTING.md document.

Content checklist

  • My code follows the code style of this project and AspNetCore coding guidelines.
  • My change requires a change to the documentation.
    • I have updated the documentation accordingly.
  • I have updated the appropriate sub section in the CHANGELOG.md.
  • I have added, updated or removed tests to according to my changes.
    • All tests passed.

@egil egil changed the base branch from main to dev December 19, 2020 15:55
@codecov
Copy link

codecov bot commented Dec 19, 2020

Codecov Report

Merging #291 (5f11b6f) into dev (0b7692c) will decrease coverage by 0.09%.
The diff coverage is 84.61%.

Impacted file tree graph

@@            Coverage Diff             @@
##              dev     #291      +/-   ##
==========================================
- Coverage   82.74%   82.65%   -0.10%     
==========================================
  Files         126      124       -2     
  Lines        3710     3695      -15     
  Branches      481      479       -2     
==========================================
- Hits         3070     3054      -16     
- Misses        492      493       +1     
  Partials      148      148              
Impacted Files Coverage Δ
src/bunit.core/ComponentParameter.cs 95.00% <ø> (ø)
src/bunit.web/JSInterop/BunitJSInterop.cs 100.00% <ø> (ø)
src/bunit.core/TestServiceProvider.cs 93.22% <60.00%> (-3.15%) ⬇️
...s/Authorization/FakeAuthenticationStateProvider.cs 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0b7692c...5f11b6f. Read the comment docs.

@egil egil linked an issue Dec 19, 2020 that may be closed by this pull request
@egil
Copy link
Member Author

egil commented Dec 19, 2020

@DarthPedro I think I have found the problem.

When we called this ClaimsPrincipal ctor it actually throws away our FakePrincple and creates its own.

I have changed the code in this PR to just use the ClaimsIdentity and ClaimsPrinciple instead, and it seems to work correctly, with the new and existing tests.

Can you give this a quick look over and see if I have missed anything?

@egil egil self-assigned this Dec 19, 2020
@egil egil added the bug Something isn't working label Dec 19, 2020
@DarthPedro
Copy link
Contributor

Hi @egil,
Yes, I think that change looks good. Thanks for finding the problem.

@egil egil merged commit b564a6a into dev Dec 23, 2020
@egil egil deleted the bug/273-auth branch December 23, 2020 08:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Auth IsInRole doesnt work with fake authentication
2 participants