Class: HealthCheck::MiddlewareHealthcheck::Request

Inherits:
Rack::Auth::AbstractRequest
  • Object
show all
Defined in:
lib/health_check/middleware_health_check.rb

Instance Method Summary collapse

Instance Method Details

#basic?Boolean

Returns:

  • (Boolean)


84
85
86
# File 'lib/health_check/middleware_health_check.rb', line 84

def basic?
  scheme == 'basic'
end

#credentialsObject



88
89
90
# File 'lib/health_check/middleware_health_check.rb', line 88

def credentials
  @credentials ||= params.unpack1('m*').split(/:/, 2)
end

#passwordObject



96
97
98
# File 'lib/health_check/middleware_health_check.rb', line 96

def password
  credentials.last
end

#usernameObject



92
93
94
# File 'lib/health_check/middleware_health_check.rb', line 92

def username
  credentials.first
end