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

Method 'ValidateAsync' in type 'GraphQL.Authorization.AuthorizationValidationRule' from assembly 'GraphQL.Authorization, Version=4.0.0.0 #220

Closed
dannykruitbosch opened this issue May 9, 2022 · 7 comments
Labels
dependencies Pull requests that update a dependency file

Comments

@dannykruitbosch
Copy link

Hi,

I'm trying to use the authorization features, but run into this issue when using version 4.0.0 of the authorization package and version 6.0.0 of GraphQL.
When I want to start my server app, I get the following error message:
Method 'ValidateAsync' in type 'GraphQL.Authorization.AuthorizationValidationRule' from assembly 'GraphQL.Authorization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=null' does not have an implementation.

Am I missing some dependency? Or are these versions not (yet) compatible?

@sungam3r
Copy link
Member

sungam3r commented May 9, 2022

v5 auth package required - #180 .

and version 6.0.0 of GraphQL.

GraphQL server I think (not a GraphQL.NET itself with latest version 5.2.0).

@dannykruitbosch
Copy link
Author

Any ETA on v5 auth package?

@Shane32
Copy link
Member

Shane32 commented May 10, 2022

I rewrote the Server project's auth library recently, with support for anonymous fields, roles, policies, fields skipped or included via directives, and so on. It is based on the ASP.NET Core authorization and authentication design and works with requests over WebSockets as well. One limitation it has is that it does not perform authorization checks on input graph types. You can get it here: https://github.com/Shane32/GraphQL.AspNetCore3

The Server auth library is "v5 compatible" but has not yet been updated to work with any of those new features, and no authentication support for connections over WebSockets. As @sungam3r noted, this project's compatibility update is tracked in #180 - I do not know the status.

@dannykruitbosch Do you host your GraphQL implementation using the GraphQL Server library on ASP.NET Core? Out of curiosity, why did you choose to use this authentication library over the one within the server project?

@sungam3r
Copy link
Member

@Shane32 I merged master into develop, resolved conflicts and I'm ready to release v5 today after your review of #180.

@sungam3r
Copy link
Member

Any ETA on v5 auth package?

Today 😉

@dannykruitbosch
Copy link
Author

I rewrote the Server project's auth library recently, with support for anonymous fields, roles, policies, fields skipped or included via directives, and so on. It is based on the ASP.NET Core authorization and authentication design and works with requests over WebSockets as well. One limitation it has is that it does not perform authorization checks on input graph types. You can get it here: https://github.com/Shane32/GraphQL.AspNetCore3

The Server auth library is "v5 compatible" but has not yet been updated to work with any of those new features, and no authentication support for connections over WebSockets. As @sungam3r noted, this project's compatibility update is tracked in #180 - I do not know the status.

@dannykruitbosch Do you host your GraphQL implementation using the GraphQL Server library on ASP.NET Core? Out of curiosity, why did you choose to use this authentication library over the one within the server project?

Hi, don't know really. I am a bit confused on what to use. I don't think it's that clear from the documentation on what to use in which situation. Today I've updated all my dependencies and switched to the one in the server project. It works now ;)

@sungam3r
Copy link
Member

@sungam3r sungam3r added the dependencies Pull requests that update a dependency file label May 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

No branches or pull requests

3 participants