~certify-web-dev/twisted/certify-trunk

« back to all changes in this revision

Viewing changes to doc/howto/pb-cred.html

  • Committer: Bazaar Package Importer
  • Author(s): Free Ekanayaka
  • Date: 2010-03-09 13:32:00 UTC
  • mfrom: (2.2.6 sid)
  • Revision ID: james.westby@ubuntu.com-20100309133200-xs2rrzwnn9k86sbx
Tags: 10.0.0-2
* Include changes from 9.0.0-2 which got skipped
* python-twisted depends on version >= 10.0 of other packages

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<?xml version="1.0" encoding="utf-8"?>
2
 
<!DOCTYPE html
3
 
  PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN'
4
 
  'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>
5
 
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
 
1
<?xml version="1.0" encoding="utf-8"?><!DOCTYPE html  PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN'  'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'><html lang="en" xmlns="http://www.w3.org/1999/xhtml">
6
2
  <head>
7
3
<title>Twisted Documentation: Authentication with Perspective Broker</title>
8
4
<link href="stylesheet.css" rel="stylesheet" type="text/css"/>
309
305
<p>This technique also relies upon the fact that the
310
306
<code>pb.Referenceable</code> reference can <em>only</em> come from someone
311
307
who holds a corresponding <code>pb.RemoteReference</code>. The design of the
312
 
serialization mechanism (implemented in <code class="API"><a href="http://twistedmatrix.com/documents/9.0.0/api/twisted.spread.jelly.html" title="twisted.spread.jelly">twisted.spread.jelly</a></code>: pb, jelly, spread.. get it?  Look for
 
308
serialization mechanism (implemented in <code class="API"><a href="http://twistedmatrix.com/documents/10.0.0/api/twisted.spread.jelly.html" title="twisted.spread.jelly">twisted.spread.jelly</a></code>: pb, jelly, spread.. get it?  Look for
313
309
<q>banana</q>, too.  What other networking framework
314
310
can claim API names based on sandwich ingredients?) makes it impossible for
315
311
a client to obtain a reference that they weren't explicitly given.
1233
1229
 
1234
1230
<p>pbAnonServer.py implements a server based on pb6server.py, extending it to
1235
1231
permit anonymous logins in addition to authenticated logins. A
1236
 
<code class="API"><a href="http://twistedmatrix.com/documents/9.0.0/api/twisted.cred.checkers.AllowAnonymousAccess.html" title="twisted.cred.checkers.AllowAnonymousAccess">AllowAnonymousAccess</a></code>
1237
 
checker and a <code class="API"><a href="http://twistedmatrix.com/documents/9.0.0/api/twisted.cred.checkers.
 
1232
<code class="API"><a href="http://twistedmatrix.com/documents/10.0.0/api/twisted.cred.checkers.AllowAnonymousAccess.html" title="twisted.cred.checkers.AllowAnonymousAccess">AllowAnonymousAccess</a></code>
 
1233
checker and a <code class="API"><a href="http://twistedmatrix.com/documents/10.0.0/api/twisted.cred.checkers.
1238
1234
.html" title="twisted.cred.checkers.
1239
1235
">
1240
1236
InMemoryUsernamePasswordDatabaseDontUse</a></code> checker are registered and the
1241
1237
client's choice of credentials object determines which is used to authenticate
1242
1238
the login.  In either case, the realm will be called on to create an avatar for
1243
1239
the login.  <code>AllowAnonymousAccess</code> always produces an <code>avatarId
1244
 
</code> of <code class="API"><a href="http://twistedmatrix.com/documents/9.0.0/api/twisted.cred.checkers.ANONYMOUS.html" title="twisted.cred.checkers.ANONYMOUS">ANONYMOUS</a></code>.</p>
 
1240
</code> of <code class="API"><a href="http://twistedmatrix.com/documents/10.0.0/api/twisted.cred.checkers.ANONYMOUS.html" title="twisted.cred.checkers.ANONYMOUS">ANONYMOUS</a></code>.</p>
1245
1241
 
1246
1242
<p>On the client side, the only change is the use of an instance of
1247
 
<code class="API"><a href="http://twistedmatrix.com/documents/9.0.0/api/twisted.cred.credentials.Anonymous.html" title="twisted.cred.credentials.Anonymous">Anonymous</a></code> when calling
1248
 
<code class="API"><a href="http://twistedmatrix.com/documents/9.0.0/api/twisted.spread.pb.PBClientFactory.login.html" title="twisted.spread.pb.PBClientFactory.login">PBClientFactory.login</a></code>.</p>
 
1243
<code class="API"><a href="http://twistedmatrix.com/documents/10.0.0/api/twisted.cred.credentials.Anonymous.html" title="twisted.cred.credentials.Anonymous">Anonymous</a></code> when calling
 
1244
<code class="API"><a href="http://twistedmatrix.com/documents/10.0.0/api/twisted.spread.pb.PBClientFactory.login.html" title="twisted.spread.pb.PBClientFactory.login">PBClientFactory.login</a></code>.</p>
1249
1245
 
1250
1246
 
1251
1247
<h2>Using Avatars<a name="auto12"/></h2>
1432
1428
<h3>Viewable<a name="auto17"/></h3> <a name="viewable" shape="rect"/>
1433
1429
 
1434
1430
<p>Once you have <code>IPerspective</code> objects (i.e. the Avatar) to
1435
 
represent users, the <code class="API"><a href="http://twistedmatrix.com/documents/9.0.0/api/twisted.spread.flavors.Viewable.html" title="twisted.spread.flavors.Viewable">Viewable</a></code> class can come into play. This
 
1431
represent users, the <code class="API"><a href="http://twistedmatrix.com/documents/10.0.0/api/twisted.spread.flavors.Viewable.html" title="twisted.spread.flavors.Viewable">Viewable</a></code> class can come into play. This
1436
1432
class behaves a lot like <code>Referenceable</code>: it turns into a
1437
1433
<code>RemoteReference</code> when sent over the wire, and certain methods
1438
1434
can be invoked by the holder of that reference. However, the methods that
1722
1718
backwards-compatibility.</span></a></li></ol></div>
1723
1719
 
1724
1720
    <p><a href="index.html">Index</a></p>
1725
 
    <span class="version">Version: 9.0.0</span>
 
1721
    <span class="version">Version: 10.0.0</span>
1726
1722
  </body>
1727
1723
</html>
 
 
b'\\ No newline at end of file'