Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Posts: 17,003
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

How to avoid credential caching with QNetworkAccessmanager?

I am using QNetworkAccessmanager to create connections.

I have two different user accounts accessing the same URL in succession, and the problem is that the second account uses the (cached) credentials of the first account.

The authenticationRequired signal is not fired for the second account.


Is there an option to disable this behavior?

feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Posts: 508
Registered: ‎01-19-2011
My Device: My Trusty Red Plane
My Carrier: Outer Space

Re: How to avoid credential caching with QNetworkAccessmanager?

are you using the same QNetworkAccessmanager (QNAM) for both calls? I haven't tried it, but I would have two suggestions:


1) try calling qnam->cache()->clear() when the second user calls it


2) explicitly delete the old QNAM and instantiate a new one (e.g. when the different user calls it)

I'm a bird from outer space. But I'm not flappy o.o