simulators icon indicating copy to clipboard operation
simulators copied to clipboard

BadUserAccessDenied: when reconnecting to the service using the opcua-simulator

Open libingke opened this issue 2 years ago • 0 comments

During reconnection, this function encryptPasswords(userIds) should not be executed multiple times.

ioTSensorsOPCUA/services/uaSrvService.go

...
server.WithAuthenticateUserNameIdentityFunc(func(
        encryptPasswords(userIds)
...

fix: like this

var once sync.Once
...
once.Do(func() {
        encryptPasswords(userIds)
})

libingke avatar Nov 03 '23 03:11 libingke