TokenField is syntactic sugar to define a JWT token attribute with the "rpc:tag" meta set with the value of the first argument. TokenField takes the same arguments as Token with the addition of the tag value as the first argument.
(tag any, name string, args ...any)
| 630 | // TokenField takes the same arguments as Token with the addition of the |
| 631 | // tag value as the first argument. |
| 632 | func TokenField(tag any, name string, args ...any) { |
| 633 | args = useDSL(args, func() { Meta("security:token") }) |
| 634 | Field(tag, name, args...) |
| 635 | } |
| 636 | |
| 637 | // Scope has two uses: in BearerSecurity, JWTSecurity or OAuth2Security it |
| 638 | // defines a scope supported by the scheme. In Security it lists required scopes. |