shaj13 / go-guardian

Go-Guardian is a golang library that provides a simple, clean, and idiomatic way to create powerful modern API and web authentication.
MIT License
543 stars 55 forks source link

Digest Example doesn't work on Chrome or FF #84

Closed dhubler closed 3 years ago

dhubler commented 3 years ago

Chrome returns "MD5" as algorithm, not "md5" and you get error

 send error strategies/digest: algorithm Does not match value in provided header 

Workaround:

alg := digest.SetHash(crypto.MD5, "MD5")
strategy = digest.New(validateUser, c, alg)
shaj13 commented 3 years ago

@dhubler good catch, thank you for reporting

shaj13 commented 3 years ago

@dhubler to get the fixe upgrade to v2.11.1