Module: Sinatra::Authentication::Identification

Defined in:
lib/sinatra/authentication/identification.rb

Instance Method Summary collapse

Instance Method Details

#authenticate(login, password) ⇒ Object



4
5
6
7
8
9
10
# File 'lib/sinatra/authentication/identification.rb', line 4

def authenticate(, password)
    if user = ()
        if Password::Hashing.check?(password, user.password)
            user
        end
    end
end

#find_by_login(login) ⇒ Object

NOTE: This is overridden in Ottoman.User



13
14
15
# File 'lib/sinatra/authentication/identification.rb', line 13

def ()
    find( => ).first
end