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

allow set passwords_hashed option for digest auth #2196

Conversation

lHydra
Copy link
Contributor

@lHydra lHydra commented Nov 1, 2021

Rack Digest Auth allows to check the user's credentials with ha1 digest hash instead of check with a plain password. But at the moment this functionality is not available because the condition from Rack::Auth::Digest::MD5 is always false

if opaque.nil? and realm.respond_to? :values_at
  realm, opaque, @passwords_hashed = realm.values_at :realm, :opaque, :passwords_hashed
end

(in the grape auth dsl we constantly set the option opaque - options[:opaque] ||= 'secret')

@lHydra lHydra force-pushed the allow_set_passwords_hashed_option_for_digest_auth branch from 5121976 to ed5410c Compare November 1, 2021 15:56
@lHydra lHydra force-pushed the allow_set_passwords_hashed_option_for_digest_auth branch from ed5410c to dd22f74 Compare November 8, 2021 08:01
@lHydra lHydra requested a review from dblock November 8, 2021 08:02
@dblock
Copy link
Member

dblock commented Nov 8, 2021

Needs a rubocop -a, sorry ;)

@lHydra lHydra force-pushed the allow_set_passwords_hashed_option_for_digest_auth branch from dd22f74 to 5c10814 Compare November 9, 2021 08:29
@lHydra
Copy link
Contributor Author

lHydra commented Nov 9, 2021

Needs a rubocop -a, sorry ;)

fixed

Copy link
Member

@dblock dblock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typos in README, sorry didn't catch them earlier.

@lHydra lHydra force-pushed the allow_set_passwords_hashed_option_for_digest_auth branch from 5c10814 to 68d62d5 Compare November 10, 2021 09:26
@lHydra lHydra requested a review from dblock November 10, 2021 09:27
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