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

feat: 扩展websocket鉴权与wsConn的关联 #344

Merged
merged 3 commits into from
Nov 6, 2024

Conversation

ppanphper
Copy link
Contributor

使用http request context传递一些鉴权后设置的信息
客户端支持连接指定地址及参数

实现客户端连接服务端的第一个请求开始验证token,验证成功后,可以设置一些可信任的参数到上下文中,后续连接触发SetOnConnect方法中可以从上下文中读取并设置到属性中,后续连接都可以读取使用。

@clukboy
Copy link
Collaborator

clukboy commented Oct 29, 2024

@ppanphper Connection中可以设置一些property,看看是否能达到你想要的效果呢

@ppanphper
Copy link
Contributor Author

ppanphper commented Nov 1, 2024

@ppanphper Connection中可以设置一些property,看看是否能达到你想要的效果呢

@clukboy 在执行websocketAuth时,只有http请求,没有wsConn连接,所以无法设置property.

@aceld
Copy link
Owner

aceld commented Nov 1, 2024

@ppanphper golangci-lint 没有过,好像需要再简单调整下

@aceld
Copy link
Owner

aceld commented Nov 5, 2024

@ppanphper 还是没有通过,是不是gofmt 的 import 包的顺序问题导致

@ppanphper
Copy link
Contributor Author

@ppanphper 还是没有通过,是不是gofmt 的 import 包的顺序问题导致

调整了

@aceld aceld merged commit 59e7837 into aceld:master Nov 6, 2024
1 check passed
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.

3 participants