design

package
v0.0.0-...-3c3b521 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 23, 2016 License: MIT Imports: 3 Imported by: 0

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.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL