Skip to content

Is it possible to overwrite session id? #135

Answered by maxcountryman
teenjuna asked this question in Q&A
Discussion options

You must be logged in to vote

It sounds like you're looking for a way to impersonate a user. In that case, you can simply use the session ID directly by setting Cookie: id={some-session-id}. If you do this on the request, tower-sessions will see the provided ID and use it without any extra work on your part. Note that if you want to do this in a middleware or handler, those will need to sit somewhere in your route graph below tower-sessions such that tower-sessions will receive the request with the desired ID.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@teenjuna
Comment options

@maxcountryman
Comment options

Answer selected by teenjuna
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants