Sophie

Sophie

distrib > Fedora > 15 > i386 > by-pkgid > 4b137326f38b5adf1f9ffd3dbbb48a7b > files > 1066

deltacloud-core-doc-0.4.0-4.fc15.noarch.rpm

<?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">&quot;#{driver_symbol}-deltacloud@#{HOSTNAME}&quot;</span>
      <span class="ruby-identifier">response</span>[<span class="ruby-value str">'WWW-Authenticate'</span>] = <span class="ruby-node">%(Basic realm=&quot;#{r}&quot;)</span>
      <span class="ruby-identifier">throw</span>(<span class="ruby-identifier">:halt</span>, [<span class="ruby-value">401</span>, <span class="ruby-value str">&quot;Not authorized\n&quot;</span>])
    <span class="ruby-keyword kw">end</span></pre>
</body>
</html>