authorization
authorization copied to clipboard
Auth engine rework
This PR adds many new classes and interfaces to unify authorization architecture with such from the server project. Also adds APIs from https://github.com/graphql-dotnet/server/pull/480 to build custom errors and messages.
Many classes are similar to those from ASP.NET Core (but not all). Of course, the project still does not have any dependencies from ASP.NET Core bits.
fixes #127 fixes #121
I'll need a little time to look at it. Hopefully I can do so tonight.
Codecov Report
Merging #128 (51de6ed) into master (46eaa4c) will increase coverage by
12.28%
. The diff coverage is90.43%
.
@@ Coverage Diff @@
## master #128 +/- ##
===========================================
+ Coverage 80.84% 93.12% +12.28%
===========================================
Files 10 17 +7
Lines 214 291 +77
Branches 32 42 +10
===========================================
+ Hits 173 271 +98
+ Misses 32 13 -19
+ Partials 9 7 -2
Impacted Files | Coverage Δ | |
---|---|---|
...raphQL.Authorization/AuthorizationPolicyBuilder.cs | 100.00% <ø> (+54.54%) |
:arrow_up: |
src/GraphQL.Authorization/AuthorizationError.cs | 62.50% <62.50%> (ø) |
|
...ation/Requirements/AuthenticatedUserRequirement.cs | 85.71% <66.66%> (+10.71%) |
:arrow_up: |
...ion/Requirements/ClaimsAuthorizationRequirement.cs | 86.53% <86.53%> (ø) |
|
...aphQL.Authorization/AuthorizationValidationRule.cs | 91.50% <87.83%> (-4.86%) |
:arrow_down: |
src/GraphQL.Authorization/AuthorizationFailure.cs | 100.00% <100.00%> (ø) |
|
src/GraphQL.Authorization/AuthorizationPolicy.cs | 100.00% <100.00%> (+14.28%) |
:arrow_up: |
...horization/AuthorizationPolicyBuilderExtensions.cs | 100.00% <100.00%> (ø) |
|
src/GraphQL.Authorization/AuthorizationResult.cs | 100.00% <100.00%> (ø) |
|
src/GraphQL.Authorization/AuthorizationSettings.cs | 100.00% <100.00%> (+66.66%) |
:arrow_up: |
... and 19 more |
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 46eaa4c...51de6ed. Read the comment docs.