Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Clear ¶
func Clear()
Clear is provided to be used in tests It unregiseters all Auth handlers. Use in production at your own risk...
func Register ¶
Register takes a list and a list of Auth(er?) instances and registers them as possible things that can be applied in the auth middleware to authenticate the viewer Since these functions are registered ad-hoc, if there's a strict dependency between functions, they should be passed in with one Register function
Types ¶
type Auth ¶
type Auth interface { // Viewer gathers information from the request (and optionally writes to the response) // and returns the authenticated viewer for this request. If cannot authenticate the viewer, // this method should return nil. // The framework will eventually put a LoggedOutViewer: viewer.LoggedOutViewer() // if no ViewerContext is returned by any Auth Handler AuthViewer(http.ResponseWriter, *http.Request) viewer.ViewerContext }
Auth interface should be implemented to get information from the request (such as header or cookie) to authenticate the user.
Click to show internal directories.
Click to hide internal directories.