Skip to content

moorereason/httpauth

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

httpauth

Package httpauth provides a goa middleware that implements Basic HTTP authentication.

License Godoc

Middleware

The package provides a middleware that can be mounted to services or controllers that require authentication. The basic authentication middleware is instantiated using the BasicMiddleware function. This function accepts a specification that describes how the middleware should operate.

	spec := &httpauth.Specification{
		LogFailure:	true,
		LogSuccess:	true,
		Realm:		"Restricted",
		ValidationFunc:	authHandler,
	}
	service.Use(httpauth.BasicMiddleware(spec))
	// or
	protectedController.Use(httpauth.BasicMiddleware(spec))

About

Basic HTTP authentication middleware for goa

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages