Skip to content

Use Rack::Session methods when calling redis-session-store#8132

Merged
mitchellhenke merged 3 commits intomainfrom
mitchellhenke/redis-session-update-preparation
Apr 5, 2023
Merged

Use Rack::Session methods when calling redis-session-store#8132
mitchellhenke merged 3 commits intomainfrom
mitchellhenke/redis-session-update-preparation

Conversation

@mitchellhenke
Copy link
Contributor

@mitchellhenke mitchellhenke commented Apr 4, 2023

🛠 Summary of changes

Rack::Session has a defined interface, but we use some of the internal redis-session-store methods. I'm working on a bit of an internal refactor of our redis-session-store fork and this PR is a precursor to realizing some of those changes.

changelog: Internal, Session Management, Use Rack::Session methods when calling redis-session-store

def destroy
session_store.send(:destroy_session_from_sid, session_uuid, drop: true)
session_store.send(:delete_session, {}, Rack::Session::SessionId.new(session_uuid), drop: true)
Copy link
Contributor

Choose a reason for hiding this comment

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

😭 it's a bummer these are still private methods

Co-authored-by: Zach Margolis <zachmargolis@users.noreply.github.com>
@mitchellhenke mitchellhenke marked this pull request as ready for review April 5, 2023 16:26
Copy link
Contributor

@zachmargolis zachmargolis left a comment

Choose a reason for hiding this comment

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

LGTM

@mitchellhenke mitchellhenke merged commit 67f5feb into main Apr 5, 2023
@mitchellhenke mitchellhenke deleted the mitchellhenke/redis-session-update-preparation branch April 5, 2023 17:15
jc-gsa pushed a commit that referenced this pull request Apr 19, 2023
* Use Rack::Session methods when calling redis-session-store

changelog: Internal, Session Management, Use Rack::Session methods when calling redis-session-store

* Update app/services/out_of_band_session_accessor.rb

Co-authored-by: Zach Margolis <zachmargolis@users.noreply.github.com>

* Update app/services/out_of_band_session_accessor.rb

---------

Co-authored-by: Zach Margolis <zachmargolis@users.noreply.github.com>
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.

2 participants