All requests are always authenticated
See original GitHub issueI’m not sure if I am missing out something, I have checked thoroughly that I have added the MIDDLEWARE and AUTHENTICATION_BACKENDS correctly. I am using the @login_required decorator to protect a query that responds with user information if successful.
However, when I use the GraphQL interactive window to send an unauthenticated query, it responds back with a users info(superuser created using the model managers createsuperuser function). The interactive window has no provision to include the Authorization header, therefore this query should not resolve in the first place.
Below are some of my code snippets:
class UserType(DjangoObjectType):
class Meta:
model = get_user_model()
class Query(graphene.ObjectType):
me = graphene.Field(UserType)
@login_required
def resolve_me(self, info, **kwargs):
return info.context.user
Issue Analytics
- State:
- Created 4 years ago
- Comments:6
Top Results From Across the Web
spring security is authenticating all requests even though they ...
In case of public requests(the ones that are permitted and not to be authenticated), the JWTAuthenticationFilter will still be called, however, ...
Read more >Authenticating Requests (AWS Signature Version 4)
Every interaction with Amazon S3 is either authenticated or anonymous. This section explains request authentication with the AWS Signature Version 4 ...
Read more >[Feature Request] Define authentication setting on ... - GitHub
I now have to set the authentication settings on each request. But, because it's the same API, the settings are always the same....
Read more >What is Authentication? - TechTarget
The authentication process always comes before the authorization process. ... end-user application; that token is appended to every request from the client.
Read more >WWW-Authenticate - HTTP - MDN Web Docs
A server using HTTP authentication will respond with a 401 Unauthorized response to a request for a protected resource.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Make sure you are logged out of admin.
I’ve just setup backend, and didn’t prepared frontend. But yes, I will use localStorage.
On Mon, Mar 23, 2020, 8:20 AM assman notifications@github.com wrote: