Changeset 63

Show
Ignore:
Timestamp:
06/10/07 20:27:03 (2 years ago)
Author:
pdingle
Message:

provisional support for xhtml - hardcoded claims & pw-config.php PW_SELECTOR set to xhtml by default

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/wp-infocard/pw-config.php

    r60 r63  
    77define ('PW_SHOW_BINARY', false); 
    88define ('PW_PLUGINPATH', '/wp-content/plugins/wp-infocard'); 
    9 define ('PW_SELECTORTRIGGER', 'html' ); 
     9define ('PW_SELECTORTRIGGER', 'xhtml' ); 
    1010define ('PW_MANAGEDONLY', false ); 
    1111define ('PW_VERSION', 'b2'); 
  • trunk/wp-infocard/pwlib/login/login.pwlib.php

    r56 r63  
    123123                return; 
    124124        } 
     125 
     126        function printXHTMLSelectorTrigger( $prettyprint=false ) 
     127        { 
     128        $obj = "<ic:informationCard name='xmlToken'"; 
     129        $obj .= "style='behavior:url(#default#informationCard)'"; 
     130        $obj .= 'tokenType="urn:oasis:names:tc:SAML:1.0:assertion">'; 
     131        $obj .= '<ic:add claimType="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress" optional="false" />'; 
     132        $obj .= '<ic:add claimType= "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname" optional="false" />'; 
     133        $obj .= '<ic:add claimType="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname" optional="false" />'; 
     134        $obj .= '</ic:informationCard>'; 
     135 
     136                if ($prettyprint) 
     137                { 
     138                        $linefeed = "<br/>"; 
     139                        $tab = "&nbsp;&nbsp;&nbsp;"; 
     140                        $objectstart = htmlspecialchars($objectstart); 
     141                        $objectend = htmlspecialchars($objectend); 
     142                        $objectclaims = htmlspecialchars($objectclaims); 
     143                } 
     144                else 
     145                { 
     146                        $linefeed = "\n"; 
     147                        $tab = "\t"; 
     148                } 
     149                //$output = $linefeed . $objectstart . $linefeed; 
     150                //$output .= ($objectclaims ? $tab.$objectclaims.$linefeed : ""); 
     151                //$output .= $objectend . $linefeed; 
     152                //$output = $objectstart . $objectclaims . $objectend; 
     153                $output = $objectstart . $objectend; 
     154                if ($prettyprint)  
     155                        return htmlspecialchars($obj); 
     156                else 
     157                        return $obj; 
     158        } // end function printXHTMLSelectorTrigger 
     159 
    125160} // end class pw_login 
    126161 
  • trunk/wp-infocard/wp/login/infocard-login.php

    r56 r63  
    1 <DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
     1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
    22<?php  
    33define( '_VALID_IC', 1 ); 
     
    66include_once( dirname(__FILE__) . '/../../' . PW_PLUGIN . '/clickback.pw.php'); 
    77include_once( dirname(__FILE__) . '/../../' . PW_PLUGIN . '/login/login.pw.php'); 
    8  
    98?> 
    10 <DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
    11 <html xmlns="http://www.w3.org/1999/xhtml"> 
     9<html xmlns="http://www.w3.org/1999/xhtml" 
     10       xmlns:ic="http://schemas.xmlsoap.org/ws/2005/05/identity"> 
    1211<head> 
    1312        <title> 
     
    1716        <link rel="stylesheet" href="<?php pw_utils::printCSSlink(); ?>" type="text/css" /> 
    1817        <script type="text/javascript" src="<?php echo pw_utils::printJqueryLocation(); ?>"></script> 
    19         <script
     18        <script type="text/javascript"
    2019                // basic show and hide 
    2120                $(document).ready(function() { 
     
    6261        </div> 
    6362        <div id="pw_login_intro"> 
    64                 <p>Information Cards are a new way to access your accounts. Designed to relieve password & username fatigue, these digital cards can be created by you yourself, or hosted by an authority. Give them a try!</p> 
     63                <p>Information Cards are a new way to access your accounts. Designed to relieve password &amp; username fatigue, these digital cards can be created by you yourself, or hosted by an authority. Give them a try!</p> 
    6564        </div> 
    6665        <div id="pw_login"> 
     
    7170?> 
    7271                        <button id="pw_login_submit" type="submit"><?php pw_utils::screenPrint('Login or Register Now!'); ?></button> 
    73                         <div id="showrpobject"> 
    74                                 <?php pw_login::printIdentitySelectorTrigger('prettyprint'); ?> 
    75                         </div> 
    7672                </form> 
     73                <div id="showrpobject"> 
     74                        <?php pw_login::printIdentitySelectorTrigger('prettyprint'); ?> 
     75                </div> 
    7776        </div> 
    7877        <div id="debug"> 
     
    9594        </div> 
    9695        <div id="pw_login_footer"> 
    97                 <a id="pw_pamelaproject_logo" href="http://pamelaproject.com" alt="Powered by PamelaWare"><img src='<?php pw_utils::displayPamelaProjectLogo(); ?>' /></a> 
     96                <a id="pw_pamelaproject_logo" href="http://pamelaproject.com"><img src='<?php pw_utils::displayPamelaProjectLogo(); ?>' alt="Powered by PamelaWare" /></a> 
    9897        </div> 
    9998  </div> 
    10099</body> 
     100</html>