Method: Postview::Authentication#authenticate!

Defined in:
lib/postview/authentication.rb

#authenticate!Object

Run HTTP Basic authentication.



20
21
22
23
24
# File 'lib/postview/authentication.rb', line 20

def authenticate!
  headers "WWW-Authenticate" => %(Basic realm="#{@site.title}") and
  @error_message = "Not authorized\n" and throw(:halt, [401, erb(:error)]) and
  return unless authenticated?
end