{"action":"created","issue":{"url":"https://api.github.com/repos/graphql-dotnet/server/issues/102","repository_url":"https://api.github.com/repos/graphql-dotnet/server","labels_url":"https://api.github.com/repos/graphql-dotnet/server/issues/102/labels{/name}","comments_url":"https://api.github.com/repos/graphql-dotnet/server/issues/102/comments","events_url":"https://api.github.com/repos/graphql-dotnet/server/issues/102/events","html_url":"https://github.com/graphql-dotnet/server/issues/102","id":310639381,"number":102,"title":"UserContext or authorization for WebSockets?","user":{"login":"joshkel","id":476338,"avatar_url":"https://avatars1.githubusercontent.com/u/476338?v=4","gravatar_id":"","url":"https://api.github.com/users/joshkel","html_url":"https://github.com/joshkel","followers_url":"https://api.github.com/users/joshkel/followers","following_url":"https://api.github.com/users/joshkel/following{/other_user}","gists_url":"https://api.github.com/users/joshkel/gists{/gist_id}","starred_url":"https://api.github.com/users/joshkel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joshkel/subscriptions","organizations_url":"https://api.github.com/users/joshkel/orgs","repos_url":"https://api.github.com/users/joshkel/repos","events_url":"https://api.github.com/users/joshkel/events{/privacy}","received_events_url":"https://api.github.com/users/joshkel/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2018-04-02T23:04:00Z","updated_at":"2018-04-23T07:55:06Z","closed_at":null,"author_association":"NONE","body":"I saw in [this comment](https://github.com/graphql-dotnet/server/issues/70#issuecomment-373757518) how to implement authentication. That's more or less working, but how do I implement authorization (determining whether a user is actually authorized for a particular subscription)?\r\n\r\nFor my HTTP requests, my controller code sets the GraphQL UserContext with user information that my Query and Mutation objects can then use. (I'm using my own controller code instead of GraphQL .NET Server's HTTP middleware.) However, for WebSockets, I don't see any way for a IOperationMessageListener to access or set a context for the Query/Mutation/Subscription objects to use.\r\n\r\nIdeas or suggestions?\r\n\r\nThanks!"},"comment":{"url":"https://api.github.com/repos/graphql-dotnet/server/issues/comments/383486927","html_url":"https://github.com/graphql-dotnet/server/issues/102#issuecomment-383486927","issue_url":"https://api.github.com/repos/graphql-dotnet/server/issues/102","id":383486927,"user":{"login":"pekkah","id":822416,"avatar_url":"https://avatars2.githubusercontent.com/u/822416?v=4","gravatar_id":"","url":"https://api.github.com/users/pekkah","html_url":"https://github.com/pekkah","followers_url":"https://api.github.com/users/pekkah/followers","following_url":"https://api.github.com/users/pekkah/following{/other_user}","gists_url":"https://api.github.com/users/pekkah/gists{/gist_id}","starred_url":"https://api.github.com/users/pekkah/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pekkah/subscriptions","organizations_url":"https://api.github.com/users/pekkah/orgs","repos_url":"https://api.github.com/users/pekkah/repos","events_url":"https://api.github.com/users/pekkah/events{/privacy}","received_events_url":"https://api.github.com/users/pekkah/received_events","type":"User","site_admin":false},"created_at":"2018-04-23T07:55:06Z","updated_at":"2018-04-23T07:55:06Z","author_association":"CONTRIBUTOR","body":"Merged the changes. The sample now has an example."}}
{"actor":{"display_login":"pekkah"}}