Class: Htpasswd::Auths::Basic
- Inherits:
-
Base
- Object
- Base
- Htpasswd::Auths::Basic
show all
- Defined in:
- lib/htpasswd/auths/basic.rb
Instance Attribute Summary
Attributes inherited from Base
#options
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Base
<=>, #authorize, #authorize_pass, #authorize_type, #authorize_user, #initialize, #pass, #random, #realm, #scheme, #set_controller, #user
Class Method Details
.parse(data) ⇒ Object
5
6
7
8
|
# File 'lib/htpasswd/auths/basic.rb', line 5
def parse(data)
user, pass = Base64.decode64(data.to_s).split(':', 2)
new(:user=>user, :pass=>pass)
end
|
.strength ⇒ Object
10
11
12
|
# File 'lib/htpasswd/auths/basic.rb', line 10
def strength
10
end
|
Instance Method Details
15
16
17
|
# File 'lib/htpasswd/auths/basic.rb', line 15
def
%Q|Basic realm="%s"| % realm
end
|