{{define "content"}}
| ID | Type | Scopes | Metadata | Token | Delete |
|---|---|---|---|---|---|
| {{.ID}} | {{.Type}} | {{range .Scopes}}{{.}} {{end}} |
{{range $k, $v := .Metadata}} {{if and (ne $k "password_hash") (ne $k "token")}} {{$k}}: {{$v}} {{end}} {{end}} | {{if .Token}} {{end}} |
Scopes define what a token is allowed to access. They work with the Scopes page where you set what each endpoint requires.
| Scopes | What it means |
|---|---|
* | Full access — bypasses all scope checks (default for admin) |
greeter | Can call any endpoint that requires the greeter scope |
greeter, users | Can call endpoints requiring greeter or users |
admin | Can call endpoints requiring the admin scope |
Scopes are just strings — you define them. Set the same string on a token and on an endpoint, and they match. See Scopes for examples.
curl http://localhost:8080/api/greeter/Greeter/Hello \
-H "Authorization: Bearer <token>" \
-d '{"name": "World"}'
{{end}}