forked from ChilliCream/graphql-platform
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed target framework for the authorization package
- Loading branch information
1 parent
535646b
commit 76554a5
Showing
12 changed files
with
193 additions
and
19 deletions.
There are no files selected for viewing
41 changes: 23 additions & 18 deletions
41
...late/AspNetCore/src/AspNetCore.Authorization/HotChocolate.AspNetCore.Authorization.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,23 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<PackageId>HotChocolate.AspNetCore.Authorization</PackageId> | ||
<AssemblyName>HotChocolate.AspNetCore.Authorization</AssemblyName> | ||
<RootNamespace>HotChocolate.AspNetCore.Authorization</RootNamespace> | ||
<Description>Contains the Hot Chocolate GraphQL middleware for ASP .Net core.</Description> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\..\..\Core\src\Core\HotChocolate.Core.csproj" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<FrameworkReference Include="Microsoft.AspNetCore.App" /> | ||
</ItemGroup> | ||
|
||
</Project> | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<TargetFrameworks>$(LibraryTargetFrameworks)</TargetFrameworks> | ||
</PropertyGroup> | ||
|
||
<PropertyGroup> | ||
<PackageId>HotChocolate.AspNetCore.Authorization</PackageId> | ||
<AssemblyName>HotChocolate.AspNetCore.Authorization</AssemblyName> | ||
<RootNamespace>HotChocolate.AspNetCore.Authorization</RootNamespace> | ||
<Description>Contains the Hot Chocolate GraphQL middleware for ASP .Net core.</Description> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\..\..\Core\src\Core\HotChocolate.Core.csproj" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="3.1.0" /> | ||
<PackageReference Include="Microsoft.AspNetCore.Authorization" Version="3.1.0" /> | ||
</ItemGroup> | ||
|
||
</Project> |
17 changes: 17 additions & 0 deletions
17
...re.Authorization.Tests/__snapshots__/AuthorizeDirectiveTests.FieldAuth_DefaultPolicy.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
schema { | ||
query: Query | ||
} | ||
|
||
type Query { | ||
foo: String @authorize(apply: BEFORE_RESOLVER) | ||
} | ||
|
||
enum ApplyPolicy { | ||
BEFORE_RESOLVER | ||
AFTER_RESOLVER | ||
} | ||
|
||
directive @authorize("The name of the authorization policy that determines access to the annotated resource." policy: String "Roles that are allowed to access the annotated resource." roles: [String!] "Defines when when the resolver shall be executed.By default the resolver is executed after the policy has determined that the current user is allowed to access the field." apply: ApplyPolicy! = BEFORE_RESOLVER) repeatable on SCHEMA | OBJECT | FIELD_DEFINITION | ||
|
||
"The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text." | ||
scalar String |
17 changes: 17 additions & 0 deletions
17
...on.Tests/__snapshots__/AuthorizeDirectiveTests.FieldAuth_DefaultPolicy_AfterResolver.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
schema { | ||
query: Query | ||
} | ||
|
||
type Query { | ||
foo: String @authorize(apply: AFTER_RESOLVER) | ||
} | ||
|
||
enum ApplyPolicy { | ||
BEFORE_RESOLVER | ||
AFTER_RESOLVER | ||
} | ||
|
||
directive @authorize("The name of the authorization policy that determines access to the annotated resource." policy: String "Roles that are allowed to access the annotated resource." roles: [String!] "Defines when when the resolver shall be executed.By default the resolver is executed after the policy has determined that the current user is allowed to access the field." apply: ApplyPolicy! = BEFORE_RESOLVER) repeatable on SCHEMA | OBJECT | FIELD_DEFINITION | ||
|
||
"The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text." | ||
scalar String |
17 changes: 17 additions & 0 deletions
17
...n.Tests/__snapshots__/AuthorizeDirectiveTests.FieldAuth_DefaultPolicy_BeforeResolver.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
schema { | ||
query: Query | ||
} | ||
|
||
type Query { | ||
foo: String @authorize(apply: BEFORE_RESOLVER) | ||
} | ||
|
||
enum ApplyPolicy { | ||
BEFORE_RESOLVER | ||
AFTER_RESOLVER | ||
} | ||
|
||
directive @authorize("The name of the authorization policy that determines access to the annotated resource." policy: String "Roles that are allowed to access the annotated resource." roles: [String!] "Defines when when the resolver shall be executed.By default the resolver is executed after the policy has determined that the current user is allowed to access the field." apply: ApplyPolicy! = BEFORE_RESOLVER) repeatable on SCHEMA | OBJECT | FIELD_DEFINITION | ||
|
||
"The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text." | ||
scalar String |
17 changes: 17 additions & 0 deletions
17
...tCore.Authorization.Tests/__snapshots__/AuthorizeDirectiveTests.FieldAuth_WithPolicy.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
schema { | ||
query: Query | ||
} | ||
|
||
type Query { | ||
foo: String @authorize(policy: "MyPolicy", apply: BEFORE_RESOLVER) | ||
} | ||
|
||
enum ApplyPolicy { | ||
BEFORE_RESOLVER | ||
AFTER_RESOLVER | ||
} | ||
|
||
directive @authorize("The name of the authorization policy that determines access to the annotated resource." policy: String "Roles that are allowed to access the annotated resource." roles: [String!] "Defines when when the resolver shall be executed.By default the resolver is executed after the policy has determined that the current user is allowed to access the field." apply: ApplyPolicy! = BEFORE_RESOLVER) repeatable on SCHEMA | OBJECT | FIELD_DEFINITION | ||
|
||
"The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text." | ||
scalar String |
17 changes: 17 additions & 0 deletions
17
...ation.Tests/__snapshots__/AuthorizeDirectiveTests.FieldAuth_WithPolicy_AfterResolver.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
schema { | ||
query: Query | ||
} | ||
|
||
type Query { | ||
foo: String @authorize(policy: "MyPolicy", apply: AFTER_RESOLVER) | ||
} | ||
|
||
enum ApplyPolicy { | ||
BEFORE_RESOLVER | ||
AFTER_RESOLVER | ||
} | ||
|
||
directive @authorize("The name of the authorization policy that determines access to the annotated resource." policy: String "Roles that are allowed to access the annotated resource." roles: [String!] "Defines when when the resolver shall be executed.By default the resolver is executed after the policy has determined that the current user is allowed to access the field." apply: ApplyPolicy! = BEFORE_RESOLVER) repeatable on SCHEMA | OBJECT | FIELD_DEFINITION | ||
|
||
"The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text." | ||
scalar String |
17 changes: 17 additions & 0 deletions
17
...tion.Tests/__snapshots__/AuthorizeDirectiveTests.FieldAuth_WithPolicy_BeforeResolver.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
schema { | ||
query: Query | ||
} | ||
|
||
type Query { | ||
foo: String @authorize(policy: "MyPolicy", apply: BEFORE_RESOLVER) | ||
} | ||
|
||
enum ApplyPolicy { | ||
BEFORE_RESOLVER | ||
AFTER_RESOLVER | ||
} | ||
|
||
directive @authorize("The name of the authorization policy that determines access to the annotated resource." policy: String "Roles that are allowed to access the annotated resource." roles: [String!] "Defines when when the resolver shall be executed.By default the resolver is executed after the policy has determined that the current user is allowed to access the field." apply: ApplyPolicy! = BEFORE_RESOLVER) repeatable on SCHEMA | OBJECT | FIELD_DEFINITION | ||
|
||
"The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text." | ||
scalar String |
17 changes: 17 additions & 0 deletions
17
...etCore.Authorization.Tests/__snapshots__/AuthorizeDirectiveTests.FieldAuth_WithRoles.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
schema { | ||
query: Query | ||
} | ||
|
||
type Query { | ||
foo: String @authorize(roles: [ "MyRole" ], apply: BEFORE_RESOLVER) | ||
} | ||
|
||
enum ApplyPolicy { | ||
BEFORE_RESOLVER | ||
AFTER_RESOLVER | ||
} | ||
|
||
directive @authorize("The name of the authorization policy that determines access to the annotated resource." policy: String "Roles that are allowed to access the annotated resource." roles: [String!] "Defines when when the resolver shall be executed.By default the resolver is executed after the policy has determined that the current user is allowed to access the field." apply: ApplyPolicy! = BEFORE_RESOLVER) repeatable on SCHEMA | OBJECT | FIELD_DEFINITION | ||
|
||
"The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text." | ||
scalar String |
17 changes: 17 additions & 0 deletions
17
...ore.Authorization.Tests/__snapshots__/AuthorizeDirectiveTests.TypeAuth_DefaultPolicy.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
schema { | ||
query: Query | ||
} | ||
|
||
type Query @authorize(apply: BEFORE_RESOLVER) { | ||
foo: String | ||
} | ||
|
||
enum ApplyPolicy { | ||
BEFORE_RESOLVER | ||
AFTER_RESOLVER | ||
} | ||
|
||
directive @authorize("The name of the authorization policy that determines access to the annotated resource." policy: String "Roles that are allowed to access the annotated resource." roles: [String!] "Defines when when the resolver shall be executed.By default the resolver is executed after the policy has determined that the current user is allowed to access the field." apply: ApplyPolicy! = BEFORE_RESOLVER) repeatable on SCHEMA | OBJECT | FIELD_DEFINITION | ||
|
||
"The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text." | ||
scalar String |
17 changes: 17 additions & 0 deletions
17
...etCore.Authorization.Tests/__snapshots__/AuthorizeDirectiveTests.TypeAuth_WithPolicy.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
schema { | ||
query: Query | ||
} | ||
|
||
type Query @authorize(policy: "MyPolicy", apply: BEFORE_RESOLVER) { | ||
foo: String | ||
} | ||
|
||
enum ApplyPolicy { | ||
BEFORE_RESOLVER | ||
AFTER_RESOLVER | ||
} | ||
|
||
directive @authorize("The name of the authorization policy that determines access to the annotated resource." policy: String "Roles that are allowed to access the annotated resource." roles: [String!] "Defines when when the resolver shall be executed.By default the resolver is executed after the policy has determined that the current user is allowed to access the field." apply: ApplyPolicy! = BEFORE_RESOLVER) repeatable on SCHEMA | OBJECT | FIELD_DEFINITION | ||
|
||
"The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text." | ||
scalar String |
17 changes: 17 additions & 0 deletions
17
...NetCore.Authorization.Tests/__snapshots__/AuthorizeDirectiveTests.TypeAuth_WithRoles.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
schema { | ||
query: Query | ||
} | ||
|
||
type Query @authorize(roles: [ "MyRole" ], apply: BEFORE_RESOLVER) { | ||
foo: String | ||
} | ||
|
||
enum ApplyPolicy { | ||
BEFORE_RESOLVER | ||
AFTER_RESOLVER | ||
} | ||
|
||
directive @authorize("The name of the authorization policy that determines access to the annotated resource." policy: String "Roles that are allowed to access the annotated resource." roles: [String!] "Defines when when the resolver shall be executed.By default the resolver is executed after the policy has determined that the current user is allowed to access the field." apply: ApplyPolicy! = BEFORE_RESOLVER) repeatable on SCHEMA | OBJECT | FIELD_DEFINITION | ||
|
||
"The `String` scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text." | ||
scalar String |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters