Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AuthCreateToken ¶
AuthCreateToken returns a token with the provided claims in it. At the minimum its expected that a
func RegisterAuthProvider ¶
func RegisterAuthProvider(n string, ap AuthProviderFactory)
RegisterAuthProvider is used by other providers to be able to register them into the system and create a subtree on the /auth/ route.
Types ¶
type AuthProviderFactory ¶
AuthProviderFactory is a mechanism to return a complete auth system ready to go. Because this registers a set of routes, the only thing it can really do is return a bad object, so we check an error here to see if something goes wrong.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server encapsulates the components of the http server and its associated key management.
type TokenClaims ¶
type TokenClaims map[string]interface{}
TokenClaims is a type for setting the claims in the authentication tokens. The only required claims that have to be set are the name, and networks the holder is an admin of.