Skip to content

Commit ea755a0

Browse files
committed
Fix SAOP auth expiration issue.
1 parent 1d19a13 commit ea755a0

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ module github.com/eyetowers/gonvif
33
go 1.18
44

55
require (
6-
github.com/eyetowers/gowsdl v0.0.0-20220927164314-b28274961972
6+
github.com/eyetowers/gowsdl v0.0.0-20221013082057-2a1df237f5b5
77
github.com/golangci/golangci-lint v1.49.0
88
github.com/ivanpirog/coloredcobra v1.0.1
99
github.com/jellydator/ttlcache/v3 v3.0.0

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,8 @@ github.com/esimonov/ifshort v1.0.4 h1:6SID4yGWfRae/M7hkVDVVyppy8q/v9OuxNdmjLQStB
123123
github.com/esimonov/ifshort v1.0.4/go.mod h1:Pe8zjlRrJ80+q2CxHLfEOfTwxCZ4O+MuhcHcfgNWTk0=
124124
github.com/ettle/strcase v0.1.1 h1:htFueZyVeE1XNnMEfbqp5r67qAN/4r6ya1ysq8Q+Zcw=
125125
github.com/ettle/strcase v0.1.1/go.mod h1:hzDLsPC7/lwKyBOywSHEP89nt2pDgdy+No1NBA9o9VY=
126-
github.com/eyetowers/gowsdl v0.0.0-20220927164314-b28274961972 h1:k2WtoWNLrnlOzm189eDgICWh8O9294qh/Us62uViui4=
127-
github.com/eyetowers/gowsdl v0.0.0-20220927164314-b28274961972/go.mod h1:xLHCSGvEMra+jaTvHIsVplniyxHab+nPJp1cEzjeieA=
126+
github.com/eyetowers/gowsdl v0.0.0-20221013082057-2a1df237f5b5 h1:ImTV1cTWFLj+GjStR9UA6qCIbjVzXbyBuXR0q1y35e8=
127+
github.com/eyetowers/gowsdl v0.0.0-20221013082057-2a1df237f5b5/go.mod h1:xLHCSGvEMra+jaTvHIsVplniyxHab+nPJp1cEzjeieA=
128128
github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w=
129129
github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk=
130130
github.com/fatih/structtag v1.2.0 h1:/OdNE99OxoI/PqaW/SuSK9uxxT3f/tcSZgon/ssNSx4=

pkg/gonvif/client.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,8 +151,10 @@ func AuthorizedSOAPClient(serviceURL, username, password string, verbose bool) *
151151
if verbose {
152152
httpClient = verboseHTTPClient
153153
}
154-
client := soap.NewClient(serviceURL, soap.WithHTTPClient(httpClient))
155-
client.SetHeaders(soap.NewSecurity(username, password))
154+
client := soap.NewClient(serviceURL,
155+
soap.WithHTTPClient(httpClient),
156+
soap.WithSOAPAuth(username, password),
157+
)
156158
return client
157159
}
158160

0 commit comments

Comments
 (0)