Open mxre opened 3 years ago
I think your assumption is not quite right, from analysing the code i think the stack is roughly this:
CupsService.getJobState -> CupsClient.getJobAttributes() -> IppGetJobAttributesOperation(context).getPrintJobAttributes(url, userName, jobID) -> IppOperation.request() -> IppOperation.sendRequest()
The sendRequest method handles authentication (IppOperation.kt:149), so it should work.
At the moment i think the issue may be due to a different context, because the basic auth relies on shared preferences. However, this would mean it would also fail on non-https connections. I have not yet been able to test this, since this app also needs an upgrade for all it's gradle files so that it works with newer android-studio versions
Each time I submit a print job a get the Popup "Couldn't find job #, is it already finished?" (I use a HTTPS CUPS server with HTTP Authentication)
I think the reason for this message is that CupsService.kt:237 (updateJobStatus) and CupsService.kt:278 (getJobState) use CUPS unauthenticated to send the Get-Job-Attributes request to the CUPS server, which answers with 401 (I checked this with wireshark)
(Btw, Printing works perfectly it's more of a cosmetic thing)