Skip to content
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

Remove Sendable requirements on Authenticatable #3095

Merged
merged 2 commits into from
Nov 2, 2023
Merged

Remove Sendable requirements on Authenticatable #3095

merged 2 commits into from
Nov 2, 2023

Conversation

0xTim
Copy link
Member

@0xTim 0xTim commented Nov 2, 2023

Removes the requirement for Authenticatable types to be Sendable which was causing issues with Fluent models (and any reference types) and wasn't solvable in a non-breaking way.

This uses an unsafe box to wrap the Authenticatable types which removes compiler checking on usage of the box but should not be an issue due to the way Vapor's auth is implemented

@0xTim 0xTim requested a review from gwynne as a code owner November 2, 2023 16:21
@codecov-commenter
Copy link

codecov-commenter commented Nov 2, 2023

Codecov Report

Merging #3095 (e290104) into main (3bf4e73) will increase coverage by 0.00%.
Report is 1 commits behind head on main.
The diff coverage is 100.00%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3095   +/-   ##
=======================================
  Coverage   76.23%   76.24%           
=======================================
  Files         211      211           
  Lines        7904     7906    +2     
=======================================
+ Hits         6026     6028    +2     
  Misses       1878     1878           
Files Coverage Δ
...ces/Vapor/Authentication/AuthenticationCache.swift 84.84% <100.00%> (+0.97%) ⬆️
Sources/Vapor/Authentication/Authenticator.swift 57.89% <ø> (ø)
Sources/Vapor/Authentication/GuardMiddleware.swift 100.00% <ø> (ø)
...rces/Vapor/Authentication/RedirectMiddleware.swift 83.33% <ø> (ø)

Copy link
Member

@gwynne gwynne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One tiny nit, just to be annoying 🙂

Sources/Vapor/Authentication/AuthenticationCache.swift Outdated Show resolved Hide resolved
Co-authored-by: Gwynne Raskind <gwynne@vapor.codes>
@0xTim 0xTim requested a review from gwynne November 2, 2023 16:28
@0xTim
Copy link
Member Author

0xTim commented Nov 2, 2023

Of course 😛

@0xTim 0xTim added the semver-patch Internal changes only label Nov 2, 2023
@0xTim 0xTim merged commit 0fa646e into main Nov 2, 2023
16 of 17 checks passed
@0xTim 0xTim deleted the sendable-auth branch November 2, 2023 16:43
@penny-for-vapor
Copy link

These changes are now available in 4.85.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver-patch Internal changes only
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants