MCPcopy Create free account
hub / github.com/goadesign/goa / TokenField

Function TokenField

dsl/security.go:632–635  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

630// TokenField takes the same arguments as Token with the addition of the
631// tag value as the first argument.
632func 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.

Callers 2

dsls.goFile · 0.85
TestTooManyArgErrorFunction · 0.85

Calls 3

useDSLFunction · 0.85
MetaFunction · 0.85
FieldFunction · 0.85

Tested by 1

TestTooManyArgErrorFunction · 0.68