Comments (6)
Currently this is not supported but with should be doable with the 3.0 version
from server.
You could probably do it with a middleware if you add the token as query string to the connection request. That seems to be the way SignalR solved the authentication problem.
from server.
This was a big issue on our side too.
To help to overcome this, I have hacked a lot into the code, and I do hate the way it is right now, but it is working fine. I think there are much better ways to do it, but if you'd like to see a solution, I can put a fork online with my hacks in it.
from server.
3.0 will allow setting message listeners. You should be able to check the payload and close the reader if it doesn't contain what you want. You can also send a reply to the client.
from server.
- Inherit from https://github.com/graphql-dotnet/server/blob/master/src/Transports.Subscriptions.Abstractions/IOperationMessageListener.cs
- Apply your authorization
- Write your reply using the writer or just complete the reader which should close the connection
from server.
Closing this. Please feel free to reopen if you have any questions.
from server.
Related Issues (20)
- Using Altair UI while not connected to the internet HOT 3
- How to use plugins in Altair? HOT 6
- Duende Identity Server 4 / GraphQl Authorize - Always error 403 HOT 16
- Missing classes while upgrading to GraphQL.Server.All from GraphQL.Server.* libraries HOT 11
- Disable ReadFormOnPost by default
- Add CSRF protection
- Content Security Policy and CDN Scripts HOT 8
- I'm attempting to implement a dual authentication scheme and I'm wondering whether it's feasible. If it is possible, could you assist me by pointing out any mistakes I might be making? HOT 13
- Invalid HTML HOT 2
- Could not load type 'GraphQL.Server.Transports.AspNetCore.IGraphQLRequestDeserializer' from assembly HOT 2
- Limit number of queries in batch request
- Return 406 on unsupported Accept header
- Come up with something for comments about Accept header
- Question: Extensibility to use other transport protocol? HOT 5
- Question about upgrading from 6xx to 7xx: VoyagerOptions HOT 4
- Subscriptions set-up netcore 6.0, GraphQL 7.1.1 HOT 6
- HttpStatus Code on GRAPHQL_VALIDATION error HOT 7
- Is there a way to change the status code of the authorization extension from 400 to 401? HOT 11
- Validation rules and Policies errors after update to v7 HOT 11
- .net core 7 AddAuthorizationRule not work HOT 29
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from server.