Documentation ¶
Index ¶
Constants ¶
View Source
const ( // Hostname is the service hostname and port in the form "hostname:port". // This is mainly used by the documentation, Swagger and client tool code. Hostname = "localhost:8080" // HTTPScheme is the scheme used by the API. As with Hostname this is mainly // used used by the documentation, Swagger and client tool code. HTTPScheme = "http" )
Define a few constants so we can easily switch between development and production values.
Variables ¶
View Source
var BasicAuth = BasicAuthSecurity("BasicAuth", func() {
Description("User email and password authentication")
})
BasicAuth is the security scheme used to secure the JWT token retrieval endpoint.
View Source
var JWTAuth = JWTSecurity("JWTAuth", func() { Header("Authorization") TokenURL(HTTPScheme + "://" + Hostname + "/token") })
JWTAuth is the security scheme used to secure all endpoints - except the JWT token retrieval endpoint (you'd have a bit of a chicken and egg issue otherwise).
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.