incubator-heraldry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From quellho...@apache.org
Subject svn commit: r449142 [14/31] - in /incubator/heraldry: idp/ idp/pip/ idp/pip/branches/ idp/pip/tags/ idp/pip/trunk/ idp/pip/trunk/app/ idp/pip/trunk/app/controllers/ idp/pip/trunk/app/helpers/ idp/pip/trunk/app/models/ idp/pip/trunk/app/views/ idp/pip/t...
Date Sat, 23 Sep 2006 01:37:43 GMT
Added: incubator/heraldry/idp/pip/trunk/doc/app/files/doc/README_FOR_APP.html
URL: http://svn.apache.org/viewvc/incubator/heraldry/idp/pip/trunk/doc/app/files/doc/README_FOR_APP.html?view=auto&rev=449142
==============================================================================
--- incubator/heraldry/idp/pip/trunk/doc/app/files/doc/README_FOR_APP.html (added)
+++ incubator/heraldry/idp/pip/trunk/doc/app/files/doc/README_FOR_APP.html Fri Sep 22 18:37:26 2006
@@ -0,0 +1,109 @@
+<?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 xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+  <title>File: README_FOR_APP</title>
+  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+  <meta http-equiv="Content-Script-Type" content="text/javascript" />
+  <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
+  <script type="text/javascript">
+  // <![CDATA[
+
+  function popupCode( url ) {
+    window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
+  }
+
+  function toggleCode( id ) {
+    if ( document.getElementById )
+      elem = document.getElementById( id );
+    else if ( document.all )
+      elem = eval( "document.all." + id );
+    else
+      return false;
+
+    elemStyle = elem.style;
+    
+    if ( elemStyle.display != "block" ) {
+      elemStyle.display = "block"
+    } else {
+      elemStyle.display = "none"
+    }
+
+    return true;
+  }
+  
+  // Make codeblocks hidden by default
+  document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
+  
+  // ]]>
+  </script>
+
+</head>
+<body>
+
+
+
+  <div id="fileHeader">
+    <h1>README_FOR_APP</h1>
+    <table class="header-table">
+    <tr class="top-aligned-row">
+      <td><strong>Path:</strong></td>
+      <td>doc/README_FOR_APP
+      </td>
+    </tr>
+    <tr class="top-aligned-row">
+      <td><strong>Last Update:</strong></td>
+      <td>Fri Mar 31 15:31:13 EST 2006</td>
+    </tr>
+    </table>
+  </div>
+  <!-- banner header -->
+
+  <div id="bodyContent">
+
+
+
+  <div id="contextContent">
+
+    <div id="description">
+      <p>
+Use this README file to introduce your application and point to useful
+places in the API for learning more. Run &quot;rake appdoc&quot; to
+generate API documentation for your models and controllers.
+</p>
+
+    </div>
+
+
+   </div>
+
+
+  </div>
+
+
+    <!-- if includes -->
+
+    <div id="section">
+
+
+
+
+
+      
+
+
+    <!-- if method_list -->
+
+
+  </div>
+
+
+<div id="validator-badges">
+  <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
+</div>
+
+</body>
+</html>
\ No newline at end of file

Added: incubator/heraldry/idp/pip/trunk/doc/app/fr_class_index.html
URL: http://svn.apache.org/viewvc/incubator/heraldry/idp/pip/trunk/doc/app/fr_class_index.html?view=auto&rev=449142
==============================================================================
--- incubator/heraldry/idp/pip/trunk/doc/app/fr_class_index.html (added)
+++ incubator/heraldry/idp/pip/trunk/doc/app/fr_class_index.html Fri Sep 22 18:37:26 2006
@@ -0,0 +1,53 @@
+
+<?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">
+
+<!--
+
+    Classes
+
+  -->
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+  <title>Classes</title>
+  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+  <link rel="stylesheet" href="rdoc-style.css" type="text/css" />
+  <base target="docwin" />
+</head>
+<body>
+<div id="index">
+  <h1 class="section-bar">Classes</h1>
+  <div id="index-entries">
+    <a href="classes/AccountController.html">AccountController</a><br />
+    <a href="classes/AccountHelper.html">AccountHelper</a><br />
+    <a href="classes/ApplicationController.html">ApplicationController</a><br />
+    <a href="classes/ApplicationHelper.html">ApplicationHelper</a><br />
+    <a href="classes/Association.html">Association</a><br />
+    <a href="classes/Avatar.html">Avatar</a><br />
+    <a href="classes/AvatarController.html">AvatarController</a><br />
+    <a href="classes/CaptchaController.html">CaptchaController</a><br />
+    <a href="classes/Ledger.html">Ledger</a><br />
+    <a href="classes/LedgersController.html">LedgersController</a><br />
+    <a href="classes/Nonce.html">Nonce</a><br />
+    <a href="classes/Profile.html">Profile</a><br />
+    <a href="classes/ProfilesController.html">ProfilesController</a><br />
+    <a href="classes/Property.html">Property</a><br />
+    <a href="classes/PropertyType.html">PropertyType</a><br />
+    <a href="classes/PropertyTypesController.html">PropertyTypesController</a><br />
+    <a href="classes/PropertyTypesHelper.html">PropertyTypesHelper</a><br />
+    <a href="classes/ServerController.html">ServerController</a><br />
+    <a href="classes/ServerHelper.html">ServerHelper</a><br />
+    <a href="classes/SitePingController.html">SitePingController</a><br />
+    <a href="classes/StaticController.html">StaticController</a><br />
+    <a href="classes/Trust.html">Trust</a><br />
+    <a href="classes/TrustsController.html">TrustsController</a><br />
+    <a href="classes/TrustsHelper.html">TrustsHelper</a><br />
+    <a href="classes/User.html">User</a><br />
+    <a href="classes/UserNotifier.html">UserNotifier</a><br />
+    <a href="classes/UserObserver.html">UserObserver</a><br />
+  </div>
+</div>
+</body>
+</html>
\ No newline at end of file

Added: incubator/heraldry/idp/pip/trunk/doc/app/fr_file_index.html
URL: http://svn.apache.org/viewvc/incubator/heraldry/idp/pip/trunk/doc/app/fr_file_index.html?view=auto&rev=449142
==============================================================================
--- incubator/heraldry/idp/pip/trunk/doc/app/fr_file_index.html (added)
+++ incubator/heraldry/idp/pip/trunk/doc/app/fr_file_index.html Fri Sep 22 18:37:26 2006
@@ -0,0 +1,58 @@
+
+<?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">
+
+<!--
+
+    Files
+
+  -->
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+  <title>Files</title>
+  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+  <link rel="stylesheet" href="rdoc-style.css" type="text/css" />
+  <base target="docwin" />
+</head>
+<body>
+<div id="index">
+  <h1 class="section-bar">Files</h1>
+  <div id="index-entries">
+    <a href="files/app/controllers/account_controller_rb.html">app/controllers/account_controller.rb</a><br />
+    <a href="files/app/controllers/application_rb.html">app/controllers/application.rb</a><br />
+    <a href="files/app/controllers/avatar_controller_rb.html">app/controllers/avatar_controller.rb</a><br />
+    <a href="files/app/controllers/captcha_controller_rb.html">app/controllers/captcha_controller.rb</a><br />
+    <a href="files/app/controllers/ledgers_controller_rb.html">app/controllers/ledgers_controller.rb</a><br />
+    <a href="files/app/controllers/profiles_controller_rb.html">app/controllers/profiles_controller.rb</a><br />
+    <a href="files/app/controllers/property_types_controller_rb.html">app/controllers/property_types_controller.rb</a><br />
+    <a href="files/app/controllers/server_controller_rb.html">app/controllers/server_controller.rb</a><br />
+    <a href="files/app/controllers/site_ping_controller_rb.html">app/controllers/site_ping_controller.rb</a><br />
+    <a href="files/app/controllers/static_controller_rb.html">app/controllers/static_controller.rb</a><br />
+    <a href="files/app/controllers/trusts_controller_rb.html">app/controllers/trusts_controller.rb</a><br />
+    <a href="files/app/helpers/account_helper_rb.html">app/helpers/account_helper.rb</a><br />
+    <a href="files/app/helpers/application_helper_rb.html">app/helpers/application_helper.rb</a><br />
+    <a href="files/app/helpers/ledgers_helper_rb.html">app/helpers/ledgers_helper.rb</a><br />
+    <a href="files/app/helpers/profiles_helper_rb.html">app/helpers/profiles_helper.rb</a><br />
+    <a href="files/app/helpers/property_types_helper_rb.html">app/helpers/property_types_helper.rb</a><br />
+    <a href="files/app/helpers/server_helper_rb.html">app/helpers/server_helper.rb</a><br />
+    <a href="files/app/helpers/site_ping_helper_rb.html">app/helpers/site_ping_helper.rb</a><br />
+    <a href="files/app/helpers/static_helper_rb.html">app/helpers/static_helper.rb</a><br />
+    <a href="files/app/helpers/trusts_helper_rb.html">app/helpers/trusts_helper.rb</a><br />
+    <a href="files/app/models/association_rb.html">app/models/association.rb</a><br />
+    <a href="files/app/models/avatar_rb.html">app/models/avatar.rb</a><br />
+    <a href="files/app/models/ledger_rb.html">app/models/ledger.rb</a><br />
+    <a href="files/app/models/nonce_rb.html">app/models/nonce.rb</a><br />
+    <a href="files/app/models/profile_rb.html">app/models/profile.rb</a><br />
+    <a href="files/app/models/property_rb.html">app/models/property.rb</a><br />
+    <a href="files/app/models/property_type_rb.html">app/models/property_type.rb</a><br />
+    <a href="files/app/models/trust_rb.html">app/models/trust.rb</a><br />
+    <a href="files/app/models/user_rb.html">app/models/user.rb</a><br />
+    <a href="files/app/models/user_notifier_rb.html">app/models/user_notifier.rb</a><br />
+    <a href="files/app/models/user_observer_rb.html">app/models/user_observer.rb</a><br />
+    <a href="files/doc/README_FOR_APP.html">doc/README_FOR_APP</a><br />
+  </div>
+</div>
+</body>
+</html>
\ No newline at end of file

