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

consolidate service configuration #67

Merged
merged 1 commit into from
Oct 28, 2023
Merged

consolidate service configuration #67

merged 1 commit into from
Oct 28, 2023

Conversation

maxcountryman
Copy link
Owner

Previously a separate CookieConfig was used. However, this configuration scope extends beyond the cookie and includes e.g. the session expiry. In fact, the proper scope for this configuration is either the session or the service. The session does not need to be coupled to how it might be represented, i.e. as a cookie, so here we move those concerns onto the service. The config is still contained within its own type, to make it easier to operate over within the middleware.

Previously a separate `CookieConfig` was used. However, this
configuration scope extends beyond the cookie and includes e.g. the
session expiry. In fact, the proper scope for this configuration is
either the session or the service. The session does not need to be
coupled to how it might be represented, i.e. as a cookie, so here we
move those concerns onto the service. The config is still contained
within its own type, to make it easier to operate over within the
middleware.
@codecov
Copy link

codecov bot commented Oct 28, 2023

Codecov Report

Merging #67 (9483b6f) into main (6519450) will increase coverage by 0.11%.
The diff coverage is 88.88%.

@@            Coverage Diff             @@
##             main      #67      +/-   ##
==========================================
+ Coverage   64.92%   65.03%   +0.11%     
==========================================
  Files          14       13       -1     
  Lines         573      572       -1     
==========================================
  Hits          372      372              
+ Misses        201      200       -1     
Files Coverage Δ
src/lib.rs 21.42% <ø> (+14.28%) ⬆️
src/memory_store.rs 100.00% <ø> (ø)
src/session.rs 84.84% <100.00%> (-0.45%) ⬇️
src/service.rs 84.82% <87.87%> (-0.75%) ⬇️

@maxcountryman maxcountryman merged commit e1e6759 into main Oct 28, 2023
15 checks passed
@maxcountryman maxcountryman deleted the service-config branch October 28, 2023 18:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant