Przeglądaj źródła

readme for new spngeo client

Jonathan Turner 7 lat temu
rodzic
commit
cfdbdcebb5
1 zmienionych plików z 7 dodań i 3 usunięć
  1. 7 3
      README.md

+ 7 - 3
README.md

@@ -114,11 +114,15 @@ cl := client.NewClientWithPassword("username", "REALM.COM", "password", cfg, cli
 #### Authenticate to a Service
 #### Authenticate to a Service
 
 
 ##### HTTP SPNEGO
 ##### HTTP SPNEGO
-Create the HTTP request object and then call the client's SetSPNEGOHeader method passing the Service Principal Name (SPN) or to auto generate the SPN from the request object pass a null string ""
+Create the HTTP request object and then create an SPNEGO client and use this to process the request with methods that 
+are the same as on a HTTP client.
+If nil is passed as the HTTP client when creating the SPNEGO client the http.DefaultClient is used.
+When creating the SPNEGO client pass the Service Principal Name (SPN) or auto generate the SPN from the request 
+object by passing a null string "".
 ```go
 ```go
 r, _ := http.NewRequest("GET", "http://host.test.gokrb5/index.html", nil)
 r, _ := http.NewRequest("GET", "http://host.test.gokrb5/index.html", nil)
-err := SetSPNEGOHeader(&cl, r, "") // If "" is provided for the last argument the SPN will be derived from the URL.
-HTTPResp, err := http.DefaultClient.Do(r)
+spnegoCl := spngeo.NewClient(cl, nil, "")
+resp, err := spnegoCl.Do(r)
 ```
 ```
 
 
 ##### Generic Kerberos Client
 ##### Generic Kerberos Client