APIKeyField is syntactic sugar to define an API key attribute with the "rpc:tag" meta set with the value of the first argument. APIKeyField takes the same arguments as APIKey with the addition of the tag value as the first argument.
(tag any, scheme, name string, args ...any)
| 517 | // APIKeyField takes the same arguments as APIKey with the addition of the |
| 518 | // tag value as the first argument. |
| 519 | func APIKeyField(tag any, scheme, name string, args ...any) { |
| 520 | args = useDSL(args, func() { Meta("security:apikey:"+scheme, scheme) }) |
| 521 | Field(tag, name, args...) |
| 522 | } |
| 523 | |
| 524 | // AccessToken defines the attribute used to provide the access token to an |
| 525 | // endpoint secured with OAuth2. The parameters and usage of AccessToken are the |