Class: Rack::Auth::Basic::Request
- Inherits:
-
AbstractRequest
show all
- Defined in:
- rack/rack/auth/basic.rb
Constant Summary
Instance Method Summary
(collapse)
Instance Method Details
- (Boolean) basic?
43
44
45
|
# File 'rack/rack/auth/basic.rb', line 43
def basic?
!parts.first.nil? && "basic" == scheme
end
|
- (void) credentials
47
48
49
|
# File 'rack/rack/auth/basic.rb', line 47
def credentials
@credentials ||= params.unpack("m*").first.split(/:/, 2)
end
|
- (void) username
51
52
53
|
# File 'rack/rack/auth/basic.rb', line 51
def username
credentials.first
end
|