-
Notifications
You must be signed in to change notification settings - Fork 4
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
Add JWT middleware and me
query
#21
Conversation
backend/graph/schema.graphqls
Outdated
@@ -247,6 +247,14 @@ type FAQCategory { | |||
questions: [FAQ!]! | |||
} | |||
|
|||
type User { | |||
personId: ID |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want this to be called personId? One could argue that this is a bad naming originally in Members...?
I'd either go with "id" or "userId".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Of course if this is just a "forward" of what we get from auth0, then we don't have much of a choice
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I'll move this to ID, makes more sense, even if members i "wrong".
I'm curious if we need to check hasMembership. |
I will use this for https://github.com/bcc-code/brunstadtv/pull/21/files#diff-fcaa1411fa7893dd366fed7c9738f2dc0b054503ed682c3df089fbd7946155b0R22 thanks |
Add JWT middleware and `me` query
The middleware is applied to all requests. If the
Authorization
header is not set the request is marked as Anonymous.The middleware is not responsible for preventing access, it is only supposed to validate the token (if it exists) and extract claims into the context. Claims retrieved from the context later can thus be considered valid and used to Authorization purposes.