diff --git a/examples/example-AD.go b/examples/example-AD.go index a80fd094..29e1c63f 100644 --- a/examples/example-AD.go +++ b/examples/example-AD.go @@ -66,7 +66,7 @@ func httpServer() *httptest.Server { b, _ := hex.DecodeString(testdata.SYSHTTP_KEYTAB) kt, _ := keytab.Parse(b) th := http.HandlerFunc(testAppHandler) - c := service.NewSPNEGOConfig(kt) + c := service.NewConfig(kt) c.ServicePrincipal = "sysHTTP" s := httptest.NewServer(service.SPNEGOKRB5Authenticate(th, c, l)) return s diff --git a/examples/example.go b/examples/example.go index f12723db..14b0922e 100644 --- a/examples/example.go +++ b/examples/example.go @@ -66,7 +66,7 @@ func httpServer() *httptest.Server { b, _ := hex.DecodeString(testdata.HTTP_KEYTAB) kt, _ := keytab.Parse(b) th := http.HandlerFunc(testAppHandler) - c := service.NewSPNEGOConfig(kt) + c := service.NewConfig(kt) s := httptest.NewServer(service.SPNEGOKRB5Authenticate(th, c, l)) return s } diff --git a/examples/httpServer.go b/examples/httpServer.go index 2e6441ea..b9468429 100644 --- a/examples/httpServer.go +++ b/examples/httpServer.go @@ -34,7 +34,7 @@ func main() { // Set up handler mappings wrapping in the SPNEGOKRB5Authenticate handler wrapper mux := http.NewServeMux() - c := service.NewSPNEGOConfig(kt) + c := service.NewConfig(kt) mux.Handle("/", service.SPNEGOKRB5Authenticate(th, c, l)) // Start up the web server diff --git a/service/authenticator.go b/service/authenticator.go index 271c5208..d4b5f19c 100644 --- a/service/authenticator.go +++ b/service/authenticator.go @@ -51,11 +51,11 @@ type Config struct { } func NewSPNEGOAuthenticator(kt keytab.Keytab) (a SPNEGOAuthenticator) { - a.Config = NewSPNEGOConfig(kt) + a.Config = NewConfig(kt) return } -func NewSPNEGOConfig(kt keytab.Keytab) *Config { +func NewConfig(kt keytab.Keytab) *Config { return &Config{Keytab: kt} } diff --git a/service/http_test.go b/service/http_test.go index f3bbc2e1..16d9e2e0 100644 --- a/service/http_test.go +++ b/service/http_test.go @@ -246,7 +246,7 @@ func httpServer() *httptest.Server { b, _ := hex.DecodeString(testdata.HTTP_KEYTAB) kt, _ := keytab.Parse(b) th := http.HandlerFunc(testAppHandler) - c := NewSPNEGOConfig(kt) + c := NewConfig(kt) s := httptest.NewServer(SPNEGOKRB5Authenticate(th, c, l)) return s }