Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation - Authentication method slightly unclear #5

Open
stutwoby opened this issue May 4, 2022 · 1 comment
Open

Documentation - Authentication method slightly unclear #5

stutwoby opened this issue May 4, 2022 · 1 comment

Comments

@stutwoby
Copy link

stutwoby commented May 4, 2022

I was working on a project recently using the CloudPrnt SDK and we attempted to use the username/password combo for authentication. It might be obvious in hindsight but it would be good to include some detail in the documentation relating to how the username and password gets passed up and to include that it will only be passed up if the server provides a WWW-authenticate header.

@CupNoodles
Copy link

In case this is helpful to anybody in the future - it appears that the Basic Auth header values are only sent from your printer if the server responds with an HTTP code 401 Access Denied as well as the WWW-Authenticate: Basic header.

Testing on an mc-print3, this is true for all communications initiated by the printer, so POST/GET/DELETE all need to try once without the headers and get the 401, after which it'll retry the same request with username and password in the header.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants