class
Kemal::BasicAuth::Credentials
- Kemal::BasicAuth::Credentials
- Kemal::BasicAuth::Verifier
- Reference
- Object
Overview
Plaintext credentials verifier backed by a Hash(String, String).
Comparison is performed in length-equalized form (SHA-256 digests) so the
response time does not depend on whether the username exists or how the
given password compares to the stored one. SHA-256 is used purely for
timing equalization here, not for password storage; if you need hashed
storage use BcryptVerifier.
Defined in:
kemal-basic-auth/credentials.crConstructors
Instance Method Summary
-
#authorize?(username : String, password : String) : String | Nil
Returns the authorized username on success, or
nilotherwise.
Instance methods inherited from class Kemal::BasicAuth::Verifier
authorize?(username : String, password : String) : String | Nil
authorize?
Constructor Detail
Instance Method Detail
def authorize?(username : String, password : String) : String | Nil
#
Description copied from class Kemal::BasicAuth::Verifier
Returns the authorized username on success, or nil otherwise.