-
Notifications
You must be signed in to change notification settings - Fork 100
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
InputType Factory and Security #325
Comments
Is it a valid situation for this mutation to be called without a User? If yes, maybe it makes more sense to create another mutation for that. If no, why isn't your auth throwing a 401 before this factory is initialized? |
Why should it be mandatory to have always a user logged in? It can be useful to inject null whether the user is not logged. In this example in particular, it the mutation have the user param as mandatory. The problem is not my auth that doesn't throw a 401, the problem is that |
I'm not familiar with the internals of the user injection annotation. Personally, I'm not a huge fan of this functionality at all. Regardless, I did notice that your |
Maybe I missed that I'm using this one with symfony and GraphQLite official bundle. Anyway, I did not try without because it should be thrown a 401 before accessing this method by design. I am not calling the factory method by myself, it's the bundle that is calling it |
Well, if you want a Maybe someone else can chime in on this one. I'd love nothing more than to remove this annotation, personally. Auth shouldn't be a part of this library as I see it. |
I don't want a null value there. It's GraphQLite that prior to anything tries to set that value (in the case of anon. users) to null.
Auth is handled on every request.
Very kind way to support users, thank you. My code is just ok. I'm just asking why this is happening and whether this is the expected behaviour or not. |
This is simply my opinion. I think if you're relying on As for the |
Closing this issue as there hasn't been any further discussion. |
Hello there,
thank you for this library!
Just a quick question:
I got a controller for which I created an InputType and relative Factory.
In the factory I pass all the mutation data and return the well formed constructed InputType.
I would like to move the user injection into directly the factory, so I used
@GQL\InjectUser
annotation into my factory like this:This works well while I got a logged in user. If not, I got a PHP failure because the
createSomething
method does not acceptnull
for$user
parameter.I tried using
@Logged
,@Right
and@Security
annotations but seems not working.Am I missing something?
The text was updated successfully, but these errors were encountered: