class HttpDigestAuthenticationTest::DummyDigestController
Constants
- USERS
Public Instance Methods
display()
click to toggle source
# File actionpack/test/controller/http_digest_authentication_test.rb, line 18 def display render plain: "Definitely Maybe" if @logged_in end
index()
click to toggle source
# File actionpack/test/controller/http_digest_authentication_test.rb, line 14 def index render plain: "Hello Secret" end
Private Instance Methods
authenticate()
click to toggle source
# File actionpack/test/controller/http_digest_authentication_test.rb, line 24 def authenticate authenticate_or_request_with_http_digest("SuperSecret") do |username| # Returns the password USERS[username] end end
authenticate_with_request()
click to toggle source
# File actionpack/test/controller/http_digest_authentication_test.rb, line 31 def authenticate_with_request if authenticate_with_http_digest("SuperSecret") { |username| USERS[username] } @logged_in = true else request_http_digest_authentication("SuperSecret", "Authentication Failed") end end