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

提供HTTP接口,支持用“用户访问Token”验权发送车牌 #7

Open
AlexGuo1998 opened this issue Jan 3, 2025 · 0 comments
Labels
enhancement New feature or request

Comments

@AlexGuo1998
Copy link

理了一下目前网页上发车牌的逻辑:

  1. 用户输入帐号密码登录后,通过UserLogin->login接口(POST)可以获取token
  2. 连上websocket,调用setAccessPermission使用token验权
  3. webcosket调用sendRoomNumber发车牌

目前有个想法是用iOS的快捷指令一键发送车牌。
这里有一个限制是只能执行GET或POST请求(可以设置任意请求头),无法连接websocket发送消息。
第一步登录我这里可以处理,如果提供一个HTTP接口提供token发送车牌,这套流程就可以全走通了。


PS. 如果你用iOS设备的话,这是我之前做的一款用于在设备上查看车牌的快捷指令 https://routinehub.co/shortcut/19558/
目前是每次点“刷新”轮询一次新的车牌,如果服务端支持在收到新车牌前阻塞回包,可能体验会更好些(或者我自己做一个代理?)

@maborosh maborosh added the enhancement New feature or request label Jan 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants