<html>
<head>
<title>Rails OpenID Example Relying Party</title>
</head>
  <style type="text/css">
      * {
        font-family: verdana,sans-serif;
      }
      body {
        width: 50em;
        margin: 1em;
      }
      div {
        padding: .5em;
      }
      .alert {
        border: 1px solid #e7dc2b;
        background: #fff888;
      }
      .error {
        border: 1px solid #ff0000;
        background: #ffaaaa;
      }
      .success {
        border: 1px solid #00ff00;
        background: #aaffaa;
      }
      #verify-form {
        border: 1px solid #777777;
        background: #dddddd;
        margin-top: 1em;
        padding-bottom: 0em;
      }
      input.openid {
        background: url( /images/openid_login_bg.gif ) no-repeat;
        background-position: 0 50%;
        background-color: #fff;
        padding-left: 18px;
      }
  </style>
  <body>
    <h1>Rails OpenID Example Relying Party</h1>
    <% if flash[:alert] %>
      <div class='alert'>
       <%= h(flash[:alert]) %>
      </div>
    <% end %>
    <% if flash[:error] %>
      <div class='error'>
       <%= h(flash[:error]) %>
      </div>
    <% end %>
    <% if flash[:success] %>
      <div class='success'>
       <%= h(flash[:success]) %>
      </div>
    <% end %>
    <% if flash[:sreg_results] %>
      <div class='alert'>
      <%= flash[:sreg_results] %>
      </div>
    <% end %>
    <% if flash[:pape_results] %>
      <div class='alert'>
      <%= flash[:pape_results] %>
      </div>
    <% end %>
    <div id="verify-form">
      <form method="get" accept-charset="UTF-8" 
            action='<%= url_for :action => 'start' %>'>
        Identifier:
        <input type="text" class="openid" name="openid_identifier" />
        <input type="submit" value="Verify" /><br />
        <input type="checkbox" name="immediate" id="immediate" /><label for="immediate">Use immediate mode</label><br/>
        <input type="checkbox" name="use_sreg" id="use_sreg" /><label for="use_sreg">Request registration data</label><br/>
        <input type="checkbox" name="use_pape" id="use_pape" /><label for="use_pape">Request phishing-resistent auth policy (PAPE)</label><br/>
        <input type="checkbox" name="force_post" id="force_post" /><label for="force_post">Force the transaction to use POST by adding 2K of extra data</label>
      </form>
    </div>
  </body>
</html>
