Browse Source

Update httpServer.go

GOKRB5 Service: 2018/09/11 11:27:23 http.go:57: 192.168.139.137:43856 user@REALM - SPNEGO authentication succeeded
2018/09/11 11:27:23 http: panic serving 1.2.3.4:2345: interface conversion: interface {} is *credentials.Credentials, not credentials.Credentials
Hakan Carlsson 7 years ago
parent
commit
2f19bd089c
1 changed files with 1 additions and 1 deletions
  1. 1 1
      examples/httpServer.go

+ 1 - 1
examples/httpServer.go

@@ -45,7 +45,7 @@ func main() {
 func testAppHandler(w http.ResponseWriter, r *http.Request) {
 	w.WriteHeader(http.StatusOK)
 	ctx := r.Context()
-	creds := ctx.Value(service.CTXKeyCredentials).(credentials.Credentials)
+	creds := ctx.Value(service.CTXKeyCredentials).(*credentials.Credentials)
 	fmt.Fprintf(w,
 		`<html>
 <h1>GOKRB5 Handler</h1>