adminauth

package
v0.0.0-...-fa37cd3 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2019 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AdminRouter

func AdminRouter(tok token.Token, r *mux.Router) *mux.Router

Make a subrouter for admin-only requests. This checks for a token passed in via basic auth. If the username is not admin or the token does not match the argument, none of the routes registered on the returned router will match, instead returning 404 (Not found). TODO: think about whether we want that as an explicit security feature. It masks the presence or absence of nodes, which is nice (but if we're to rely on that, we need to mitigate timing attacks).

Types

This section is empty.

Jump to

Keyboard shortcuts

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