Forráskód Böngészése

rename service config func

Jonathan Turner 7 éve
szülő
commit
f9d03387da

+ 1 - 1
examples/example-AD.go

@@ -66,7 +66,7 @@ func httpServer() *httptest.Server {
 	b, _ := hex.DecodeString(testdata.SYSHTTP_KEYTAB)
 	b, _ := hex.DecodeString(testdata.SYSHTTP_KEYTAB)
 	kt, _ := keytab.Parse(b)
 	kt, _ := keytab.Parse(b)
 	th := http.HandlerFunc(testAppHandler)
 	th := http.HandlerFunc(testAppHandler)
-	c := service.NewSPNEGOConfig(kt)
+	c := service.NewConfig(kt)
 	c.ServicePrincipal = "sysHTTP"
 	c.ServicePrincipal = "sysHTTP"
 	s := httptest.NewServer(service.SPNEGOKRB5Authenticate(th, c, l))
 	s := httptest.NewServer(service.SPNEGOKRB5Authenticate(th, c, l))
 	return s
 	return s

+ 1 - 1
examples/example.go

@@ -66,7 +66,7 @@ func httpServer() *httptest.Server {
 	b, _ := hex.DecodeString(testdata.HTTP_KEYTAB)
 	b, _ := hex.DecodeString(testdata.HTTP_KEYTAB)
 	kt, _ := keytab.Parse(b)
 	kt, _ := keytab.Parse(b)
 	th := http.HandlerFunc(testAppHandler)
 	th := http.HandlerFunc(testAppHandler)
-	c := service.NewSPNEGOConfig(kt)
+	c := service.NewConfig(kt)
 	s := httptest.NewServer(service.SPNEGOKRB5Authenticate(th, c, l))
 	s := httptest.NewServer(service.SPNEGOKRB5Authenticate(th, c, l))
 	return s
 	return s
 }
 }

+ 1 - 1
examples/httpServer.go

@@ -34,7 +34,7 @@ func main() {
 
 
 	// Set up handler mappings wrapping in the SPNEGOKRB5Authenticate handler wrapper
 	// Set up handler mappings wrapping in the SPNEGOKRB5Authenticate handler wrapper
 	mux := http.NewServeMux()
 	mux := http.NewServeMux()
-	c := service.NewSPNEGOConfig(kt)
+	c := service.NewConfig(kt)
 	mux.Handle("/", service.SPNEGOKRB5Authenticate(th, c, l))
 	mux.Handle("/", service.SPNEGOKRB5Authenticate(th, c, l))
 
 
 	// Start up the web server
 	// Start up the web server

+ 2 - 2
service/authenticator.go

@@ -51,11 +51,11 @@ type Config struct {
 }
 }
 
 
 func NewSPNEGOAuthenticator(kt keytab.Keytab) (a SPNEGOAuthenticator) {
 func NewSPNEGOAuthenticator(kt keytab.Keytab) (a SPNEGOAuthenticator) {
-	a.Config = NewSPNEGOConfig(kt)
+	a.Config = NewConfig(kt)
 	return
 	return
 }
 }
 
 
-func NewSPNEGOConfig(kt keytab.Keytab) *Config {
+func NewConfig(kt keytab.Keytab) *Config {
 	return &Config{Keytab: kt}
 	return &Config{Keytab: kt}
 }
 }
 
 

+ 1 - 1
service/http_test.go

@@ -246,7 +246,7 @@ func httpServer() *httptest.Server {
 	b, _ := hex.DecodeString(testdata.HTTP_KEYTAB)
 	b, _ := hex.DecodeString(testdata.HTTP_KEYTAB)
 	kt, _ := keytab.Parse(b)
 	kt, _ := keytab.Parse(b)
 	th := http.HandlerFunc(testAppHandler)
 	th := http.HandlerFunc(testAppHandler)
-	c := NewSPNEGOConfig(kt)
+	c := NewConfig(kt)
 	s := httptest.NewServer(SPNEGOKRB5Authenticate(th, c, l))
 	s := httptest.NewServer(SPNEGOKRB5Authenticate(th, c, l))
 	return s
 	return s
 }
 }