Class: Rack::Auth::BasicPath::Request

Inherits:
Auth::AbstractRequest
  • Object
show all
Defined in:
lib/basic_path.rb

Instance Method Summary collapse

Instance Method Details

#basic?Boolean

Returns:

  • (Boolean)


43
44
45
# File 'lib/basic_path.rb', line 43

def basic?
  "basic" == scheme
end

#credentialsObject



47
48
49
# File 'lib/basic_path.rb', line 47

def credentials
  @credentials ||= params.unpack("m*").first.split(/:/, 2)
end

#usernameObject



51
52
53
# File 'lib/basic_path.rb', line 51

def username
  credentials.first
end