From e667be389a1700c6c98be72405879d755a7003f4 Mon Sep 17 00:00:00 2001 From: Stephen J Day Date: Wed, 10 Jun 2015 19:40:05 -0700 Subject: [PATCH] Rename the basic access controller to htpasswd Signed-off-by: Stephen J Day --- docs/auth/{basic => htpasswd}/access.go | 10 +++++----- docs/auth/{basic => htpasswd}/access_test.go | 2 +- docs/auth/{basic => htpasswd}/htpasswd.go | 2 +- docs/auth/{basic => htpasswd}/htpasswd_test.go | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) rename docs/auth/{basic => htpasswd}/access.go (88%) rename docs/auth/{basic => htpasswd}/access_test.go (99%) rename docs/auth/{basic => htpasswd}/htpasswd.go (99%) rename docs/auth/{basic => htpasswd}/htpasswd_test.go (99%) diff --git a/docs/auth/basic/access.go b/docs/auth/htpasswd/access.go similarity index 88% rename from docs/auth/basic/access.go rename to docs/auth/htpasswd/access.go index f7d5e79b..5425b1da 100644 --- a/docs/auth/basic/access.go +++ b/docs/auth/htpasswd/access.go @@ -1,9 +1,9 @@ -// Package basic provides a simple authentication scheme that checks for the +// Package htpasswd provides a simple authentication scheme that checks for the // user credential hash in an htpasswd formatted file in a configuration-determined // location. // // This authentication method MUST be used under TLS, as simple token-replay attack is possible. -package basic +package htpasswd import ( "errors" @@ -34,12 +34,12 @@ var _ auth.AccessController = &accessController{} func newAccessController(options map[string]interface{}) (auth.AccessController, error) { realm, present := options["realm"] if _, ok := realm.(string); !present || !ok { - return nil, fmt.Errorf(`"realm" must be set for basic access controller`) + return nil, fmt.Errorf(`"realm" must be set for htpasswd access controller`) } path, present := options["path"] if _, ok := path.(string); !present || !ok { - return nil, fmt.Errorf(`"path" must be set for basic access controller`) + return nil, fmt.Errorf(`"path" must be set for htpasswd access controller`) } f, err := os.Open(path.(string)) @@ -98,5 +98,5 @@ func (ch *challenge) Error() string { } func init() { - auth.Register("basic", auth.InitFunc(newAccessController)) + auth.Register("htpasswd", auth.InitFunc(newAccessController)) } diff --git a/docs/auth/basic/access_test.go b/docs/auth/htpasswd/access_test.go similarity index 99% rename from docs/auth/basic/access_test.go rename to docs/auth/htpasswd/access_test.go index 1976b32e..5cb2d7c9 100644 --- a/docs/auth/basic/access_test.go +++ b/docs/auth/htpasswd/access_test.go @@ -1,4 +1,4 @@ -package basic +package htpasswd import ( "io/ioutil" diff --git a/docs/auth/basic/htpasswd.go b/docs/auth/htpasswd/htpasswd.go similarity index 99% rename from docs/auth/basic/htpasswd.go rename to docs/auth/htpasswd/htpasswd.go index dd9bb1ac..494ad0a7 100644 --- a/docs/auth/basic/htpasswd.go +++ b/docs/auth/htpasswd/htpasswd.go @@ -1,4 +1,4 @@ -package basic +package htpasswd import ( "bufio" diff --git a/docs/auth/basic/htpasswd_test.go b/docs/auth/htpasswd/htpasswd_test.go similarity index 99% rename from docs/auth/basic/htpasswd_test.go rename to docs/auth/htpasswd/htpasswd_test.go index 5cc86126..309c359a 100644 --- a/docs/auth/basic/htpasswd_test.go +++ b/docs/auth/htpasswd/htpasswd_test.go @@ -1,4 +1,4 @@ -package basic +package htpasswd import ( "fmt"