Skip to content

KDSoapAuthentication generates same Nonce with every start of the program #352

Description

@Micelium1

I am using KDSoapAuthentication class with KDSoapClientInterface. And the problem I stumbled upon is the fact, that after I restart my application nonces are getting generated same. This leads to the fact, that the server actively rejecting my authentication and I need to wait full 15 minutes untill server forgets old nonces.

To clarify, within the one execution of my application it gives unique "random" nonce to each request but if I close app and run it again, it will generate same sequence of nonces from the beggining.

The code I using to link KDSoapAuthentication to requests is as folows:
m_mediaService.setEndPoint(QString("http://%1/onvif/media_service").arg(ipPortStr));
m_ptzService.setEndPoint(QString("http://%1/onvif/ptz_service").arg(ipPortStr));

m_auth.setUser(user);
m_auth.setPassword(pass);
m_auth.setUseWSUsernameToken(true);   // Включаем заголовки UsernameToken
m_auth.setUsePasswordDigest(true);    // Включаем PasswordDigest вместо чистого текста

m_mediaService.clientInterface()->setAuthentication(m_auth);
m_ptzService.clientInterface()->setAuthentication(m_auth); 

first application run
Image
second application run after 6 minutes

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions