class Crack::Handler::BasicAuth

Overview

This class provides Basic Authentication capabilities. The instance requires a username and password to be configured at creation.

Defined in:

crack/basicauth.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

Class Method Summary

Instance Method Summary

Instance methods inherited from class Crack::Handler::Base

call(context) call, config(&) config

Class methods inherited from class Crack::Handler::Base

config(&) config

Constructor Detail

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

[View source]
def self.new #

[View source]

Class Method Detail

def self.instance(username, password) #

[View source]
def self.instance #

[View source]

Instance Method Detail

def call(context) #
Description copied from class Crack::Handler::Base

Execution of this handler.


[View source]
def password : String | Nil #

[View source]
def password=(password : String | Nil) #

[View source]
def username : String | Nil #

[View source]
def username=(username : String | Nil) #

[View source]