Added: incubator/heraldry/idp/pip/trunk/doc/app/fr_method_index.html
URL: http://svn.apache.org/viewvc/incubator/heraldry/idp/pip/trunk/doc/app/fr_method_index.html?view=auto&rev=449142
==============================================================================
--- incubator/heraldry/idp/pip/trunk/doc/app/fr_method_index.html (added)
+++ incubator/heraldry/idp/pip/trunk/doc/app/fr_method_index.html Fri Sep 22 18:37:26 2006
@@ -0,0 +1,179 @@
+
+<?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">
+
+<!--
+
+    Methods
+
+  -->
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+  <title>Methods</title>
+  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+  <link rel="stylesheet" href="rdoc-style.css" type="text/css" />
+  <base target="docwin" />
+</head>
+<body>
+<div id="index">
+  <h1 class="section-bar">Methods</h1>
+  <div id="index-entries">
+    <a href="classes/ServerController.html#M000077">a_profile_was_chosen? (ServerController)</a><br />
+    <a href="classes/ApplicationController.html#M000061">account_subdomain (ApplicationController)</a><br />
+    <a href="classes/User.html#M000032">activate (User)</a><br />
+    <a href="classes/AccountController.html#M000015">activate (AccountController)</a><br />
+    <a href="classes/UserNotifier.html#M000108">activation (UserNotifier)</a><br />
+    <a href="classes/Trust.html#M000005">active? (Trust)</a><br />
+    <a href="classes/ApplicationHelper.html#M000144">add_blank_option (ApplicationHelper)</a><br />
+    <a href="classes/User.html#M000029">add_global_properties (User)</a><br />
+    <a href="classes/Profile.html#M000010">add_properties (Profile)</a><br />
+    <a href="classes/ServerController.html#M000087">add_sreg (ServerController)</a><br />
+    <a href="classes/UserObserver.html#M000002">after_create (UserObserver)</a><br />
+    <a href="classes/UserObserver.html#M000003">after_save (UserObserver)</a><br />
+    <a href="classes/ApplicationHelper.html#M000136">arrays_to_hash (ApplicationHelper)</a><br />
+    <a href="classes/User.html#M000030">authenticate (User)</a><br />
+    <a href="classes/User.html#M000031">authenticated? (User)</a><br />
+    <a href="classes/ServerController.html#M000081">authorize_the_consumer_site (ServerController)</a><br />
+    <a href="classes/PropertyTypesHelper.html#M000132">category_delete_icon_if_necessary (PropertyTypesHelper)</a><br />
+    <a href="classes/PropertyTypesHelper.html#M000128">category_label_or_input_for (PropertyTypesHelper)</a><br />
+    <a href="classes/ServerController.html#M000085">check_for_human (ServerController)</a><br />
+    <a href="classes/ServerController.html#M000091">check_for_xml (ServerController)</a><br />
+    <a href="classes/ServerController.html#M000068">checkid_request? (ServerController)</a><br />
+    <a href="classes/AccountController.html#M000014">complete_signup (AccountController)</a><br />
+    <a href="classes/ServerController.html#M000070">consumer_site_is_authorized? (ServerController)</a><br />
+    <a href="classes/ApplicationHelper.html#M000137">controller_action (ApplicationHelper)</a><br />
+    <a href="classes/ApplicationHelper.html#M000149">country_options_for_select (ApplicationHelper)</a><br />
+    <a href="classes/ProfilesController.html#M000116">create (ProfilesController)</a><br />
+    <a href="classes/PropertyTypesController.html#M000052">create (PropertyTypesController)</a><br />
+    <a href="classes/AvatarController.html#M000122">create (AvatarController)</a><br />
+    <a href="classes/ServerController.html#M000079">create_a_new_profile (ServerController)</a><br />
+    <a href="classes/ServerController.html#M000082">create_trust (ServerController)</a><br />
+    <a href="classes/ServerController.html#M000102">create_trust_if_necessary (ServerController)</a><br />
+    <a href="classes/ServerController.html#M000096">create_trust_xml (ServerController)</a><br />
+    <a href="classes/ApplicationHelper.html#M000141">current_avatar (ApplicationHelper)</a><br />
+    <a href="classes/ServerController.html#M000065">decision (ServerController)</a><br />
+    <a href="classes/AccountHelper.html#M000125">default_value_for_login (AccountHelper)</a><br />
+    <a href="classes/PropertyTypesHelper.html#M000129">delete_icon_if_necessary (PropertyTypesHelper)</a><br />
+    <a href="classes/ServerController.html#M000094">delete_trust (ServerController)</a><br />
+    <a href="classes/PropertyTypesController.html#M000056">destroy (PropertyTypesController)</a><br />
+    <a href="classes/TrustsController.html#M000059">destroy (TrustsController)</a><br />
+    <a href="classes/ProfilesController.html#M000118">destroy (ProfilesController)</a><br />
+    <a href="classes/PropertyTypesController.html#M000057">destroy_property (PropertyTypesController)</a><br />
+    <a href="classes/ProfilesController.html#M000114">edit (ProfilesController)</a><br />
+    <a href="classes/PropertyTypesController.html#M000054">edit (PropertyTypesController)</a><br />
+    <a href="classes/AccountController.html#M000017">edit (AccountController)</a><br />
+    <a href="classes/User.html#M000034">email_verified? (User)</a><br />
+    <a href="classes/User.html#M000040">encrypt (User)</a><br />
+    <a href="classes/User.html#M000041">encrypt (User)</a><br />
+    <a href="classes/User.html#M000038">encrypt_password (User)</a><br />
+    <a href="classes/ApplicationHelper.html#M000140">error_messages_for (ApplicationHelper)</a><br />
+    <a href="classes/ServerController.html#M000086">extract_identity (ServerController)</a><br />
+    <a href="classes/User.html#M000026">find_by_property_type (User)</a><br />
+    <a href="classes/Profile.html#M000007">find_by_property_type (Profile)</a><br />
+    <a href="classes/PropertyType.html#M000044">find_children (PropertyType)</a><br />
+    <a href="classes/User.html#M000024">find_children_of (User)</a><br />
+    <a href="classes/PropertyType.html#M000043">find_global_leaves (PropertyType)</a><br />
+    <a href="classes/PropertyType.html#M000045">find_leaf_nodes (PropertyType)</a><br />
+    <a href="classes/ServerController.html#M000078">find_the_profile (ServerController)</a><br />
+    <a href="classes/AccountController.html#M000018">forgot_password (AccountController)</a><br />
+    <a href="classes/TrustsHelper.html#M000123">format_expired_for (TrustsHelper)</a><br />
+    <a href="classes/ApplicationHelper.html#M000148">format_language (ApplicationHelper)</a><br />
+    <a href="classes/ServerController.html#M000088">format_sreg (ServerController)</a><br />
+    <a href="classes/ApplicationHelper.html#M000151">friendly_property_value (ApplicationHelper)</a><br />
+    <a href="classes/Association.html#M000004">from_record (Association)</a><br />
+    <a href="classes/ApplicationHelper.html#M000146">gender_options_for_select (ApplicationHelper)</a><br />
+    <a href="classes/ApplicationController.html#M000062">get_account_subdomain (ApplicationController)</a><br />
+    <a href="classes/ServerController.html#M000103">get_params_from_xml (ServerController)</a><br />
+    <a href="classes/PropertyType.html#M000049">has_grandchildren? (PropertyType)</a><br />
+    <a href="classes/Profile.html#M000009">has_properties? (Profile)</a><br />
+    <a href="classes/User.html#M000025">has_property? (User)</a><br />
+    <a href="classes/ServerHelper.html#M000152">hidden_fields_for_highlighting (ServerHelper)</a><br />
+    <a href="classes/AccountController.html#M000021">host_with_port (AccountController)</a><br />
+    <a href="classes/AccountHelper.html#M000124">host_with_port (AccountHelper)</a><br />
+    <a href="classes/ApplicationController.html#M000063">identity_url (ApplicationController)</a><br />
+    <a href="classes/ServerController.html#M000064">index (ServerController)</a><br />
+    <a href="classes/LedgersController.html#M000119">index (LedgersController)</a><br />
+    <a href="classes/ProfilesController.html#M000111">index (ProfilesController)</a><br />
+    <a href="classes/AccountController.html#M000011">index (AccountController)</a><br />
+    <a href="classes/PropertyTypesController.html#M000050">index (PropertyTypesController)</a><br />
+    <a href="classes/SitePingController.html#M000023">index (SitePingController)</a><br />
+    <a href="classes/ServerController.html#M000075">inform_the_consumer_site (ServerController)</a><br />
+    <a href="classes/ServerController.html#M000105">inform_the_xml_agent (ServerController)</a><br />
+    <a href="classes/ApplicationHelper.html#M000143">input_for_property (ApplicationHelper)</a><br />
+    <a href="classes/ServerController.html#M000095">is_create_trust? (ServerController)</a><br />
+    <a href="classes/ServerController.html#M000093">is_delete_trust? (ServerController)</a><br />
+    <a href="classes/PropertyType.html#M000047">is_global_or_owned_by? (PropertyType)</a><br />
+    <a href="classes/PropertyType.html#M000048">is_not_global_and_is_owned_by? (PropertyType)</a><br />
+    <a href="classes/ServerController.html#M000097">is_profile_list? (ServerController)</a><br />
+    <a href="classes/ServerController.html#M000099">is_query_profile? (ServerController)</a><br />
+    <a href="classes/ServerController.html#M000092">is_xml_request? (ServerController)</a><br />
+    <a href="classes/PropertyTypesHelper.html#M000126">label_or_input_for (PropertyTypesHelper)</a><br />
+    <a href="classes/ApplicationHelper.html#M000147">language_options_for_select (ApplicationHelper)</a><br />
+    <a href="classes/User.html#M000035">last_login (User)</a><br />
+    <a href="classes/LedgersController.html#M000120">list (LedgersController)</a><br />
+    <a href="classes/TrustsController.html#M000058">list (TrustsController)</a><br />
+    <a href="classes/ProfilesController.html#M000112">list (ProfilesController)</a><br />
+    <a href="classes/ServerController.html#M000074">log_the_action (ServerController)</a><br />
+    <a href="classes/AccountController.html#M000012">login (AccountController)</a><br />
+    <a href="classes/ServerController.html#M000101">login_user (ServerController)</a><br />
+    <a href="classes/AccountController.html#M000016">logout (AccountController)</a><br />
+    <a href="classes/User.html#M000036">make_activation_code (User)</a><br />
+    <a href="classes/ProfilesController.html#M000115">members (ProfilesController)</a><br />
+    <a href="classes/Profile.html#M000008">method_missing (Profile)</a><br />
+    <a href="classes/User.html#M000028">method_missing (User)</a><br />
+    <a href="classes/Trust.html#M000006">never_expires? (Trust)</a><br />
+    <a href="classes/CaptchaController.html#M000001">new (CaptchaController)</a><br />
+    <a href="classes/PropertyTypesController.html#M000051">new (PropertyTypesController)</a><br />
+    <a href="classes/ProfilesController.html#M000113">new (ProfilesController)</a><br />
+    <a href="classes/PropertyTypesHelper.html#M000134">new_field_button (PropertyTypesHelper)</a><br />
+    <a href="classes/PropertyTypesHelper.html#M000133">new_subcategory_button (PropertyTypesHelper)</a><br />
+    <a href="classes/User.html#M000027">openid (User)</a><br />
+    <a href="classes/ApplicationController.html#M000060">paginate_collection (ApplicationController)</a><br />
+    <a href="classes/User.html#M000039">password_required? (User)</a><br />
+    <a href="classes/UserNotifier.html#M000107">password_reset (UserNotifier)</a><br />
+    <a href="classes/PropertyTypesHelper.html#M000130">property_delete_icon_if_necessary (PropertyTypesHelper)</a><br />
+    <a href="classes/User.html#M000033">recently_activated? (User)</a><br />
+    <a href="classes/ServerController.html#M000076">redirect_user_to_create_new_authorization (ServerController)</a><br />
+    <a href="classes/PropertyTypesHelper.html#M000135">render_children (PropertyTypesHelper)</a><br />
+    <a href="classes/ApplicationHelper.html#M000138">render_help (ApplicationHelper)</a><br />
+    <a href="classes/ServerController.html#M000090">render_response (ServerController)</a><br />
+    <a href="classes/ServerController.html#M000089">render_trust_request (ServerController)</a><br />
+    <a href="classes/ServerController.html#M000104">render_xml_response (ServerController)</a><br />
+    <a href="classes/ServerController.html#M000071">request_is_checkid_immediate? (ServerController)</a><br />
+    <a href="classes/ServerController.html#M000072">request_is_checkid_setup? (ServerController)</a><br />
+    <a href="classes/AccountController.html#M000020">resend_confirmation (AccountController)</a><br />
+    <a href="classes/AccountController.html#M000019">reset_password (AccountController)</a><br />
+    <a href="classes/PropertyType.html#M000042">roots (PropertyType)</a><br />
+    <a href="classes/PropertyType.html#M000046">roots_global_or_owned_by (PropertyType)</a><br />
+    <a href="classes/User.html#M000037">save_avatar (User)</a><br />
+    <a href="classes/ApplicationHelper.html#M000145">select_option (ApplicationHelper)</a><br />
+    <a href="classes/ApplicationHelper.html#M000139">selected? (ApplicationHelper)</a><br />
+    <a href="classes/ServerController.html#M000080">set_flash_error_message (ServerController)</a><br />
+    <a href="classes/ServerController.html#M000083">set_req (ServerController)</a><br />
+    <a href="classes/ServerController.html#M000069">set_required_and_optional_fields (ServerController)</a><br />
+    <a href="classes/UserNotifier.html#M000109">setup_email (UserNotifier)</a><br />
+    <a href="classes/AvatarController.html#M000121">show (AvatarController)</a><br />
+    <a href="classes/PropertyTypesController.html#M000053">show (PropertyTypesController)</a><br />
+    <a href="classes/AccountController.html#M000013">signup (AccountController)</a><br />
+    <a href="classes/UserNotifier.html#M000106">signup_notification (UserNotifier)</a><br />
+    <a href="classes/ApplicationHelper.html#M000142">sort_link_for (ApplicationHelper)</a><br />
+    <a href="classes/PropertyTypesHelper.html#M000131">sub_category_delete_icon_if_necessary (PropertyTypesHelper)</a><br />
+    <a href="classes/PropertyTypesHelper.html#M000127">sub_category_label_or_input_for (PropertyTypesHelper)</a><br />
+    <a href="classes/ServerHelper.html#M000153">text_for_user_notification (ServerHelper)</a><br />
+    <a href="classes/ApplicationHelper.html#M000150">time_zone_options_for_select (ApplicationHelper)</a><br />
+    <a href="classes/ServerController.html#M000067">trust_profile_chosen? (ServerController)</a><br />
+    <a href="classes/ServerController.html#M000066">trust_request_param_exists? (ServerController)</a><br />
+    <a href="classes/PropertyTypesController.html#M000055">update (PropertyTypesController)</a><br />
+    <a href="classes/ProfilesController.html#M000117">update (ProfilesController)</a><br />
+    <a href="classes/ServerController.html#M000073">user_owns_identity_url? (ServerController)</a><br />
+    <a href="classes/Property.html#M000110">value (Property)</a><br />
+    <a href="classes/ServerController.html#M000084">verify_current_user_owns_identity_url (ServerController)</a><br />
+    <a href="classes/ServerController.html#M000098">xml_profile_list (ServerController)</a><br />
+    <a href="classes/ServerController.html#M000100">xml_query_profile (ServerController)</a><br />
+    <a href="classes/AccountController.html#M000022">yadis_request? (AccountController)</a><br />
+  </div>
+</div>
+</body>
+</html>
\ No newline at end of file

