<?xml version="1.0" encoding="iso-8859-1"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <head> <title>authorize! (Sinatra::LazyAuth)</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" /> </head> <body class="standalone-code"> <pre><span class="ruby-comment cmt"># File lib/sinatra/lazy_auth.rb, line 63</span> <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">authorize!</span> <span class="ruby-identifier">r</span> = <span class="ruby-node">"#{driver_symbol}-deltacloud@#{HOSTNAME}"</span> <span class="ruby-identifier">response</span>[<span class="ruby-value str">'WWW-Authenticate'</span>] = <span class="ruby-node">%(Basic realm="#{r}")</span> <span class="ruby-identifier">throw</span>(<span class="ruby-identifier">:halt</span>, [<span class="ruby-value">401</span>, <span class="ruby-value str">"Not authorized\n"</span>]) <span class="ruby-keyword kw">end</span></pre> </body> </html>