source: TI12-security/trunk/documentation/epydoc/ndg.security.server.AttAuthority.AAUserRoles-class.html @ 4245

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/TI12-security/trunk/documentation/epydoc/ndg.security.server.AttAuthority.AAUserRoles-class.html@4245
Revision 4245, 11.9 KB checked in by pjkersha, 11 years ago (diff)

Working unit tests for WSGI based Attribute Authority.

  • Altered so that all Attribute Config is picked up from the Paste ini file. Separate cfg or xml based config file is still supported.

TODO:

  • Simplify unit test config for client.
Line 
1<?xml version="1.0" encoding="ascii"?>
2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
3          "DTD/xhtml1-transitional.dtd">
4<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5<head>
6  <title>ndg.security.server.AttAuthority.AAUserRoles</title>
7  <link rel="stylesheet" href="epydoc.css" type="text/css" />
8  <script type="text/javascript" src="epydoc.js"></script>
9</head>
10
11<body bgcolor="white" text="black" link="blue" vlink="#204080"
12      alink="#204080">
13<!-- ==================== NAVIGATION BAR ==================== -->
14<table class="navbar" border="0" width="100%" cellpadding="0"
15       bgcolor="#a0c0ff" cellspacing="0">
16  <tr valign="middle">
17  <!-- Home link -->
18      <th>&nbsp;&nbsp;&nbsp;<a
19        href="ndg-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
20
21  <!-- Tree link -->
22      <th>&nbsp;&nbsp;&nbsp;<a
23        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
24
25  <!-- Index link -->
26      <th>&nbsp;&nbsp;&nbsp;<a
27        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
28
29  <!-- Help link -->
30      <th>&nbsp;&nbsp;&nbsp;<a
31        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
32
33  <!-- Project homepage -->
34      <th class="navbar" align="right" width="100%">
35        <table border="0" cellpadding="0" cellspacing="0">
36          <tr><th class="navbar" align="center"
37            >NDG Security</th>
38          </tr></table></th>
39  </tr>
40</table>
41<table width="100%" cellpadding="0" cellspacing="0">
42  <tr valign="top">
43    <td width="100%">
44      <span class="breadcrumbs">
45        <a href="ndg-module.html">Package&nbsp;ndg</a> ::
46        <a href="ndg.security-module.html">Package&nbsp;security</a> ::
47        <a href="ndg.security.server-module.html">Package&nbsp;server</a> ::
48        <a href="ndg.security.server.AttAuthority-module.html">Package&nbsp;AttAuthority</a> ::
49        Class&nbsp;AAUserRoles
50      </span>
51    </td>
52    <td>
53      <table cellpadding="0" cellspacing="0">
54        <!-- hide/show private -->
55        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
56    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
57      </table>
58    </td>
59  </tr>
60</table>
61<!-- ==================== CLASS DESCRIPTION ==================== -->
62<h1 class="epydoc">Class AAUserRoles</h1><p class="nomargin-top"><span class="codelink"><a href="ndg.security.server.AttAuthority-pysrc.html#AAUserRoles">source&nbsp;code</a></span></p>
63<p>An abstract base class to define the user roles interface to an
64  Attribute Authority.</p>
65  <p>Each NDG data centre should implement a derived class which implements
66  the way user roles are provided to its representative Attribute
67  Authority.</p>
68  <p>Roles are expected to indexed by user Distinguished Name (DN).  They
69  could be stored in a database or file.</p>
70
71<!-- ==================== INSTANCE METHODS ==================== -->
72<a name="section-InstanceMethods"></a>
73<table class="summary" border="1" cellpadding="3"
74       cellspacing="0" width="100%" bgcolor="white">
75<tr bgcolor="#70b0f0" class="table-header">
76  <td colspan="2" class="table-header">
77    <table border="0" cellpadding="0" cellspacing="0" width="100%">
78      <tr valign="top">
79        <td align="left"><span class="table-header">Instance Methods</span></td>
80        <td align="right" valign="top"
81         ><span class="options">[<a href="#section-InstanceMethods"
82         class="privatelink" onclick="toggle_private();"
83         >hide private</a>]</span></td>
84      </tr>
85    </table>
86  </td>
87</tr>
88<tr>
89    <td width="15%" align="right" valign="top" class="summary">
90      <span class="summary-type">&nbsp;</span>
91    </td><td class="summary">
92      <table width="100%" cellpadding="0" cellspacing="0" border="0">
93        <tr>
94          <td><span class="summary-sig"><a href="ndg.security.server.AttAuthority.AAUserRoles-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
95        <span class="summary-sig-arg">dbURI</span>=<span class="summary-sig-default">None</span>,
96        <span class="summary-sig-arg">filePath</span>=<span class="summary-sig-default">None</span>)</span><br />
97      User Roles base class - derive from this class to define roles
98      interface to Attribute Authority</td>
99          <td align="right" valign="top">
100            <span class="codelink"><a href="ndg.security.server.AttAuthority-pysrc.html#AAUserRoles.__init__">source&nbsp;code</a></span>
101           
102          </td>
103        </tr>
104      </table>
105     
106    </td>
107  </tr>
108<tr>
109    <td width="15%" align="right" valign="top" class="summary">
110      <span class="summary-type">bool</span>
111    </td><td class="summary">
112      <table width="100%" cellpadding="0" cellspacing="0" border="0">
113        <tr>
114          <td><span class="summary-sig"><a href="ndg.security.server.AttAuthority.AAUserRoles-class.html#userIsRegistered" class="summary-sig-name">userIsRegistered</a>(<span class="summary-sig-arg">self</span>,
115        <span class="summary-sig-arg">userId</span>)</span><br />
116      Virtual method - Derived method should return True if user is known
117      otherwise False</td>
118          <td align="right" valign="top">
119            <span class="codelink"><a href="ndg.security.server.AttAuthority-pysrc.html#AAUserRoles.userIsRegistered">source&nbsp;code</a></span>
120           
121          </td>
122        </tr>
123      </table>
124     
125    </td>
126  </tr>
127<tr>
128    <td width="15%" align="right" valign="top" class="summary">
129      <span class="summary-type">list</span>
130    </td><td class="summary">
131      <table width="100%" cellpadding="0" cellspacing="0" border="0">
132        <tr>
133          <td><span class="summary-sig"><a href="ndg.security.server.AttAuthority.AAUserRoles-class.html#getRoles" class="summary-sig-name">getRoles</a>(<span class="summary-sig-arg">self</span>,
134        <span class="summary-sig-arg">userId</span>)</span><br />
135      Virtual method - Derived method should return the roles for the given
136      user's Id or else raise an exception</td>
137          <td align="right" valign="top">
138            <span class="codelink"><a href="ndg.security.server.AttAuthority-pysrc.html#AAUserRoles.getRoles">source&nbsp;code</a></span>
139           
140          </td>
141        </tr>
142      </table>
143     
144    </td>
145  </tr>
146</table>
147<!-- ==================== METHOD DETAILS ==================== -->
148<a name="section-MethodDetails"></a>
149<table class="details" border="1" cellpadding="3"
150       cellspacing="0" width="100%" bgcolor="white">
151<tr bgcolor="#70b0f0" class="table-header">
152  <td colspan="2" class="table-header">
153    <table border="0" cellpadding="0" cellspacing="0" width="100%">
154      <tr valign="top">
155        <td align="left"><span class="table-header">Method Details</span></td>
156        <td align="right" valign="top"
157         ><span class="options">[<a href="#section-MethodDetails"
158         class="privatelink" onclick="toggle_private();"
159         >hide private</a>]</span></td>
160      </tr>
161    </table>
162  </td>
163</tr>
164</table>
165<a name="__init__"></a>
166<div>
167<table class="details" border="1" cellpadding="3"
168       cellspacing="0" width="100%" bgcolor="white">
169<tr><td>
170  <table width="100%" cellpadding="0" cellspacing="0" border="0">
171  <tr valign="top"><td>
172  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
173        <span class="sig-arg">dbURI</span>=<span class="sig-default">None</span>,
174        <span class="sig-arg">filePath</span>=<span class="sig-default">None</span>)</span>
175    <br /><em class="fname">(Constructor)</em>
176  </h3>
177  </td><td align="right" valign="top"
178    ><span class="codelink"><a href="ndg.security.server.AttAuthority-pysrc.html#AAUserRoles.__init__">source&nbsp;code</a></span>&nbsp;
179    </td>
180  </tr></table>
181 
182  <p>User Roles base class - derive from this class to define roles
183  interface to Attribute Authority</p>
184  <dl class="fields">
185    <dt>Parameters:</dt>
186    <dd><ul class="nomargin-top">
187        <li><strong class="pname"><code>dbURI</code></strong> (string) - database connection URI</li>
188        <li><strong class="pname"><code>filePath</code></strong> (string) - file path for properties file containing settings</li>
189    </ul></dd>
190  </dl>
191</td></tr></table>
192</div>
193<a name="userIsRegistered"></a>
194<div>
195<table class="details" border="1" cellpadding="3"
196       cellspacing="0" width="100%" bgcolor="white">
197<tr><td>
198  <table width="100%" cellpadding="0" cellspacing="0" border="0">
199  <tr valign="top"><td>
200  <h3 class="epydoc"><span class="sig"><span class="sig-name">userIsRegistered</span>(<span class="sig-arg">self</span>,
201        <span class="sig-arg">userId</span>)</span>
202  </h3>
203  </td><td align="right" valign="top"
204    ><span class="codelink"><a href="ndg.security.server.AttAuthority-pysrc.html#AAUserRoles.userIsRegistered">source&nbsp;code</a></span>&nbsp;
205    </td>
206  </tr></table>
207 
208  <p>Virtual method - Derived method should return True if user is known
209  otherwise False</p>
210  <p>Nb. this method is not used by AttAuthority class and so does NOT need
211  to be implemented in a derived class.</p>
212  <dl class="fields">
213    <dt>Parameters:</dt>
214    <dd><ul class="nomargin-top">
215        <li><strong class="pname"><code>userId</code></strong> (string) - user Distinguished Name to look up.</li>
216    </ul></dd>
217    <dt>Returns: bool</dt>
218        <dd>True if user is registered, False otherwise</dd>
219  </dl>
220</td></tr></table>
221</div>
222<a name="getRoles"></a>
223<div>
224<table class="details" border="1" cellpadding="3"
225       cellspacing="0" width="100%" bgcolor="white">
226<tr><td>
227  <table width="100%" cellpadding="0" cellspacing="0" border="0">
228  <tr valign="top"><td>
229  <h3 class="epydoc"><span class="sig"><span class="sig-name">getRoles</span>(<span class="sig-arg">self</span>,
230        <span class="sig-arg">userId</span>)</span>
231  </h3>
232  </td><td align="right" valign="top"
233    ><span class="codelink"><a href="ndg.security.server.AttAuthority-pysrc.html#AAUserRoles.getRoles">source&nbsp;code</a></span>&nbsp;
234    </td>
235  </tr></table>
236 
237  <p>Virtual method - Derived method should return the roles for the given
238  user's Id or else raise an exception</p>
239  <dl class="fields">
240    <dt>Parameters:</dt>
241    <dd><ul class="nomargin-top">
242        <li><strong class="pname"><code>userId</code></strong> (string) - user identity e.g. user Distinguished Name</li>
243    </ul></dd>
244    <dt>Returns: list</dt>
245        <dd>list of roles for the given user ID</dd>
246  </dl>
247</td></tr></table>
248</div>
249<br />
250<!-- ==================== NAVIGATION BAR ==================== -->
251<table class="navbar" border="0" width="100%" cellpadding="0"
252       bgcolor="#a0c0ff" cellspacing="0">
253  <tr valign="middle">
254  <!-- Home link -->
255      <th>&nbsp;&nbsp;&nbsp;<a
256        href="ndg-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
257
258  <!-- Tree link -->
259      <th>&nbsp;&nbsp;&nbsp;<a
260        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
261
262  <!-- Index link -->
263      <th>&nbsp;&nbsp;&nbsp;<a
264        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
265
266  <!-- Help link -->
267      <th>&nbsp;&nbsp;&nbsp;<a
268        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
269
270  <!-- Project homepage -->
271      <th class="navbar" align="right" width="100%">
272        <table border="0" cellpadding="0" cellspacing="0">
273          <tr><th class="navbar" align="center"
274            >NDG Security</th>
275          </tr></table></th>
276  </tr>
277</table>
278<table border="0" cellpadding="0" cellspacing="0" width="100%%">
279  <tr>
280    <td align="left" class="footer">
281    <a href="epydoc-log.html">Generated by Epydoc
282    3.0.1 on Thu Sep  4 09:37:49 2008</a>
283    </td>
284    <td align="right" class="footer">
285      <a target="mainFrame" href="http://epydoc.sourceforge.net"
286        >http://epydoc.sourceforge.net</a>
287    </td>
288  </tr>
289</table>
290
291<script type="text/javascript">
292  <!--
293  // Private objects are initially displayed (because if
294  // javascript is turned off then we want them to be
295  // visible); but by default, we want to hide them.  So hide
296  // them unless we have a cookie that says to show them.
297  checkCookie();
298  // -->
299</script>
300</body>
301</html>
Note: See TracBrowser for help on using the repository browser.