Package twisted :: Package enterprise :: Module dbcred :: Class DatabaseAuthorizer
[show private | hide private]
[frames | no frames]

Class DatabaseAuthorizer

Accessor --+    
           |    
  Authorizer --+
               |
Augmentation --+
               |
              DatabaseAuthorizer


A PyPgSQL authorizer for Twisted Cred
Method Summary
  __init__(self, dbpool, serviceCollection)
  __delattr__(self, k)
(inherited from Accessor)
  __getattr__(self, k)
(inherited from Accessor)
  __setattr__(self, k, v)
(inherited from Accessor)
  __setstate__(self, state)
(inherited from Augmentation)
  addEmptyIdentity(self, identityName, hashedPassword, callback, errback)
Create an empty identity (no perspectives).
  addIdentity(self, identity)
Store an identity in the database.
  addPerspective(self, identityName, perspectiveName, serviceName, callback, errback)
Add a perspective by name to an identity.
  changePassword(self, identityName, hashedPassword, callback, errback)
  createIdentity(self, name)
Create an identity of an appropriate type for this Authorizer. (inherited from Authorizer)
  createSchema(self)
(inherited from Augmentation)
  get_application(self)
(inherited from Authorizer)
  getIdentities(self)
Get the identities in the db.
  getIdentityRequest(self, name)
get the identity from the database with the specified name.
  getPerspectives(self, identity_name)
Get the perspectives for an identity.
  getServiceNamed(self, name)
(inherited from Authorizer)
  getServices(self)
Get the known services.
  operationDone(self, done)
Example callback for database operation success. (inherited from Augmentation)
  operationError(self, error)
Example callback for database operation failure. (inherited from Augmentation)
  reallyDel(self, k)
*actually* del self.k without incurring side-effects. (inherited from Accessor)
  reallySet(self, k, v)
*actually* set self.k to v without incurring side-effects. (inherited from Accessor)
  removeIdentity(self, identityName)
Delete an identity
  removePerspective(self, identityName, perspectiveName, callback, errback)
Delete a perspective for an identity
  runInteraction(self, interaction, *args, **kw)
(inherited from Augmentation)
  runOperation(self, *args, **kw)
(inherited from Augmentation)
  runQuery(self, *args, **kw)
(inherited from Augmentation)
  schemaCreated(self, result)
(inherited from Augmentation)
  schemaNotCreated(self, error)
(inherited from Augmentation)
  setApplication(self, app)
Set the application for this authorizer. (inherited from Authorizer)
  setServiceCollection(self, collection)
Set the service collection for this authorizer. (inherited from Authorizer)

Class Variable Summary
str schema

Method Details

addEmptyIdentity(self, identityName, hashedPassword, callback=None, errback=None)

Create an empty identity (no perspectives). Used by web admin interface.

addIdentity(self, identity)

Store an identity in the database.

addPerspective(self, identityName, perspectiveName, serviceName, callback=None, errback=None)

Add a perspective by name to an identity.

getIdentities(self)

Get the identities in the db. Used by web admin interface.

getIdentityRequest(self, name)

get the identity from the database with the specified name.

getPerspectives(self, identity_name)

Get the perspectives for an identity. Used by the web admin interface.

getServices(self)

Get the known services. Used by the web admin interface.

removeIdentity(self, identityName)

Delete an identity

removePerspective(self, identityName, perspectiveName, callback=None, errback=None)

Delete a perspective for an identity

Class Variable Details

schema

Type:
str
Value:
'''
    CREATE TABLE twisted_identities
    (
      identity_name     varchar(64) PRIMARY KEY,
      password          varchar(64)
    );

    CREATE TABLE twisted_services
...                                                                    

Generated by Epydoc 1.1 on Fri Jun 27 03:45:27 2003 http://epydoc.sf.net