mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 16:01:01 +00:00
fix: report shared auth scopes in hello-ok (#67810) thanks @BunsDev
Co-authored-by: Val Alexander <bunsthedev@gmail.com>
This commit is contained in:
@@ -89,7 +89,21 @@ Gateway → Client:
|
||||
```
|
||||
|
||||
`server`, `features`, `snapshot`, and `policy` are all required by the schema
|
||||
(`src/gateway/protocol/schema/frames.ts`). `auth` and `canvasHostUrl` are optional.
|
||||
(`src/gateway/protocol/schema/frames.ts`). `canvasHostUrl` is optional. `auth`
|
||||
reports the negotiated role/scopes when available, and includes `deviceToken`
|
||||
when the gateway issues one.
|
||||
|
||||
When no device token is issued, `hello-ok.auth` can still report the negotiated
|
||||
permissions:
|
||||
|
||||
```json
|
||||
{
|
||||
"auth": {
|
||||
"role": "operator",
|
||||
"scopes": ["operator.read", "operator.write"]
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
When a device token is issued, `hello-ok` also includes:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user