AccessTokenField is syntactic sugar to define an access token attribute with the "rpc:tag" meta set with the value of the first argument. AccessTokenField takes the same arguments as AccessToken with the addition of the tag value as the first argument.
(tag any, name string, args ...any)
| 555 | // AccessTokenField takes the same arguments as AccessToken with the addition of the |
| 556 | // tag value as the first argument. |
| 557 | func AccessTokenField(tag any, name string, args ...any) { |
| 558 | args = useDSL(args, func() { Meta("security:accesstoken") }) |
| 559 | Field(tag, name, args...) |
| 560 | } |
| 561 | |
| 562 | // BearerToken defines the attribute used to provide the raw token to an |
| 563 | // endpoint secured via BearerSecurity. The parameters and usage of BearerToken |