-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(GraphQL): Adds auth for subscriptions (#5984)
* removed log info * added missing functions in auth.go * resolved merge issues * added authvariable code for subscriptions * removed a print statement * removed authvariable function and changed it's occurences * resolved review comments * replaced gophers library to our own * added test * Fix build error by using latest version of dgraph-io/graphql-transport-ws * Fix the audience unit tests * Fix formatting * fix for subscription withou auth * fixed subscription error * added auth test * resolved pawan's comments. * latest code. * Delete p,w and zw from checked in code * Use jwt.At function so that time.IsZero returns correctly * modified test * Complete the test * Add another test cases to check subscription ends after JWT expires * added test for multiple subscriptions * added test for multiple subscriptions with different jw data * clean code * modified subscriptions test * Fix the test * addresses review comments. * edited few comments * Remove subscriptionID from subscriber * Run go mod tidy to fix the go.mod and go.sum files * Clean up some code * Revert "Clean up some code" This reverts commit 3922649. * Fix failures in custom logic test * fixed deepsource error * fixed auth test Co-authored-by: Pawan Rawal <[email protected]> Co-authored-by: JatinDevDG <[email protected]>
- Loading branch information
1 parent
55625ec
commit 5f81aac
Showing
15 changed files
with
825 additions
and
99 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.