apple / cups

Apple CUPS Sources
https://www.cups.org
Apache License 2.0
1.85k stars 452 forks source link

Connect to cups server (which has basic authentication enabled) using pycups library #6157

Open rival123 opened 6 months ago

rival123 commented 6 months ago

I am using cups version 2.2.10. Cups server is Basic Authentication enabled. And I am using pycups = 2.0.1 as a client library to connect to cups server. But I am unable to make successful connection using pycups because it doesn't provide support for adding password. We can set server, port and user but not able to find how we can set Password.

cups.setServer(self.configuration.cups_server) cups.setPort(self.configuration.cups_port) cups.setUser(self.configuration.cups_user)

I also tried adding callback but that also doesn't seem to work-

def password(self): return self.configuration.cups_user cups.setPasswordCB(self.password)

Getting Unauthorized error every time. Is there any way I can make a connection using pycups when cups server has Basic Authentication Enabled?

https://github.com/apple/cups/issues/5288#issue-310976543 - what is resolution for this issue