source: TI12-security/trunk/python/ndg.security.server/ndg/security/server/sso/sso/templates/ndg/security/ndgPage.kid @ 3918

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/TI12-security/trunk/python/ndg.security.server/ndg/security/server/sso/sso/templates/ndg/security/ndgPage.kid@3918
Revision 3918, 4.2 KB checked in by pjkersha, 12 years ago (diff)

Initial Integration of Single Sign On Service with OpenID and Pylons AuthKit?:

  • WAYF now contains an OpenID textbox for sign in
  • No role integration carried out yet - OpenID has no better privileges than an anonymous user(!)
  • Integrated into Authkit - requires lots of config settings in pylons ini file
  • HTTP 401 error get redirected automatically to WAYF
  • Need to create an AuthKit? egg from SVN 151 checkout - will put on NDG dist
Line 
1<!-- This is a bunch of named templates for use in pages -->
2<html xmlns="http://www.w3.org/1999/xhtml" xmlns:py="http://purl.org/kid/ns#">
3   
4    <!-- HTML Header and Document header follow -->
5   
6    <head py:def="pagehead()" py:strip="True">
7        <title py:content="c.title">title</title>
8        <!--! The following includes the javascript, note that the XML
9        function is needed to avoid escaping the < character -->
10        ${XML(h.javascript_include_tag(builtins=True))}
11        <script type="text/javascript" src="$g.ndg.security.server.sso.cfg.server/js/toggleDiv.js"/>
12
13        <link media="all, screen" href="$g.ndg.security.server.sso.cfg.server/layout/ndg2.css" type="text/css" rel="stylesheet"/>
14        <link rel="icon" type="image/ico" href="$g.ndg.security.server.sso.cfg.server/layout/favicon.jpg" />
15
16    </head>
17
18    <div py:def="header()">
19        <div id="header"/>
20        <div id="logo"><img src="$g.ndg.security.server.sso.cfg.LeftLogo" alt="$g.ndg.security.server.sso.cfg.LeftAlt" /></div>
21    </div>
22   
23    <div py:def="PageTabs(tabv)" id="PageTabs">
24        <div id="PageTabRow">
25            <ul>
26                <span py:for="tab in c.pageTabs">
27                    <?python
28                    linkto=True
29                    if tab[0] == tabv:
30                        status='current'
31                        linkto=False
32                    else: status='hidden'
33                    ?>
34                    <li class="$status"><span class="pagetab">
35                        ${XML(h.link_to_if(linkto,tab[0],tab[1]))}
36                    </span></li>
37                 </span>
38            </ul>
39        </div>
40        <div class="line"/>
41        <div class="clear"/>
42    </div>
43    <py if="c.UpdatePageTabs" py:replace="PageTabs(c.current)"/>
44
45    <!-- Page Footer follows -->
46    <div py:def="footer(showLoginStatus=False)" id="Footer">
47        <center><table><tbody>
48            <tr>
49                <td align="left" width="60%">
50                    <table><tbody>
51                    <tr><td><span py:replace="linkimage(g.ndg.security.server.sso.cfg.ndgLink,g.ndg.security.server.sso.cfg.ndgImage,'NDG')"/></td>
52                    <td> This portal is a product of the <a href="http://ndg.nerc.ac.uk"> NERC DataGrid</a>
53                    ${g.ndg.security.server.sso.cfg.disclaimer} </td>
54                    </tr>
55                    </tbody></table>
56                </td>
57                <td width="40%" align="center">
58                </td>
59                <td align="right"><span py:replace="linkimage(g.ndg.security.server.sso.cfg.stfcLink,g.ndg.security.server.sso.cfg.stfcImage,'Hosted by the STFC CEDA')"/></td>
60            </tr>
61        </tbody></table></center>
62    </div>
63   
64    <!-- Utility Functions follow -->
65   
66    <!-- hyperlinked image -->
67    <span py:def="linkimage(linkref,imageref,alttext)">
68        <a href="$linkref"><image src="$imageref" alt="$alttext" title="$alttext"/></a>
69    </span>
70   
71    <!-- Help Icons -->
72    <span py:def="helpIcon(value)">
73        <span>
74            <a href="javascript:;" title="Toggle help" onclick="toggleDiv(1,'$value','shown','hidden','div'); return false;">
75            <img src="$g.ndg.security.server.sso.cfg.helpIcon" alt="Toggle help" class="helpicon"/></a>
76     
77        </span>
78    </span>
79   
80    <!-- Login and out buttons -->   
81    <span py:def="logOut()" class="logOut">
82        <form action="$g.ndg.security.server.sso.cfg.logoutURI">
83            <input type="hidden" name="r" value="${g.ndg.security.common.sso.b64encReturnToURL}"/>
84            <input type="submit" value="Logout"/>
85        </form>
86    </span>
87   
88    <span py:def="logIn()" class="logIn">
89        <?python
90        from base64 import urlsafe_b64encode
91       
92        # Base 64 encode to enable passing around in 'r' argument of query
93        # string for use with login/logout
94        g.ndg.security.common.sso.returnToURL = c.requestURL
95        g.ndg.security.common.sso.b64encReturnToURL = urlsafe_b64encode(c.requestURL)
96        ?>
97        <form action="$g.ndg.security.server.sso.cfg.wayfuri">
98            <input type="hidden" name="r" value="${g.ndg.security.common.sso.b64encReturnToURL}"/>
99            <input type="submit" value="Login"/>
100        </form>
101    </span>
102   
103   
104   
105</html>
Note: See TracBrowser for help on using the repository browser.