Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var BasicAuth = BasicAuthSecurity("basic", func() {
Description("Basic authentication used to authenticate security principal during signin")
Scope("api:read", "Read-only access")
})
BasicAuth defines a security scheme using basic authentication. The scheme protects the "signin" action used to create JWTs.
View Source
var Creds = Type("Creds", func() {
Field(1, "jwt", String, "JWT token", func() {
Example("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiYWRtaW4iOnRydWV9.TJVA95OrM7E2cBab30RMHrHDcEfxjoYZgeFONFh7HgQ")
})
Required("jwt")
})
Creds defines the credentials to use for authenticating to service methods.
View Source
var JWTAuth = JWTSecurity("jwt", func() {
Description(`Secures endpoint by requiring a valid JWT token retrieved via the signin endpoint. Supports scopes "api:read" and "api:write".`)
Scope("api:read", "Read-only access")
Scope("api:write", "Read and write access")
})
JWTAuth defines a security scheme that uses JWT tokens.
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.