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

Function AccessToken

dsl/security.go:547–550  ·  view source on GitHub ↗

AccessToken defines the attribute used to provide the access token to an endpoint secured with OAuth2. The parameters and usage of AccessToken are the same as the goa DSL Attribute function. The generated code produced by goa uses the value of the corresponding payload field to initialize the Autho

(name string, args ...any)

Source from the content-addressed store, hash-verified

545// })
546// })
547func AccessToken(name string, args ...any) {
548 args = useDSL(args, func() { Meta("security:accesstoken") })
549 Attribute(name, args...)
550}
551
552// AccessTokenField is syntactic sugar to define an access token attribute with the
553// "rpc:tag" meta set with the value of the first argument.

Callers 5

endpoint_dsls.goFile · 0.85
openapi_dsls.goFile · 0.85
TestTooManyArgErrorFunction · 0.85
security_dsls.goFile · 0.85

Calls 3

useDSLFunction · 0.85
MetaFunction · 0.85
AttributeFunction · 0.85

Tested by 1

TestTooManyArgErrorFunction · 0.68