{{define "content"}}

Tokens

{{range .Tokens}} {{end}}
IDTypeScopesMetadataTokenDelete
{{.ID}} {{.Type}} {{range .Scopes}}{{.}} {{end}} {{range $k, $v := .Metadata}} {{if and (ne $k "password_hash") (ne $k "token")}} {{$k}}: {{$v}} {{end}} {{end}} {{if .Token}} {{if .TokenSuffix}} {{.TokenPrefix}}...{{.TokenSuffix}} {{else}} {{.Token}} {{end}} {{end}}

Create Token

Token Scopes

Scopes define what a token is allowed to access. They work with the Scopes page where you set what each endpoint requires.

ScopesWhat it means
*Full access — bypasses all scope checks (default for admin)
greeterCan call any endpoint that requires the greeter scope
greeter, usersCan call endpoints requiring greeter or users
adminCan 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.

Using a Token

curl http://localhost:8080/api/greeter/Greeter/Hello \
  -H "Authorization: Bearer <token>" \
  -d '{"name": "World"}'
{{end}}