Skip to content

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

@libingke

Description

@libingke

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)
})

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions