class HTTPBasicAuth

Overview

This middleware adds HTTP Basic Auth support to your application. Returns 401 "Unauthorized" with wrong credentials.

basic_auth "username", "password"

Included Modules

Defined in:

kemal-basic-auth.cr

Constant Summary

AUTH = "Authorization"
AUTH_MESSAGE = "Could not verify your access level for that URL.\nYou have to login with proper credentials"
BASIC = "Basic"
HEADER_LOGIN_REQUIRED = "Basic realm=\"Login Required\""

Constructors

Instance Method Summary

Constructor Detail

def self.new(username : String | Nil, password : String | Nil) #

[View source]

Instance Method Detail

def authorized?(value) #

[View source]
def call(context) #

[View source]