-
Notifications
You must be signed in to change notification settings - Fork 6
Massively Refactor Authentication internals #3440
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
Merged
Merged
Conversation
This file contains hidden or 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
These only needed to be exported for the RootUser. This is an edge case, so I'd rather not have these services exported. Eventually I'd like the RootUser to go away.
🗞 GraphQL SummaryView schema changes@@ -6918,9 +6918,9 @@
"""
The impersonator if the user is logged in and impersonating someone else
"""
impersonator: User
- powers: [Power!]
+ powers: [Power!]!
"""
Use this token in future requests in the Authorization header.
Authorization: Bearer {token}.
|
e198c4c
to
d57c10e
Compare
Session no longer needs to be passed around, which was the point of this.
Since it is private now there is not a need to hide this
f046e7c
to
48a0263
Compare
Closed
bryanjnelson
approved these changes
May 27, 2025
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.
💪🏼
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This was one of the end goals I had a week ago, but if first I needed fix all the tight coupling to Session.
Moved
~/components/authentication
->~/core/authentication
Moved
Session
to core as well. There are no remaining auth exports in~/common
Decoupled some authorization functionality from authentication.
powers
&betaFeatures
resolve in the authorization module now.AuthenticationService
was splitJwtService
for encoding/decoding session & email tokensSessionManager
holds the remaining functionality...for managing sessions.SessionInterceptor
was splitSessionInitiator
is now the service that parses the request info & relays toSessionManager
to create sessionsSessionInterceptor
only:AuthLevel
& applies their logic/constraintsSessionInterceptor
to resume the session.SessionInterceptor
can be a private "hook". SinceSessionInitiator
is injectable now. Though theIdentity
facade still fronts this.AdminModule
now pulls authentication services loosely viaModuleRef
.AuthenticationModule
.RootUser
case. I'd like to rethink thisRootUser
all together, and I'm hoping ourSystemAgents
are a step in that direction. Until then though, it was a bit silly to expose many internal layers/services to the codebase just for this.Now only
Identity
is the only exported service that the codebase can use to do auth things.Its surface area is a fraction of the former
AuthenticationService
- all of the internals have been made private.