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

Add support for stale directive for digest authenticator #80

Merged
merged 2 commits into from
Jul 23, 2024
Merged

Add support for stale directive for digest authenticator #80

merged 2 commits into from
Jul 23, 2024

Conversation

hustern
Copy link
Contributor

@hustern hustern commented Jul 23, 2024

Hi studio-b12 members !

First of all, I'd like to thank you for this wonderful/easy-to-use Webdav Go package 😃

I'm opening this PR because I recently faced an issue trying to connect to a Webdav server using Digest auth mechanism.
Client successfully connected to this server using digest authenticator, but after some time it was rejected by the server with 401 status codes.

I took a look at the RFC2617 (Section 3.2.1 The WWW-Authenticate Response Header), and it seems that the server can invalidate the generated nonce value after some time (which is my case). However, in such case, the stale directive is added to the WWW-Authenticate header, indicating to the client to re-authenticate without reprompting the user for username and password.

So I forked your project and did a small change in the Verify method of the DigestAuth authenticator to handle such case. I thought you might be interested with these changes 😉

@chripo
Copy link
Member

chripo commented Jul 23, 2024

You're welcome.
Tanks for the improvement and your Tests.
LGTM.

@chripo chripo merged commit bce1461 into studio-b12:master Jul 23, 2024
3 checks passed
@hustern hustern deleted the improvement/HandleStaleDirective branch July 23, 2024 11:18
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

Successfully merging this pull request may close these issues.

2 participants