Added: incubator/heraldry/idp/pip/trunk/doc/app/index.html
URL: http://svn.apache.org/viewvc/incubator/heraldry/idp/pip/trunk/doc/app/index.html?view=auto&rev=449142
==============================================================================
--- incubator/heraldry/idp/pip/trunk/doc/app/index.html (added)
+++ incubator/heraldry/idp/pip/trunk/doc/app/index.html Fri Sep 22 18:37:26 2006
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!DOCTYPE html 
+     PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN"
+     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">
+
+<!--
+
+    Rails Application Documentation
+
+  -->
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+  <title>Rails Application Documentation</title>
+  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+</head>
+<frameset rows="20%, 80%">
+    <frameset cols="25%,35%,45%">
+        <frame src="fr_file_index.html"   title="Files" name="Files" />
+        <frame src="fr_class_index.html"  name="Classes" />
+        <frame src="fr_method_index.html" name="Methods" />
+    </frameset>
+    <frame src="files/doc/README_FOR_APP.html" name="docwin" />
+</frameset>
+</html>
\ No newline at end of file

Added: incubator/heraldry/idp/pip/trunk/doc/app/rdoc-style.css
URL: http://svn.apache.org/viewvc/incubator/heraldry/idp/pip/trunk/doc/app/rdoc-style.css?view=auto&rev=449142
==============================================================================
--- incubator/heraldry/idp/pip/trunk/doc/app/rdoc-style.css (added)
+++ incubator/heraldry/idp/pip/trunk/doc/app/rdoc-style.css Fri Sep 22 18:37:26 2006
@@ -0,0 +1,208 @@
+
+body {
+    font-family: Verdana,Arial,Helvetica,sans-serif;
+    font-size:   90%;
+    margin: 0;
+    margin-left: 40px;
+    padding: 0;
+    background: white;
+}
+
+h1,h2,h3,h4 { margin: 0; color: #efefef; background: transparent; }
+h1 { font-size: 150%; }
+h2,h3,h4 { margin-top: 1em; }
+
+a { background: #eef; color: #039; text-decoration: none; }
+a:hover { background: #039; color: #eef; }
+
+/* Override the base stylesheet's Anchor inside a table cell */
+td > a {
+  background: transparent;
+  color: #039;
+  text-decoration: none;
+}
+
+/* and inside a section title */
+.section-title > a {
+  background: transparent;
+  color: #eee;
+  text-decoration: none;
+}
+
+/* === Structural elements =================================== */
+
+div#index {
+    margin: 0;
+    margin-left: -40px;
+    padding: 0;
+    font-size: 90%;
+}
+
+
+div#index a {
+    margin-left: 0.7em;
+}
+
+div#index .section-bar {
+   margin-left: 0px;
+   padding-left: 0.7em;
+   background: #ccc;
+   font-size: small;
+}
+
+
+div#classHeader, div#fileHeader {
+    width: auto;
+    color: white;
+    padding: 0.5em 1.5em 0.5em 1.5em;
+    margin: 0;
+    margin-left: -40px;
+    border-bottom: 3px solid #006;
+}
+
+div#classHeader a, div#fileHeader a {
+    background: inherit;
+    color: white;
+}
+
+div#classHeader td, div#fileHeader td {
+    background: inherit;
+    color: white;
+}
+
+
+div#fileHeader {
+    background: #057;
+}
+
+div#classHeader {
+    background: #048;
+}
+
+
+.class-name-in-header {
+  font-size:  180%;
+  font-weight: bold;
+}
+
+
+div#bodyContent {
+    padding: 0 1.5em 0 1.5em;
+}
+
+div#description {
+    padding: 0.5em 1.5em;
+    background: #efefef;
+    border: 1px dotted #999;
+}
+
+div#description h1,h2,h3,h4,h5,h6 {
+    color: #125;;
+    background: transparent;
+}
+
+div#validator-badges {
+    text-align: center;
+}
+div#validator-badges img { border: 0; }
+
+div#copyright {
+    color: #333;
+    background: #efefef;
+    font: 0.75em sans-serif;
+    margin-top: 5em;
+    margin-bottom: 0;
+    padding: 0.5em 2em;
+}
+
+
+/* === Classes =================================== */
+
+table.header-table {
+    color: white;
+    font-size: small;
+}
+
+.type-note {
+    font-size: small;
+    color: #DEDEDE;
+}
+
+.xxsection-bar {
+    background: #eee;
+    color: #333;
+    padding: 3px;
+}
+
+.section-bar {
+   color: #333;
+   border-bottom: 1px solid #999;
+    margin-left: -20px;
+}
+
+
+.section-title {
+    background: #79a;
+    color: #eee;
+    padding: 3px;
+    margin-top: 2em;
+    margin-left: -30px;
+    border: 1px solid #999;
+}
+
+.top-aligned-row {  vertical-align: top }
+.bottom-aligned-row { vertical-align: bottom }
+
+/* --- Context section classes ----------------------- */
+
+.context-row { }
+.context-item-name { font-family: monospace; font-weight: bold; color: black; }
+.context-item-value { font-size: small; color: #448; }
+.context-item-desc { color: #333; padding-left: 2em; }
+
+/* --- Method classes -------------------------- */
+.method-detail {
+    background: #efefef;
+    padding: 0;
+    margin-top: 0.5em;
+    margin-bottom: 1em;
+    border: 1px dotted #ccc;
+}
+.method-heading {
+  color: black;
+  background: #ccc;
+  border-bottom: 1px solid #666;
+  padding: 0.2em 0.5em 0 0.5em;
+}
+.method-signature { color: black; background: inherit; }
+.method-name { font-weight: bold; }
+.method-args { font-style: italic; }
+.method-description { padding: 0 0.5em 0 0.5em; }
+
+/* --- Source code sections -------------------- */
+
+a.source-toggle { font-size: 90%; }
+div.method-source-code {
+    background: #262626;
+    color: #ffdead;
+    margin: 1em;
+    padding: 0.5em;
+    border: 1px dashed #999;
+    overflow: hidden;
+}
+
+div.method-source-code pre { color: #ffdead; overflow: hidden; }
+
+/* --- Ruby keyword styles --------------------- */
+
+.standalone-code { background: #221111; color: #ffdead; overflow: hidden; }
+
+.ruby-constant  { color: #7fffd4; background: transparent; }
+.ruby-keyword { color: #00ffff; background: transparent; }
+.ruby-ivar    { color: #eedd82; background: transparent; }
+.ruby-operator  { color: #00ffee; background: transparent; }
+.ruby-identifier { color: #ffdead; background: transparent; }
+.ruby-node    { color: #ffa07a; background: transparent; }
+.ruby-comment { color: #b22222; font-weight: bold; background: transparent; }
+.ruby-regexp  { color: #ffa07a; background: transparent; }
+.ruby-value   { color: #7fffd4; background: transparent; }
\ No newline at end of file

Added: incubator/heraldry/idp/pip/trunk/lib/active_record_store.rb
URL: http://svn.apache.org/viewvc/incubator/heraldry/idp/pip/trunk/lib/active_record_store.rb?view=auto&rev=449142
==============================================================================
--- incubator/heraldry/idp/pip/trunk/lib/active_record_store.rb (added)
+++ incubator/heraldry/idp/pip/trunk/lib/active_record_store.rb Fri Sep 22 18:37:26 2006
@@ -0,0 +1,111 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+begin
+  require_gem "ruby-openid", ">= 1.0"
+rescue LoadError
+  require "openid"
+end
+
+class ActiveRecordOpenIDStore < OpenID::Store
+  def get_auth_key
+    setting = Setting.find :first, :conditions => "setting = 'auth_key'"
+    if setting.nil?
+      auth_key = OpenID::Util.random_string(20)
+      setting = Setting.create :setting => 'auth_key', :value => auth_key
+    end
+    setting.value
+  end
+
+  def store_association(server_url, assoc)
+    remove_association(server_url, assoc.handle)    
+    Association.create(:server_url => server_url,
+                             :handle => assoc.handle,
+                             :secret => assoc.secret,
+                             :issued => assoc.issued,
+                             :lifetime => assoc.lifetime,
+                             :assoc_type => assoc.assoc_type)
+  end
+
+  def get_association(server_url, handle=nil)
+    
+    unless handle.nil?
+      assocs = Association.find(:all, :conditions => ["server_url = ? AND handle = ?", server_url, handle])
+    else
+      assocs = Association.find(:all, :conditions => ["server_url = ?", server_url])
+    end
+
+    return nil if assocs.nil?
+    
+    assocs.reverse!
+
+    assocs.each do |assoc|
+      a = assoc.from_record    
+      if a.expired?
+        assoc.destroy
+      else
+        return a
+      end
+    end
+
+    return nil
+  end
+
+  def remove_association(server_url, handle)
+    assoc = Association.find(:first, :conditions => ["server_url = ? AND handle = ?", server_url, handle])
+    unless assoc.nil?
+      assoc.destroy
+      return true
+    end
+    return false
+  end
+
+  def store_nonce(nonce)
+    use_nonce(nonce)
+    Nonce.create :nonce => nonce, :created => Time.now.to_i
+  end
+
+  def use_nonce(nonce)
+    nonce = Nonce.find(:first, :conditions => ["nonce = ?", nonce])
+    return false if nonce.nil?
+    
+    age = Time.now.to_i - nonce.created    
+    nonce.destroy
+
+    return false if age > (6*60*60) # max nonce age of 6 hours
+    return true
+  end
+
+  def dumb?
+    false
+  end
+
+  # not part of the api, but useful
+  def gc
+    now = Time.now.to_i
+
+    # remove old nonces
+    nonces = Nonce.find(:all)
+    nonces.each {|n| n.destroy if now - n.created > (6*60*60)} unless nonces.nil?
+
+    # remove expired assocs
+    assocs = Association.find(:all)
+    assocs.each { |a| a.destroy if a.from_record.expired? } unless assocs.nil?
+  end
+
+
+end

Added: incubator/heraldry/idp/pip/trunk/lib/app_config.rb
URL: http://svn.apache.org/viewvc/incubator/heraldry/idp/pip/trunk/lib/app_config.rb?view=auto&rev=449142
==============================================================================
--- incubator/heraldry/idp/pip/trunk/lib/app_config.rb (added)
+++ incubator/heraldry/idp/pip/trunk/lib/app_config.rb Fri Sep 22 18:37:26 2006
@@ -0,0 +1,5 @@
+class AppConfig
+  def self.host(request_host='')
+    APP_CONFIG[:app_host]
+  end
+end

Added: incubator/heraldry/idp/pip/trunk/lib/authenticated_system.rb
URL: http://svn.apache.org/viewvc/incubator/heraldry/idp/pip/trunk/lib/authenticated_system.rb?view=auto&rev=449142
==============================================================================
--- incubator/heraldry/idp/pip/trunk/lib/authenticated_system.rb (added)
+++ incubator/heraldry/idp/pip/trunk/lib/authenticated_system.rb Fri Sep 22 18:37:26 2006
@@ -0,0 +1,123 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+  module AuthenticatedSystem
+  protected
+  def logged_in?
+    current_user
+  end
+
+  # accesses the current user from the session.
+  def current_user
+    @current_user ||= session[:user] ? User.find_by_id(session[:user], :include => :avatar) : nil
+  end
+
+  # store the given user in the session. 
+  def current_user=(new_user)
+    session[:user] = new_user.nil? ? nil : new_user.id
+    @current_user = new_user
+  end
+
+  def default_account_subdomain
+    @current_user.login if logged_in?
+  end
+
+  # overwrite this if you want to restrict access to only a few actions
+  # or if you want to check if the user has the correct rights  
+  # example:
+  #
+  #  # only allow nonbobs
+  #  def authorize?(user)
+  #    user.login != "bob"
+  #  end
+  def authorized?(user)
+     account_subdomain ? user.login.downcase == account_subdomain.downcase : true
+  end
+
+  def has_access?(user)
+    logged_in? && current_user.login == user.login && authorized?(user)
+  end
+
+  # overwrite this method if you only want to protect certain actions of the controller
+  # example:
+  # 
+  #  # don't protect the login and the about method
+  #  def protect?(action)
+  #    if ['action', 'about'].include?(action)
+  #       return false
+  #    else
+  #       return true
+  #    end
+  #  end
+  def protect?(action)
+    true
+  end
+
+  # To require logins, use:
+  #
+  #   before_filter :login_required                            # restrict all actions
+  #   before_filter :login_required, :only => [:edit, :update] # only restrict these actions
+  # 
+  # To skip this in a subclassed controller:
+  #
+  #   skip_before_filter :login_required
+  # 
+  def login_required
+    # skip login check if action is not protected
+    return true unless protect?(action_name)
+
+    # check if user is logged in and authorized
+    return true if logged_in? and authorized?(current_user)
+    
+    # store current location so that we can 
+    # come back after the user logged in
+    store_location
+    
+    # call overwriteable reaction to unauthorized access
+    access_denied and return false
+  end
+
+  # overwrite if you want to have special behavior in case the user is not authorized
+  # to access the current operation. 
+  # the default action is to redirect to the login screen
+  # example use :
+  # a popup window might just close itself for instance
+  def access_denied
+    flash[:notice] = "Your account, #{current_user.login}, does not have access to " +
+                     "identity url: #{account_subdomain}.#{AppConfig.host(request.host)}.<br /> " +
+                     "Please login with an account that can access this identity url." if logged_in? && !authorized?(current_user)
+    redirect_to :controller=>"/account", :action =>"login"
+  end  
+
+  # store current uri in  the session.
+  # we can return to this location by calling return_location
+  def store_location
+    session[:return_to] = request.request_uri
+    session[:return_to_query] = request.env['QUERY_STRING']
+  end
+
+  # move to the last store_location call or to the passed default one
+  def redirect_back_or_default(default)
+    session[:return_to] ? redirect_to_url(session[:return_to]) : redirect_to(default)
+    session[:return_to] = nil
+  end
+
+  # adds ActionView helper methods
+  def self.included(base)
+    base.send :helper_method, :current_user, :logged_in?, :authorized?, :has_access?
+  end
+end

Added: incubator/heraldry/idp/pip/trunk/lib/authenticated_test_helper.rb
URL: http://svn.apache.org/viewvc/incubator/heraldry/idp/pip/trunk/lib/authenticated_test_helper.rb?view=auto&rev=449142
==============================================================================
--- incubator/heraldry/idp/pip/trunk/lib/authenticated_test_helper.rb (added)
+++ incubator/heraldry/idp/pip/trunk/lib/authenticated_test_helper.rb Fri Sep 22 18:37:26 2006
@@ -0,0 +1,48 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+module AuthenticatedTestHelper
+  # Sets the current user in the session from the user fixtures.
+  def login_as(user)
+    @request.session[:user] = users(user).id
+  end
+
+  # Assert the block redirects to the login
+  # 
+  #   assert_requires_login(:bob) { get :edit, :id => 1 }
+  #
+  def assert_requires_login(user = nil, &block)
+    login_as(user) if user
+    block.call
+    assert_redirected_to :controller => 'account', :action => 'login'
+  end
+
+  # Assert the block accepts the login
+  # 
+  #   assert_accepts_login(:bob) { get :edit, :id => 1 }
+  #
+  # Accepts anonymous logins:
+  #
+  #   assert_accepts_login { get :list }
+  #
+  def assert_accepts_login(user = nil, &block)
+    login_as(user) if user
+    block.call
+    assert_response :success
+  end
+
+end
\ No newline at end of file

Added: incubator/heraldry/idp/pip/trunk/lib/core_ext.rb
URL: http://svn.apache.org/viewvc/incubator/heraldry/idp/pip/trunk/lib/core_ext.rb?view=auto&rev=449142
==============================================================================
--- incubator/heraldry/idp/pip/trunk/lib/core_ext.rb (added)
+++ incubator/heraldry/idp/pip/trunk/lib/core_ext.rb Fri Sep 22 18:37:26 2006
@@ -0,0 +1,80 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+class Array
+  def subset?(other)
+    self.each do |x|
+      if !(other.include? x)
+        return false
+      end
+    end
+    true
+  end
+  
+  def superset?(other)
+    other.subset?(self)
+  end
+end
+
+class Object
+  def in?(collection)
+    collection.respond_to?(:include?) ? collection.include?(self) : false
+  end
+end
+
+# Helper methods for Hash, will need to be moved to core_ext.rb
+class Hash
+  def merge_and_delete!(args, keys_to_remove=[])
+    self.merge!(args)
+    self.delete_keys!(keys_to_remove)
+  end
+
+  def merge_and_delete(args, keys_to_remove=[])
+    ret = self.dup
+    ret.merge_and_delete!(args, keys_to_remove)
+    return ret
+  end
+
+  def xmlify
+    self.map {|key, value| "<#{key}>#{value}</#{key}>"}.join
+  end
+        
+  protected
+    def delete_keys!(keys_to_remove)
+      ret = []
+      case keys_to_remove
+      when Hash
+        keys_to_remove.each { |sub_key, value| ret << self[sub_key].delete_keys!(value) }
+      when Array
+        for key in keys_to_remove
+          case key
+          when Array
+            ret << self.delete_keys!(key)
+          when Hash
+            key.each { |sub_key, value| ret << self[sub_key].delete_keys!(value) }
+          else
+            ret << self.delete(key)
+          end
+        end
+      else
+        key = keys_to_remove
+        ret << self.delete(key)
+      end
+      return ret
+    end
+end
+

Added: incubator/heraldry/idp/pip/trunk/lib/idp_captcha.rb
URL: http://svn.apache.org/viewvc/incubator/heraldry/idp/pip/trunk/lib/idp_captcha.rb?view=auto&rev=449142
==============================================================================
--- incubator/heraldry/idp/pip/trunk/lib/idp_captcha.rb (added)
+++ incubator/heraldry/idp/pip/trunk/lib/idp_captcha.rb Fri Sep 22 18:37:26 2006
@@ -0,0 +1,160 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+# A lot of this was ripped from http://frankhale.org/CAPTCHA_RoR_Tutorial.html
+
+class IdpCaptcha
+  @@captcha_dir = 'public/images/captcha' unless defined? @@captcha_dir
+  
+  def self.captcha_dir=( cd ); @@captcha_dir = cd; end
+
+  attr_reader :filename, :code
+  
+  def initialize(length = 5)
+    @key = ('A'..'Z').to_a
+    
+    @white = [255, 255, 255]
+    @black = [0, 0, 0]
+    
+    @colors =[[255,255,255],
+              [100,100,100],
+              [180,180,180],
+              [120,120,120],
+              [rand(255),0,0],
+              [0,rand(255),0],
+              [0,0,rand(255)]]
+  end
+  
+  def generate(options = {})
+    delete_old_files
+    
+    options = {
+  		:fontsize => 25,
+  		:padding => 20,
+  		:color => '#000',
+  		:background => '#fff',
+  		:fontweight => 'bold',
+  		:font => 'Courier',
+  		:rotate => true,
+  		:length => 5
+  	}.update(options)
+
+    @code = create_code(options[:length])
+
+  	options[:fontweight] = case options[:fontweight]
+  		when 'bold' then 700
+  		else 400
+  	end
+	
+  	text = Magick::Draw.new
+  	text.pointsize = options[:fontsize]
+  	text.font_weight = options[:fontweight]
+  	text.fill = options[:color]
+  	text.font = options[:font]
+  	text.gravity = Magick::CenterGravity
+	
+  	#rotate text 5 degrees left or right
+  	text.rotation = (rand(2)==1 ? 5 : -5) if options[:rotate]
+	
+  	metric = text.get_type_metrics(@code)
+
+  	#add bg
+  	canvas = Magick::ImageList.new
+  	canvas << Magick::Image.new(metric.width+options[:padding], metric.height+options[:padding]){
+  		self.background_color = options[:background]
+  	}
+
+  	#add text
+  	canvas << Magick::Image.new(metric.width+options[:padding], metric.height+options[:padding]){
+  		self.background_color = '#000F'
+  	}.annotate(text, 0, 0, 0, 0, @code).wave(5, 50)
+
+  	canvas << Magick::Image.new(metric.width+options[:padding], metric.height+options[:padding]){
+  		p = Magick::Pixel.from_color(options[:background])
+  		p.opacity = Magick::MaxRGB/1.4
+  		self.background_color = p
+  	}.add_noise(Magick::LaplacianNoise)
+
+  	@image = canvas.flatten_images.blur_image(1)
+  	write_to_file
+  end
+
+  protected
+  def create_code(length)
+    code = ""
+    length.times do
+      code << @key[rand(@key.length)]
+    end
+    return code
+  end
+  
+  def write_to_file
+    @filename = File.join( @@captcha_dir, rand(99999).to_s << ".png" )
+		@image.write(@filename)
+  end
+  
+  def draw_background
+    color = @white
+    pat = Cairo::SolidPattern.new(color)
+    @image.rectangle(0,0, @image.width, @image.height)
+    @image.set_source(pat)
+    @image.fill
+    
+    num = 5
+    num.times do |i|
+      @image.set_source_rgb(random_color)
+      start_x = rand(@image.width/num) + (@image.width/num * i)
+      end_x = (@image.width / -2) + (2 * rand(@image.width))
+      @image.move_to(start_x, 0)
+      @image.line_to(end_x, @image.height)
+      @image.stroke
+    
+      start_x = rand(@image.width/num) + (@image.width/num * i)
+      middle_x = (@image.width / -2) + (2 * rand(@image.width))
+      middle_y = @image.height + rand(@image.height) / 2
+      end_x = (@image.width / -2) + (2 * rand(@image.width))
+      @image.move_to(start_x, 0)
+      @image.curve_to(start_x, 0, middle_x, middle_y, end_x, @image.height)
+      @image.stroke
+    end
+  end
+  
+  def random_color
+    @colors[rand(4)+3]
+  end
+  
+  # Don't see a way to do this natively with cairo
+  def draw_point(x, y, r, g, b)
+    @image.move_to(x, y)
+    @image.line_to(x + 1, y + 1)
+    @image.set_source_rgb(r, g, b)
+    @image.stroke
+  end
+  
+  def delete_old_files
+    Dir.open(@@captcha_dir) do |dir|
+      dir.each do |file|
+        unless file =~ /^\./
+          full_path = File.join(@@captcha_dir, file)
+          if Time.now.to_i - File.mtime( full_path ).to_i > 60
+            File.delete( full_path )
+          end
+        end
+      end
+    end
+  end
+end
\ No newline at end of file

Added: incubator/heraldry/idp/pip/trunk/lib/property_display_mixin.rb
URL: http://svn.apache.org/viewvc/incubator/heraldry/idp/pip/trunk/lib/property_display_mixin.rb?view=auto&rev=449142
==============================================================================
--- incubator/heraldry/idp/pip/trunk/lib/property_display_mixin.rb (added)
+++ incubator/heraldry/idp/pip/trunk/lib/property_display_mixin.rb Fri Sep 22 18:37:26 2006
@@ -0,0 +1,145 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+module PropertyDisplayMixin
+
+  # Create an input tag of the appropriate type for the given _property_.
+  # ====Parameters
+  # property:: The Property for which we are creating the input tag. It's PropertyType#control_type
+  #            and PropertyType#format determine what type of input will be used.
+  #            PropertyType#control_type == 'input_text' specifies a text box.
+  #            PropertyType#control_type == 'date_select' specifies a select date.
+  #            PropertyType#control_type == 'select' indicates a select box with the options specified by
+  #                                                  PropertyType#format
+  #            Available options for PropertyType#format are 'gender', 'langauge', 'country', and 'time_zone'
+  def input_for_property(property)
+    control_type = property.property_type.control_type
+    format = property.property_type.format
+    self.send("input_for_control_type_#{control_type}", property, format)
+  end
+
+  # Returns a user friendly version Property.value for display.
+  # ====Parameters
+  # property:: The Property to be formatted.
+  def friendly_property_value(property)
+    @@openid_map ||= current_user.properties.openid
+    return '' unless property.value && property.value != ''
+    
+    case property.property_type.short_name
+    when @@openid_map['dob']
+      property.value.to_time.strftime("%B %d, %Y")
+    when @@openid_map['timezone']
+      property.value.gsub(/\//, ' - ').gsub(/_/, ' ')
+    when @@openid_map['language']
+      language = Globalize::Language.find_by_iso_639_2(property.value)
+      format_language(language)
+    when @@openid_map['country']
+      begin
+        TZInfo::Country.get(property.value).name
+      rescue
+        property.value
+      end
+    else
+      property.value
+    end
+  end
+  
+private
+  def input_for_control_type_input_text(property, format)
+    return "<input class='profile-field' id='property_#{property.id}' name='property[#{property.id}]'" + 
+           " type='text' value='#{property.value}' />"
+  end
+
+  def input_for_control_type_date_select(property, format)
+    options = {:prefix => "property[#{property.id}]", :include_blank => true,
+               :start_year => 1930, :end_year => Date.today.year}
+    return '<div class="profile-field">' +
+           select_month(property.value, options) + 
+           select_day(property.value, options) + 
+           select_year(property.value, options) +
+           '</div>'
+  end
+
+  def input_for_control_type_select(property, format)
+    return select_tag("property[#{property.id}]",
+                      add_blank_option(self.send("#{format}_options_for_select".to_sym, property.value)),
+                      :class => 'profile-field')
+  end
+
+  # Adds a blank option to a group of select options. If no options are selected,
+  # then the blank option is marked as selected.
+  # ====Parameters
+  # options:: A string containing the options to which we are adding the blank option.
+  def add_blank_option(options)
+    selected = (options =~ /selected=/ ? '' : ' selected="selected"')
+    options =~ /value=""/ ? options : ("<option value=\"\"#{selected}></option>" + options)  
+  end
+
+  # Mark the _selected_ option as selected.
+  # ====Parameters
+  # options:: A string of options for a select statment.
+  # selected:: The value tag for the option that is to be selected.
+  def select_option(options, selected)
+    selected_string = ' selected="selected"'
+    if options =~ /value="#{selected}"/
+      return $` + $& + selected_string + $'
+    else
+      return options
+    end
+  end
+
+  # Returns select options for Male and Female.
+  # ====Parameters
+  # selected:: Specify an option to be selected. Accepted values are 'Male' and 'Female'
+  def gender_options_for_select(selected = nil)
+    return select_option(GENDER_OPTIONS_FOR_SELECT, selected)
+  end
+  
+  # Returns select options for a group of languages specified by the Globalize::Language class.
+  # ====Parameters
+  # selected:: Specify an option to be selected. Accepted values are the iso_639_2 values for
+  #            the language as specified in Globalize::Language
+  def language_options_for_select(selected = nil)
+    return select_option(LANGUAGE_OPTIONS_FOR_SELECT, selected)
+  end
+  
+  # Displays a Globalize::Language in a user friendly format.
+  # ====Parameters
+  # language:: The Globalize::Language to be formatted.
+  def format_language(language)
+    return '' unless language
+    return language.to_s + 
+           (language.english_name_locale ? " - #{language.english_name_locale}" : '') + 
+           (language.english_name_modifier ? " - #{language.english_name_modifier}" : '')
+  end
+
+  # Returns select options for the countries in TZInfo::Country.
+  # ====Parameters
+  # selected:: Specify a country to be selected using its country code specified
+  #            in TZInfo::Country.
+  def country_options_for_select(selected = nil)
+    return select_option(COUNTRY_OPTIONS_FOR_SELECT, selected)
+  end
+  
+  # Returns select options for TimeZones using the tz_database wrapped by TZInfo::Timezone
+  # ====Parameters
+  # select:: Specify a value using the identifier for the timezone used by TZInfo::Timezone
+  def time_zone_options_for_select(selected = nil)
+    return select_option(TIME_ZONE_OPTIONS_FOR_SELECT, selected)
+  end
+ 
+end

Added: incubator/heraldry/idp/pip/trunk/lib/select_options.rb
URL: http://svn.apache.org/viewvc/incubator/heraldry/idp/pip/trunk/lib/select_options.rb?view=auto&rev=449142
==============================================================================
--- incubator/heraldry/idp/pip/trunk/lib/select_options.rb (added)
+++ incubator/heraldry/idp/pip/trunk/lib/select_options.rb Fri Sep 22 18:37:26 2006
@@ -0,0 +1,124 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+def language_options
+  languages_to_remove = ["Afar", "Abkhazian", "Akan", "Aragonese", "Avaric", "Avestan", "Aymara", "Bashkir",
+                        "Bambara", "Bislama", "Chamorro", "Chechen", "Slavic", "Chuvash", "Cornish", "Cree", 
+                        "Divehi", "Dzongkha", "Esperanto", "Ewe", "Frisian", "Fulah", "Gallegan", "Manx", 
+                        "Guarani", "Hausa", "Herero", "Igbo", "Ido", "Yi", "Inuktitut", "Interlingue", 
+                        "Interlingua", "Inupiaq", "Kalaallisut", "Kanuri", "Kikuyu", "Kinyarwanda", 
+                        "Kirghiz", "Komi", "Kuanyama", "Limburgish", "Lingala", "Letzeburgesch", 
+                        "Luba-Katanga", "Ganda", "Marshall", "Malagasy", "Nauru", "Navajo", "Ndebele", 
+                        "Ndebele", "Ndonga", "Chichewa; Nyanja", "Occitan", "Ojibwa", "Oromo", 
+                        "Ossetian; Ossetic", "Pali", "Quechua", "Raeto-Romance", "Sango", "Shona", 
+                        "Sotho", "Swati", "Tonga", "Tswana", "Tsonga", "Twi", "Uighur", "Venda", "Volapük",
+                        "Wolof", "Xhosa", "Zhuang"]
+  full_languages_to_remove = ["Achinese", "Acoli", "Adangme", "Adyghe; Adygei", "Afrihilivalue",
+                              "Ainu - Japan", "Akkadian", "Aleut", "Altai - Southern", "Aramaic",
+                              "Aramaic - Samaritan", "Arapaho", "Araucanian", "Arawak", "Assamese", 
+                              "Asturian; Bable", "Awadhi", "Baluchi", "Basa - Cameroon", "Beja", "Bemba - Zambia", 
+                              "Bhojpuri", "Bikol", "Bini", "Blin; Bilin", "Braj", "Buginese", "Buriat", "Caddo", 
+                              "Cebuano", "Chagatai", "Cherokee", "Cheyenne", "Chibcha", "Chinook jargon", "Chipewyan", 
+                              "Choctaw", "Chuukese", "Creek", "Crimean Turkish; Crimean Tatar", "Dakota", "Dargwa", 
+                              "Delaware", "Dinka", "Dogri - generic", "Dogrib", "Duala", 
+                              "Dutch - Middle (ca.1050-1350)", "Dyula", "Efik", "Egyptian - Ancient", "Ekajuk", 
+                              "Elamite", "English - Middle (1100-1500)", "English - Old (ca.450-1100)", "Erzya", 
+                              "Ewondo", "Fang - Equatorial Guinea", "Fanti", "Filipino; Pilipino", "Fon", 
+                              "French - Middle (ca.1400-1600)", "French - Old (842-Ca.1400)", "Friulian", 
+                              "Ga", "Gaelic - Scots", "Gayo", "Gbaya - Central African Republic", "Geez", 
+                              "German - Old High (ca.750-1050)", "German - Middle High (ca.1050-1500)","Gilbertese", 
+                              "Gondi", "Gorontalo", "Gothic", "Grebo", "Greek - Ancient (to 1453)", 
+                              "Greek - Modern (1453-)", "Gwich´in", "Haida", "Haitian; Haitian Creole", "Hawaiian", 
+                              "Hiligaynon", "Hiri Motu", "Hittite", "Hmong", "Hupa", "Iban", "Iloko", "Ingush", 
+                              "Irish - Middle (900-1200)", "Irish - Old (to 900)","Judeo-Arabic", "Judeo-Persian", 
+                              "Kabardian", "Kabyle", "Kachin", "Kalmyk; Oirat", "Kamba - Kenya", "Kara-Kalpak", 
+                              "Karachay-Balkar", "Kashubian", "Kawi", "Khasi", "Khotanese", "Kimbundu", 
+                              "Klingon; tlhIngan-Hol", "Kongo", "Konkani - generic", "Kosraean", "Kpelle", "Kumyk", 
+                              "Kurukh", "Kutenai", "Ladino", "Lahnda", "Lamba", "Latin", "Lezghian", "Lojban", 
+                              "Low German; Low Saxon", "Lozi", "Luba-Lulua", "Luiseno", "Lule Sami", "Lunda", 
+                              "Luo - Kenya and Tanzania", "Lushai", "Madurese", "Magahi", "Maithili", "Makasar", 
+                              "Manchu", "Mandar", "Mandingo", "Manipuri", "Mari - Russia", "Marwari", "Masai", 
+                              "Mende - Sierra Leone", "Micmac", "Minangkabau", "Mirandese", "Mohawk", "Moksha", 
+                              "Mongo", "Mossi", "Multiple globalize_languages", "Neapolitan", 
+                              "Newari - Classical; Old Newari", "Newari", "Nias", "Niuean", "Nogai", "Norse - Old", 
+                              "Northern Sami", "Nyamwezi", "Nyankole", "Nyoro", "Nzima", "Osage", "Pahlavi", "Palauan", 
+                              "Pampanga", "Pangasinan", "Papiamento", "Persian - Old (ca.600-400 B.C.)", "Phoenician", 
+                              "Pohnpeian", "Provençal - Old (to 1500)", "Rapanui Romany", "Rundi", "Sandawe", 
+                              "Sanskrit", "Santali", "Sasak", "Scots", "Selkup", "Serer", "Shan", "Sidamo", "Siksika", 
+                              "Skolt Sami", "Slave - Athapascan", "Sogdian", "Soninke", "Sorbian - Upper", 
+                              "Sorbian - Lower", "Southern Sami", "Sukuma", "Sumerian", "Susu", "Tamashek", 
+                              "Tereno", "Tetum", "Tigre", "Timne", "Tiv", "Tlingit", "Tok Pisin", "Tokelau", 
+                              "Tsimshian", "Tumbuka", "Turkish - Ottoman (1500-1928)", "Tuvinian", "Udmurt", 
+                              "Ugaritic", "Umbundu", "Undetermined", "Vai", "Votic", "Walamo", "Walloon", 
+                              "Waray - Philippines", "Washo", "Yao", "Yapese", "Yoruba", "Zapotec", "Zenaga", "Zuni"]
+
+  all_languages = Globalize::Language.find(:all, :conditions => 'iso_639_2 is not null')
+  english       = all_languages.select {|l| format_language(l) == "English" }
+  removed_languages = all_languages.select {|l| full_languages_to_remove.include?(format_language(l)) }
+  return (english + (all_languages - english - removed_languages).
+          delete_if {|l| languages_to_remove.include?(l.english_name)}.
+          sort{|x, y| x.to_s <=> y.to_s}).
+          map{|l| name=format_language(l); "<option value=\"#{l.iso_639_2}\">#{name}</option>"}.
+          join('')
+end
+
+def gender_options
+  return ['Male', 'Female'].map{|g| "<option value=\"#{g}\">#{g}</option>"}.join('')
+end
+
+# Displays a Globalize::Language in a user friendly format.
+# ====Parameters
+# language:: The Globalize::Language to be formatted.
+def format_language(language)
+  return '' unless language
+  return language.to_s + 
+         (language.english_name_locale ? " - #{language.english_name_locale}" : '') + 
+         (language.english_name_modifier ? " - #{language.english_name_modifier}" : '')
+end
+
+def country_options
+  countries = TZInfo::Country.all
+  countries = countries.sort! {|x, y| x.to_s <=> y.to_s }
+  united_states = countries.select {|c| c.code == 'US'}
+
+  (united_states + (countries - united_states)).
+    map{|c| name=c.to_s; "<option value=\"#{c.code}\">#{name}</option>"}.
+    join('')
+end
+
+def time_zone_options
+    us_tz = {}
+    TZInfo::Timezone.us_zones.each {|tz| us_tz[tz.identifier] = tz.to_s}
+    all_tz = TZInfo::Timezone.all.select {|tz| not us_tz.has_key? tz.identifier }
+
+    standard_us_timezones = ['US - Eastern', 'US - Central', 'US - Mountain', 'US - Pacific']
+    standard_us_timezones.map! { |tz| "<option value=\"#{tz.downcase.gsub(' - ','_')}\">#{tz}</option>" }
+
+    timezone_options = standard_us_timezones.join
+    us_tz.sort.each {|identifier, name| timezone_options << "<option value=\"#{identifier}\">#{name}</option>"}
+    all_tz.sort.each {|tz| timezone_options << "<option value=\"#{tz.identifier}\">#{tz.to_s}</option>"}
+    return timezone_options
+end
+
+begin
+  GENDER_OPTIONS_FOR_SELECT = gender_options 
+  LANGUAGE_OPTIONS_FOR_SELECT = language_options
+  TIME_ZONE_OPTIONS_FOR_SELECT = time_zone_options
+  COUNTRY_OPTIONS_FOR_SELECT = country_options
+rescue
+  STDERR.puts 'Warning: Select Options were not generated.'
+end

Added: incubator/heraldry/idp/pip/trunk/lib/yadis_handler/lib/mongrel_yadis/init.rb
URL: http://svn.apache.org/viewvc/incubator/heraldry/idp/pip/trunk/lib/yadis_handler/lib/mongrel_yadis/init.rb?view=auto&rev=449142
==============================================================================
--- incubator/heraldry/idp/pip/trunk/lib/yadis_handler/lib/mongrel_yadis/init.rb (added)
+++ incubator/heraldry/idp/pip/trunk/lib/yadis_handler/lib/mongrel_yadis/init.rb Fri Sep 22 18:37:26 2006
@@ -0,0 +1,46 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+require 'rubygems'
+require 'gem_plugin'
+require 'mongrel'
+
+class YadisHandler < GemPlugin::Plugin "/commands"
+  include Mongrel::Command::Base
+
+  def configure
+    options []
+  end
+
+  def run
+    require 'yadis_handler'
+
+    server = Mongrel::HttpServer.new('0.0.0.0', 3002)
+    server.register('/yadis', Mongrel::Yadis::YadisHandler.new)
+    puts "Your server is now running at http://0.0.0.0:3002/yadis"
+    if RUBY_PLATFORM !~ /mswin/
+      trap("INT") { 
+        $server.stop 
+      }
+      puts "Use CTRL-C to quit."
+    else
+      puts "Use CTRL-Pause/Break to quit."
+    end
+
+    server.run.join
+  end
+end

Added: incubator/heraldry/idp/pip/trunk/lib/yadis_handler/lib/yadis_handler.rb
URL: http://svn.apache.org/viewvc/incubator/heraldry/idp/pip/trunk/lib/yadis_handler/lib/yadis_handler.rb?view=auto&rev=449142
==============================================================================
--- incubator/heraldry/idp/pip/trunk/lib/yadis_handler/lib/yadis_handler.rb (added)
+++ incubator/heraldry/idp/pip/trunk/lib/yadis_handler/lib/yadis_handler.rb Fri Sep 22 18:37:26 2006
@@ -0,0 +1,147 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+require 'rubygems'
+require 'mongrel'
+
+module Mongrel
+  module Yadis
+    class YadisHandler < Mongrel::HttpHandler
+      @@protocol = APP_CONFIG[:ssl_disabled] ? 'http' : 'https'
+      def initialize(logger=nil)
+        @logger = logger || Logger.new('log/development.log')
+      end
+
+      def split_path_info(path_info)
+        path_info[1..-1].split('/')
+      end
+
+      def yadis_request?(request)
+        (request.params['HTTP_ACCEPT'] && request.params['HTTP_ACCEPT'].include?('application/xrds+xml')) ||
+          (split_path_info(request.params['PATH_INFO'])[1] == 'yadis')
+      end
+
+      def self.yadis_document_for(user, host, uri)
+#        @logger.info "****** yadis_document_for #{host}/#{uri}/#{user} ********"
+        <<-EOL
+<?xml version="1.0" encoding="UTF-8"?>
+<xrds:XRDS
+  xmlns:xrds="xri://$xrds"
+  xmlns:openid="http://openid.net/xmlns/1.0"  
+  xmlns="xri://$xrd*($v*2.0)">
+  <XRD>
+
+    <Service priority="10">
+      <Type>http://openid.net/signon/1.1</Type>
+      <Type>http://openid.net/sreg/1.0</Type>
+      <URI>#{@@protocol}://#{host}/server</URI>
+    </Service>
+
+    <Service priority="20">
+      <Type>http://openid.net/signon/1.0</Type>
+      <Type>http://openid.net/sreg/1.0</Type>
+      <URI>#{@@protocol}://#{host}/server</URI>
+    </Service>
+
+  </XRD>
+</xrds:XRDS>
+EOL
+      end
+
+      def identity_document_for(user, host, uri)
+        @logger.info "****** identity_document_for #{host}/#{uri}/#{user} ********"
+        <<-EOL
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+  <head>
+    <link rel="openid.server" href="#{@@protocol}://#{host}/server" />
+    <meta http-equiv="X-XRDS-Location" content="http://#{host}/#{uri}/#{user}/yadis" />
+    <meta http-equiv="X-YADIS-Location" content="http://#{host}/#{uri}/#{user}/yadis" />
+    <title>Identity Endpoint For #{user}</title>
+  </head>
+  <body>
+    <p>This is an identity endpoint for #{user}</p>
+  </body>
+</html>
+EOL
+      end
+      
+      def host_with_port(request)
+        if forwarded = request.params["HTTP_X_FORWARDED_HOST"]
+          forwarded.split(/,\s?/).last
+        elsif http_host = request.params['HTTP_HOST']
+          http_host
+        elsif server_name = request.params['SERVER_NAME']
+          server_name
+        else
+          "#{request.params['SERVER_ADDR']}:#{request.params['SERVER_PORT']}"
+        end
+      end
+
+      def host(request)
+        hwp = host_with_port(request)
+        if hwp =~ /:\d+$/
+          $`
+        else
+          hwp
+        end
+      end
+      
+      def port(request)
+        if host_with_port(request) =~ /:(\d+)$/
+          return $1
+        end
+        return nil
+      end
+
+      def process(request, response)
+        @logger.info "****** NEW HIT ********"
+        @logger.info request.inspect
+        user, extra = split_path_info(request.params['PATH_INFO'])
+        host = AppConfig.host(host(request)) + (port(request) ? ':' + port(request) : '')
+        uri = request.params['SCRIPT_NAME'][1..-1]
+
+        if yadis_request?(request)
+          response.start(200) do |head, out|
+            head['Content-Type'] = 'application/xrds+xml'
+            head['X-XRDS-Location'] = "#{@@protocol}://#{host}/#{uri}/#{user}/yadis"
+            head['X-YADIS-Location'] = "#{@@protocol}://#{host}/#{uri}/#{user}/yadis"
+            out << YadisHandler.yadis_document_for(user, host, uri)
+          end
+        elsif extra.nil?
+          response.start(200) do |head, out|
+            head['Content-Type'] = 'text/html; charset=UTF-8'
+	          head['X-XRDS-Location'] = "#{@@protocol}://#{host}/#{uri}/#{user}/yadis"
+            head['X-YADIS-Location'] = "#{@@protocol}://#{host}/#{uri}/#{user}/yadis"
+	          out << identity_document_for(user, host, uri)
+          end
+        end
+        @logger.info response.inspect
+      end
+    end
+  end
+end
+
+if __FILE__ == $0
+  server = Mongrel::HttpServer.new('0.0.0.0', 3002)
+  server.register('/yadis', Mongrel::Yadis::YadisHandler.new)
+  puts 'Your server is now running at http://0.0.0.0:3002/yadis'
+  puts 'Use CTRL-C to quit'
+  server.run.join
+end

Added: incubator/heraldry/idp/pip/trunk/lib/yadis_handler/test/tc_yadis_handler.rb
URL: http://svn.apache.org/viewvc/incubator/heraldry/idp/pip/trunk/lib/yadis_handler/test/tc_yadis_handler.rb?view=auto&rev=449142
==============================================================================
--- incubator/heraldry/idp/pip/trunk/lib/yadis_handler/test/tc_yadis_handler.rb (added)
+++ incubator/heraldry/idp/pip/trunk/lib/yadis_handler/test/tc_yadis_handler.rb Fri Sep 22 18:37:26 2006
@@ -0,0 +1,94 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+$: << '..'
+APP_CONFIG = {:app_host => 'test.host'} unless defined? APP_CONFIG
+
+unless defined? AppConfig
+  class AppConfig
+    def host
+      APP_CONFIG[:app_host]
+    end
+  end
+end
+
+require 'test/tc_yadis_handler_util'
+require 'yadis_handler'
+require 'rexml/document'
+
+
+class TestYadisHandler < HandlerTestCase
+  @@mongrel_yadis_test_dir = 'test'
+
+  
+  def self.mongrel_yadis_test_dir=( mytd )
+    @@mongrel_yadis_test_dir = mytd
+  end
+
+  def new_handler; Mongrel::Yadis::YadisHandler.new(BlackHole.new); end
+
+  def test_simple_get
+    sl = 'test.host:5000'
+    uri = 'identity/admin'
+    
+    do_request
+
+    assert_match %r[<head>.*<link rel="openid.server" href="http://#{sl}/server" />.*</head>]m, @response.body.string
+    assert_match %r[<head>.*<meta http-equiv="X-XRDS-Location" content="http://#{sl}/#{uri}/yadis" />.*</head>]m, @response.body.string
+    assert_match %r[<head>.*<meta http-equiv="X-YADIS-Location" content="http://#{sl}/#{uri}/yadis" />.*</head>]m, @response.body.string
+  end
+
+  def test_yadis_get_document
+    do_request({'HTTP_ACCEPT' => 'application/xrds+xml'})
+    assert_yadis_document
+  end
+
+  def test_yadis_get_document_by_path
+    do_request('PATH_INFO' =>  '/admin/yadis')
+    assert_yadis_document
+  end
+
+  def test_yadis_do_not_eat_extra
+    do_request('PATH_INFO' => '/admin/bob')
+    assert_equal '', @response.body.string
+  end
+
+  def assert_yadis_document
+    assert_match %r[Content-Type: application/xrds\+xml], @response.header.out.string
+    xml_body = @response.body.string
+    
+    assert_match %r[<Type>http://openid.net/signon/1.0</Type>], xml_body
+    assert_match %r[<URI>http://test.host:5000/server</URI>], xml_body
+    assert_match %r[<Type>http://openid.net/signon/1.1</Type>], xml_body
+    
+    File.open('temp.xml', 'w') { |f| f << xml_body }
+    xmllint_result = `xmllint --schema #{ @@mongrel_yadis_test_dir }/xrds_schema.xml temp.xml 2>&1`
+    assert_match /temp.xml validates/, xmllint_result
+
+    xml = REXML::Document.new(xml_body)
+    xrd = xml.root.elements[1]
+    xrd.add_attributes('xmlns' => 'xri://$xrd*($v*2.0)', 
+                       'xmlns:openid' => 'http://openid.net/xmlns/1.0')
+    File.open('temp.xml', 'w') { |f| f << xrd.to_s }
+    xmllint_result = `xmllint --schema #{ @@mongrel_yadis_test_dir }/xrd_schema.xml temp.xml 2>&1`
+    assert_match /temp.xml validates/, xmllint_result
+  end
+
+  def do_request(args={})
+    super({'PATH_INFO' => '/admin', 'SCRIPT_NAME' => '/identity'}.merge(args))
+  end
+end

Added: incubator/heraldry/idp/pip/trunk/lib/yadis_handler/test/tc_yadis_handler_util.rb
URL: http://svn.apache.org/viewvc/incubator/heraldry/idp/pip/trunk/lib/yadis_handler/test/tc_yadis_handler_util.rb?view=auto&rev=449142
==============================================================================
--- incubator/heraldry/idp/pip/trunk/lib/yadis_handler/test/tc_yadis_handler_util.rb (added)
+++ incubator/heraldry/idp/pip/trunk/lib/yadis_handler/test/tc_yadis_handler_util.rb Fri Sep 22 18:37:26 2006
@@ -0,0 +1,36 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+$:<<"lib"<<".."
+require 'test/unit'
+
+class BlackHole; def method_missing(meth, *args); end; end
+
+class HandlerTestCase < Test::Unit::TestCase
+  def setup
+    @response = Mongrel::HttpResponse.new(StringIO.new)
+    @handler = new_handler
+  end
+
+  def do_request(args={}, body='')
+    request = Mongrel::HttpRequest.new({'HTTP_HOST' => 'test.host:5000'}.merge(args), body, StringIO.new)
+    @handler.process(request, @response) 
+  end
+
+  def new_handler; end
+  def default_test; end
+end

Added: incubator/heraldry/idp/pip/trunk/lib/yadis_handler/test/xrd_schema.xml
URL: http://svn.apache.org/viewvc/incubator/heraldry/idp/pip/trunk/lib/yadis_handler/test/xrd_schema.xml?view=auto&rev=449142
==============================================================================
--- incubator/heraldry/idp/pip/trunk/lib/yadis_handler/test/xrd_schema.xml (added)
+++ incubator/heraldry/idp/pip/trunk/lib/yadis_handler/test/xrd_schema.xml Fri Sep 22 18:37:26 2006
@@ -0,0 +1,161 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema targetNamespace="xri://$xrd*($v*2.0)"
+	   elementFormDefault="qualified"
+	   xmlns:xs="http://www.w3.org/2001/XMLSchema"
+	   xmlns:ds="http://www.w3.org/2000/09/xmldsig#"
+	   xmlns:xrd="xri://$xrd*($v*2.0)">
+  <!-- Utility patterns -->
+  <xs:attributeGroup name="otherattribute">
+    <xs:anyAttribute namespace="##other" processContents="lax"/>
+  </xs:attributeGroup>
+  <xs:group name="otherelement">
+    <xs:choice>
+      <xs:any namespace="##other" processContents="lax"/>
+      <xs:any namespace="##local" processContents="lax"/>
+    </xs:choice>
+  </xs:group>
+  <xs:attributeGroup name="priorityAttrGrp">
+    <xs:attribute name="priority" type="xs:nonNegativeInteger" use="optional"/>
+  </xs:attributeGroup>
+  <xs:attributeGroup name="selectionAttrGrp">
+    <xs:attribute name="match" use="optional" default="default">
+      <xs:simpleType>
+	<xs:restriction base="xs:string">
+	  <xs:enumeration value="default"/>
+	  <xs:enumeration value="content"/>
+	  <xs:enumeration value="any"/>
+	  <xs:enumeration value="non-null"/>
+	  <xs:enumeration value="null"/>
+	  <xs:enumeration value="none"/>
+	</xs:restriction>
+      </xs:simpleType>
+    </xs:attribute>
+    <xs:attribute name="select" type="xs:boolean" use="optional" default="false"/>
+  </xs:attributeGroup>
+  <xs:complexType name="URIPattern">
+    <xs:simpleContent>
+      <xs:extension base="xs:anyURI">
+	<xs:attributeGroup ref="xrd:otherattribute"/>
+      </xs:extension>
+    </xs:simpleContent>
+  </xs:complexType>
+  <xs:complexType name="URIPriorityPattern">
+    <xs:simpleContent>
+      <xs:extension base="xrd:URIPattern">
+	<xs:attributeGroup ref="xrd:priorityAttrGrp"/>
+      </xs:extension>
+    </xs:simpleContent>
+  </xs:complexType>
+  <xs:complexType name="StringPattern">
+    <xs:simpleContent>
+      <xs:extension base="xs:string">
+	<xs:attributeGroup ref="xrd:otherattribute"/>
+      </xs:extension>
+    </xs:simpleContent>
+  </xs:complexType>
+  <xs:complexType name="StringSelectionPattern">
+    <xs:simpleContent>
+      <xs:extension base="xrd:StringPattern">
+	<xs:attributeGroup ref="xrd:selectionAttrGrp"/>
+      </xs:extension>
+    </xs:simpleContent>
+  </xs:complexType>
+  <!-- Patterns for elements -->
+  <xs:element name="XRD">
+    <xs:complexType>
+      <xs:sequence>
+	<xs:element ref="xrd:Query" minOccurs="0"/>
+	<xs:element ref="xrd:Status" minOccurs="0"/>
+	<xs:element ref="xrd:Expires" minOccurs="0"/>
+	<xs:element ref="xrd:ProviderID" minOccurs="0"/>
+	<xs:element ref="xrd:LocalID" minOccurs="0" maxOccurs="unbounded"/>
+	<xs:element ref="xrd:CanonicalID" minOccurs="0" maxOccurs="unbounded"/>
+	<xs:element ref="xrd:Ref" minOccurs="0" maxOccurs="unbounded"/>
+	<xs:element ref="xrd:Service" minOccurs="0" maxOccurs="unbounded"/>
+	<xs:group ref="xrd:otherelement" minOccurs="0" maxOccurs="unbounded"/>
+      </xs:sequence>
+      <xs:attribute name="id" type="xs:ID"/>
+      <xs:attribute name="idref" type="xs:IDREF" use="optional"/>
+      <xs:attribute name="version" type="xs:string" use="optional" fixed="2.0"/>
+      <xs:attributeGroup ref="xrd:otherattribute"/>
+    </xs:complexType>
+  </xs:element>
+  <xs:element name="Query" type="xrd:StringPattern"/>
+  <xs:element name="Status">
+    <xs:complexType>
+      <xs:simpleContent>
+	<xs:extension base="xrd:StringPattern">
+	  <xs:attribute name="code" type="xs:int" use="required"/>
+	  <xs:attributeGroup ref="xrd:otherattribute"/>
+	</xs:extension>
+      </xs:simpleContent>
+    </xs:complexType>
+  </xs:element>
+  <xs:element name="Expires">
+    <xs:complexType>
+      <xs:simpleContent>
+	<xs:extension base="xs:dateTime">
+	  <xs:attributeGroup ref="xrd:otherattribute"/>
+	</xs:extension>
+      </xs:simpleContent>
+    </xs:complexType>
+  </xs:element>
+  <xs:element name="ProviderID" type="xrd:URIPattern"/>
+  <xs:element name="LocalID">
+    <xs:complexType>
+      <xs:simpleContent>
+	<xs:extension base="xrd:StringPattern">
+	  <xs:attributeGroup ref="xrd:priorityAttrGrp"/>
+	</xs:extension>
+      </xs:simpleContent>
+    </xs:complexType>
+  </xs:element>
+  <xs:element name="CanonicalID" type="xrd:URIPriorityPattern"/>
+  <xs:element name="Ref" type="xrd:URIPriorityPattern"/>
+  <xs:element name="Service">
+    <xs:complexType>
+      <xs:sequence>
+	<xs:element ref="xrd:ProviderID" minOccurs="0"/>
+	<xs:element ref="xrd:Type" minOccurs="0" maxOccurs="unbounded"/>
+	<xs:element ref="xrd:Path" minOccurs="0" maxOccurs="unbounded"/>
+	<xs:element ref="xrd:MediaType" minOccurs="0" maxOccurs="unbounded"/>
+	<xs:element ref="xrd:URI" minOccurs="0" maxOccurs="unbounded"/>
+	<xs:group ref="xrd:otherelement" minOccurs="0" maxOccurs="unbounded"/>
+      </xs:sequence>
+      <xs:attributeGroup ref="xrd:priorityAttrGrp"/>
+      <xs:attributeGroup ref="xrd:otherattribute"/>
+    </xs:complexType>
+  </xs:element>
+  <xs:element name="Type">
+    <xs:complexType>
+      <xs:simpleContent>
+	<xs:extension base="xrd:URIPattern">
+	  <xs:attributeGroup ref="xrd:selectionAttrGrp"/>
+	</xs:extension>
+      </xs:simpleContent>
+    </xs:complexType>
+  </xs:element>
+  <xs:element name="MediaType" type="xrd:StringSelectionPattern"/>
+  <xs:element name="Path" type="xrd:StringSelectionPattern"/>
+  <xs:element name="URI">
+    <xs:complexType>
+      <xs:simpleContent>
+	<xs:extension base="xrd:URIPattern">
+	  <xs:attributeGroup ref="xrd:priorityAttrGrp"/>
+	  <xs:attribute name="append">
+	    <xs:simpleType>
+	      <xs:restriction base="xs:string">
+		<xs:enumeration value="none"/>
+		<xs:enumeration value="local"/>
+		<xs:enumeration value="authority"/>
+		<xs:enumeration value="path"/>
+		<xs:enumeration value="query"/>
+		<xs:enumeration value="qxri"/>
+	      </xs:restriction>
+	    </xs:simpleType>
+	  </xs:attribute>
+	</xs:extension>
+      </xs:simpleContent>
+    </xs:complexType>
+  </xs:element>
+</xs:schema>

Added: incubator/heraldry/idp/pip/trunk/lib/yadis_handler/test/xrds_schema.xml
URL: http://svn.apache.org/viewvc/incubator/heraldry/idp/pip/trunk/lib/yadis_handler/test/xrds_schema.xml?view=auto&rev=449142
==============================================================================
--- incubator/heraldry/idp/pip/trunk/lib/yadis_handler/test/xrds_schema.xml (added)
+++ incubator/heraldry/idp/pip/trunk/lib/yadis_handler/test/xrds_schema.xml Fri Sep 22 18:37:26 2006
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema targetNamespace="xri://$xrds" elementFormDefault="qualified"
+	   xmlns:xs="http://www.w3.org/2001/XMLSchema"
+	   xmlns:xrds="xri://$xrds">
+  <!-- Utility patterns -->
+  <xs:attributeGroup name="otherattribute">
+    <xs:anyAttribute namespace="##other" processContents="lax"/>
+  </xs:attributeGroup>
+  <xs:group name="otherelement">
+    <xs:choice>
+      <xs:any namespace="##other" processContents="lax"/>
+      <xs:any namespace="##local" processContents="lax"/>
+    </xs:choice>
+  </xs:group>
+  <!-- Patterns for elements -->
+  <xs:element name="XRDS">
+    <xs:complexType>
+      <xs:sequence>
+	<xs:group ref="xrds:otherelement" minOccurs="0" maxOccurs="unbounded"/>
+      </xs:sequence>
+      <xs:attributeGroup ref="xrds:otherattribute"/>
+    </xs:complexType>
+  </xs:element>
+</xs:schema>

Propchange: incubator/heraldry/idp/pip/trunk/log/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Fri Sep 22 18:37:26 2006
@@ -0,0 +1,2 @@
+*.log
+mongrel_debug

Propchange: incubator/heraldry/idp/pip/trunk/public/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Fri Sep 22 18:37:26 2006
@@ -0,0 +1 @@
+engine_files

Added: incubator/heraldry/idp/pip/trunk/public/404.html
URL: http://svn.apache.org/viewvc/incubator/heraldry/idp/pip/trunk/public/404.html?view=auto&rev=449142
==============================================================================
--- incubator/heraldry/idp/pip/trunk/public/404.html (added)
+++ incubator/heraldry/idp/pip/trunk/public/404.html Fri Sep 22 18:37:26 2006
@@ -0,0 +1,33 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
+  <head>
+    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
+    <title>Identity Provider</title>
+    <script src="/javascripts/prototype.js" type="text/javascript"></script>
+    <script src="/javascripts/effects.js" type="text/javascript"></script>
+    <script src="/javascripts/dragdrop.js" type="text/javascript"></script>
+    <script src="/javascripts/controls.js" type="text/javascript"></script>
+    <script src="/javascripts/help_popup.js" type="text/javascript"></script>
+    <script src="/javascripts/debug.js" type="text/javascript"></script>
+    <script src="/javascripts/application.js" type="text/javascript"></script>
+    
+    <link href="/stylesheets/application.css" media="screen" rel="Stylesheet" type="text/css" />
+
+  </head>
+  <body>
+    <div id="tophdr"></div>
+    <div id="left">
+      <div id="hdr">
+        <div id="header-loginlock">&nbsp;</div>
+        <div id="header-logo"><a href="/"><img alt="Personal Identity Provider" height="93" src="/images/pip_logo_beta.gif" width="201" /></a></div>
+        <div id="header-company">
+          <a href="http://www.yourcompany.com" target="_blank"><img alt="OPEN_SOURCE: Your company" height="38" src="/images/company_logo.gif?1154067499" width="88" /></a>
+        </div>    
+
+      <div id="main" style="min-height:250px;">
+        <h1>File not found</h1>
+        <p>Sorry, the page you requested does not exist.</p>
+      </div>
+    </div>    
+  </body>
+</html>
\ No newline at end of file



Mime
View raw message