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

[FEATURE REQUEST] Get the data in the session through the session id #2307

Closed
seventeenman opened this issue Dec 12, 2023 · 0 comments
Closed
Assignees

Comments

@seventeenman
Copy link

When I change from the http authenticated state to websocket, I cannot send my session id to websocket through the Get parameter, so I cannot authenticate and obtain the data in the original session. If there was a way to get the session from the session id, I would be able to use

session_value := session.GetBySessionId(id)
ctx.Values().Set("session",session_value) 

in a middleware specifically for websocket connections, And use

account, exists := c.Ctx.Values().Get("session").(*dto.AccountDTO) 

in websocket to get the data in the session

@seventeenman seventeenman closed this as not planned Won't fix, can't repro, duplicate, stale Dec 19, 2023
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

No branches or pull requests

2 participants