<commit_before>

<% if session[:username].nil? %>

<div id="login-form">
  <form method="get" action="<%= url_for :controller => 'login', :action => 'submit' %>">
Type a username: 
  <input type="text" name="username" />
  <input type="submit" value="Log In" />
  </form>

</div>

<% end %>

<p>
Welcome to the Ruby OpenID server example.  This code is a starting point for developers wishing to implement an OpenID server on the <a href="http://rubyonrails.org/">Rails</a> platform.
</p> 

<h2>To use the example</h2>
<p>
  <ol>
    <li>Enter a username in the form above.  You will be "Logged In" to the server, at which point you may authenticate using an OpenID consumer. Your OpenID URL will be displayed after you log in.<p>The server will automatically create an identity page for you at <%= @base_url %>user/<i>name</i></p></li>
    <li>Run the example OpenID consumer: <blockquote>ruby examples/consumer.rb</blockquote></li>
    <li>In another browser window visit <a href="http://localhost:2000/">http://localhost:2000/</a>, and type your OpenID URL to verfiy your identity with this server.</li>
  </ol>

</p>



<commit_msg>[project @ examples/rails_openid/app/views/login: updated to reflect the fact that examples/consumer.rb is gone and RP example is integrated in this rails example]<commit_after>

<% if session[:username].nil? %>

<div id="login-form">
  <form method="get" action="<%= url_for :controller => 'login', :action => 'submit' %>">
Type a username: 
  <input type="text" name="username" />
  <input type="submit" value="Log In" />
  </form>

</div>

<% end %>

<p> Welcome to the Ruby OpenID example.  This code is a starting point
for developers wishing to implement an OpenID provider or relying
party.  We've used the <a href="http://rubyonrails.org/">Rails</a>
platform to demonstrate, but the library code is not Rails specific.</p>

<h2>To use the example provider</h2>
<p>
  <ol>

    <li>Enter a username in the form above.  You will be "Logged In"
    to the server, at which point you may authenticate using an OpenID
    consumer. Your OpenID URL will be displayed after you log
    in.<p>The server will automatically create an identity page for
    you at <%= @base_url %>user/<i>name</i></p></li>

    <li><p>Because WEBrick can only handle one thing at a time, you'll need to
    run another instance of the example on another port if you want to use
    a relying party to use with this example provider:</p>
    <blockquote>
    <code>script/server --port=3001</code>
    </blockquote>

    <p>(The RP needs to be able to access the provider, so unless you're
    running this example on a public IP, you can't use the live example
    at <a href="http://openidenabled.com/">openidenabled.com</a> on
    your local provider.)</p>
    </li>

    <li>Point your browser to this new instance and follow the directions
    below.</li>
    <!-- Fun fact: 'url_for :port => 3001' doesn't work very well. -->
  </ol>

</p>

<h2>To use the example relying party</h2>

<p>Visit <a href="<%= url_for :controller => 'consumer' %>">/consumer</a>
and enter your OpenID.</p>
</p>

{'fraction_non_alphanumeric': 0.13688946015424164, 'fraction_numerical': 0.007069408740359897, 'mean_word_length': 3.7599388379204894, 'pattern_counts': {'":': 0, '<': 86, '<?xml version=': 0, '>': 92, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2973503', 'n_tokens_mistral': 1027, 'n_tokens_neox': 953, 'n_words': 389}