Kemal::BasicAuth::BcryptVerifier
Inherits Kemal::BasicAuth::Verifier < Reference < Object
Verifier backed by bcrypt-hashed passwords.
Entries map a username to an existing bcrypt hash string (e.g. produced via
Crypto::Bcrypt::Password.create("plain").to_s). Verification always
performs a bcrypt computation (real or dummy) so that response time does
not reveal whether the username exists.
hash = Crypto::Bcrypt::Password.create("xyz").to_s
verifier = Kemal::BasicAuth::BcryptVerifier.new({"admin" => hash})
Constructors
Class methods
dummy_hash
Source