Browse Source

rename service config func

Jonathan Turner 7 years ago
parent
commit
f9d03387da
5 changed files with 6 additions and 6 deletions
  1. 1 1
      examples/example-AD.go
  2. 1 1
      examples/example.go
  3. 1 1
      examples/httpServer.go
  4. 2 2
      service/authenticator.go
  5. 1 1
      service/http_test.go

+ 1 - 1
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

+ 1 - 1
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
 }

+ 1 - 1
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

+ 2 - 2
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}
 }
 

+ 1 - 1
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
 }